A mirror of phillbush's xmenu.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

224 lines
5.6 KiB

  1. .TH XMENU 1
  2. .SH NAME
  3. xmenu \- menu utility for X
  4. .SH SYNOPSIS
  5. .B xmenu
  6. .RB [ \-irtw ]
  7. .RB [ -p
  8. .IR position ]
  9. .RI [ title ]
  10. .SH DESCRIPTION
  11. .B xmenu
  12. is a menu for X,
  13. it reads a list of newline-separated items from stdin,
  14. shows a menu for the user to select one of the items,
  15. and outputs the item selected to stdout.
  16. .PP
  17. The options are as follows:
  18. .TP
  19. .B -i
  20. Disable icons.
  21. This makes xmenu loading faster when not using icons.
  22. .TP
  23. .BI -p " position"
  24. Set the position to spawn xmenu.
  25. Without this option, xmenu spawns next to the cursor.
  26. .I position
  27. is a string of the form
  28. .BR INTxINT[:MONITOR] ,
  29. where the first INT is the x position and the second INT is the y position.
  30. The monitor part between brackets is optional.
  31. .B MONITOR
  32. can be a number from 0 to the number of monitors minus 1;
  33. or it can be a string like
  34. .B current
  35. or
  36. .BR cursor .
  37. If present, the monitor specifies that the position is relative to the upper left corner
  38. of that monitor.
  39. If
  40. .B monitor
  41. is
  42. .B current
  43. or
  44. .BR cursor ,
  45. the monitor to be used is that where the cursor is in.
  46. For example,
  47. .B -p 0x0:cursor
  48. specifies that
  49. .B xmenu
  50. must spawn at the position 0x0 of the monitor where the cursor is in.
  51. And
  52. .B -p 100x500:0
  53. specifies that
  54. .B xmenu
  55. must spawn at the position 100x500 of the monitor 0.
  56. .TP
  57. .B -r
  58. If this option is set, the right mouse button is disabled;
  59. so pressing it will not trigger any menu item.
  60. .TP
  61. .B -t
  62. If this option is set, the type-to-select feature is enabled,
  63. so typing a string will select the first item matching it.
  64. .TP
  65. .B -w
  66. Asks the window manager to draw a border around the menus.
  67. This option may be buggy in some window managers,
  68. specially tiled ones that do not respect window hints.
  69. .PP
  70. Each item read from stdin has the following format:
  71. .IP
  72. .EX
  73. ITEM := [TABS] [[IMAGE TABS] LABEL [TABS OUTPUT]] NEWLINE
  74. .EE
  75. .PP
  76. That means that each item is composed by
  77. tabs, followed by an optional image specification, followed by tabs
  78. followed by a label, followed by more tabs, followed by an output,
  79. and ended by a newline. Brackets group optional elements.
  80. .IP
  81. The initial tabs indicate the menu hierarchy:
  82. items indented with a tab is shown in a submenu of the preceding item not indented.
  83. An item without initial tabs is a top-level item.
  84. .IP
  85. The image is a string of the form "IMG:/path/to/image.png".
  86. It specifies a image to be shown as icon at the left of the entry.
  87. .IP
  88. The label is the string that will be shown as a item in the menu.
  89. An item without label is considered a separator and is drawn as a thin line in the menu
  90. separating the item above from the item below.
  91. .IP
  92. The output is the string that will be output after selecting the item.
  93. If an item does not have an output, its label is used as its output.
  94. .IP
  95. The newline terminates the item specification.
  96. .PP
  97. If the argument
  98. .I title
  99. is given, the title of the menu window is set to it.
  100. .SH USAGE
  101. .B xmenu
  102. is controlled by the mouse,
  103. but can also be controlled by the keyboard.
  104. Items can be selected using the arrow keys,
  105. Tab (with and without Shift),
  106. Home, End,
  107. Enter and Esc, and 1-9 keys.
  108. .TP
  109. .BR Home
  110. Select the first item in the menu.
  111. .TP
  112. .BR End
  113. Select the last item in the menu.
  114. .TP
  115. .BR Down
  116. Cycle through the items in the regular direction.
  117. .TP
  118. .BR Tab
  119. Cycle through the items in the regular direction.
  120. If the type-to-select feature is enabled, and there is a typed string in memory,
  121. cycle through matching items instead.
  122. .TP
  123. .BR Up
  124. Cycle through the items in the reverse direction.
  125. .TP
  126. .BR Shift-Tab
  127. Cycle through the items in the reverse direction.
  128. If the type-to-select feature is enabled, and there is a typed string in memory,
  129. cycle through matching items instead.
  130. .TP
  131. .BR Right ", " Enter
  132. Select the highlighted item.
  133. .TP
  134. .B Left
  135. Go to the menu above.
  136. .TP
  137. .B Esc
  138. Go to the menu above or exit xmenu.
  139. .PP
  140. Additional key bindings can be set at compile time by changing the
  141. .B config.h
  142. file.
  143. .SH RESOURCES
  144. .B
  145. xmenu
  146. understands the following X resources.
  147. .TP
  148. .B xmenu.font
  149. The font in which the labels should be drawn.
  150. Multiple fonts can be added as fallback fonts;
  151. they must be separated by a comma.
  152. .TP
  153. .B xmenu.background
  154. The background color of non-selected items in the menu.
  155. .TP
  156. .B xmenu.foreground
  157. The color of the label text of non-selected items in the menu.
  158. .TP
  159. .B xmenu.selbackground
  160. The background color of selected items in the menu.
  161. .TP
  162. .B xmenu.selforeground
  163. The color of the label text of selected items in the menu.
  164. .TP
  165. .B xmenu.border
  166. The color of the border around the menu.
  167. .TP
  168. .B xmenu.separator
  169. The color of the separator between items in the menu.
  170. .TP
  171. .B xmenu.gap
  172. The gap, in pixels, between the menus.
  173. .TP
  174. .B xmenu.width
  175. The minimum width, in pixels, of the items in the menu.
  176. .TP
  177. .B xmenu.height
  178. The size in pixels of the height of a single menu item.
  179. .TP
  180. .B xmenu.borderWidth
  181. The size in pixels of the border around the menu.
  182. .TP
  183. .B xmenu.separatorWidth
  184. The size in pixels of the item separator.
  185. .TP
  186. .B xmenu.alignment
  187. If set to
  188. .BR "\(dqleft\(dq" ,
  189. .BR "\(dqcenter\(dq" ,
  190. or
  191. .BR "\(dqright\(dq" ,
  192. text is aligned to the left, center, or right of the menu, respectively.
  193. By default, text is aligned to the left.
  194. .SH EXAMPLES
  195. The following script illustrates the use of
  196. .BR xmenu .
  197. The output is redirected to
  198. .IR sh (1),
  199. creating a command to be run by the shell.
  200. .IP
  201. .EX
  202. #!/bin/sh
  203. cat <<EOF | xmenu | sh &
  204. Applications
  205. IMG:./web.png Web Browser firefox
  206. IMG:./gimp.png Image editor gimp
  207. Terminal (xterm) xterm
  208. Terminal (urxvt) urxvt
  209. Terminal (st) st
  210. Shutdown poweroff
  211. Reboot reboot
  212. EOF
  213. .EE
  214. .PP
  215. For example, by selecting \(lqApplications\(rq, a new menu will appear.
  216. Selecting \(lqWeb Browser\(rq in the new menu opens firefox.
  217. .SH SEE ALSO
  218. .IR dmenu (1),
  219. .IR 9menu (1),
  220. .IR thingmenu (1)