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.
 
 
 
 
 

197 line
4.8 KiB

  1. .TH XMENU 1
  2. .SH NAME
  3. xmenu \- menu utility for X
  4. .SH SYNOPSIS
  5. .B xmenu
  6. .RB [ \-iw ]
  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 -w
  58. Asks the window manager to draw a border around the menus.
  59. This option may be buggy in some window managers,
  60. specially tiled ones that do not respect window hints.
  61. .PP
  62. Each item read from stdin has the following format:
  63. .IP
  64. .EX
  65. ITEM := [TABS] [[IMAGE TABS] LABEL [TABS OUTPUT]] NEWLINE
  66. .EE
  67. .PP
  68. That means that each item is composed by
  69. tabs, followed by an optional image specification, followed by tabs
  70. followed by a label, followed by more tabs, followed by an output,
  71. and ended by a newline. Brackets group optional elements.
  72. .IP
  73. The initial tabs indicate the menu hierarchy:
  74. items indented with a tab is shown in a submenu of the preceding item not indented.
  75. An item without initial tabs is a top-level item.
  76. .IP
  77. The image is a string of the form "IMG:/path/to/image.png".
  78. It specifies a image to be shown as icon at the left of the entry.
  79. .IP
  80. The label is the string that will be shown as a item in the menu.
  81. An item without label is considered a separator and is drawn as a thin line in the menu
  82. separating the item above from the item below.
  83. .IP
  84. The output is the string that will be output after selecting the item.
  85. If an item does not have an output, its label is used as its output.
  86. .IP
  87. The newline terminates the item specification.
  88. .PP
  89. If the argument
  90. .I title
  91. is given, the title of the menu window is set to it.
  92. .SH USAGE
  93. .B xmenu
  94. is controlled by the mouse,
  95. but can also be controlled by the keyboard.
  96. Items can be selected using the arrow keys,
  97. Tab (with and without Shift),
  98. Home, End,
  99. Enter and Esc, and 1-9 keys.
  100. .TP
  101. .BR Home
  102. Select the first item in the menu.
  103. .TP
  104. .BR End
  105. Select the last item in the menu.
  106. .TP
  107. .BR Down ", " Tab
  108. Cycle through the items in the regular direction.
  109. .TP
  110. .BR Up ", " Shift-Tab
  111. Cycle through the items in the reverse direction.
  112. .TP
  113. .BR Right ", " Enter
  114. Select the highlighted item.
  115. .TP
  116. .B Left
  117. Go to the menu above.
  118. .TP
  119. .B Esc
  120. Go to the menu above or exit xmenu.
  121. .PP
  122. Additional key bindings can be set at compile time by changing the
  123. .B config.h
  124. file.
  125. .SH RESOURCES
  126. .B
  127. xmenu
  128. understands the following X resources.
  129. .TP
  130. .B xmenu.font
  131. The font in which the labels should be drawn.
  132. Multiple fonts can be added as fallback fonts;
  133. they must be separated by a comma.
  134. .TP
  135. .B xmenu.background
  136. The background color of non-selected items in the menu.
  137. .TP
  138. .B xmenu.foreground
  139. The color of the label text of non-selected items in the menu.
  140. .TP
  141. .B xmenu.selbackground
  142. The background color of selected items in the menu.
  143. .TP
  144. .B xmenu.selforeground
  145. The color of the label text of selected items in the menu.
  146. .TP
  147. .B xmenu.border
  148. The color of the border around the menu.
  149. .TP
  150. .B xmenu.separator
  151. The color of the separator between items in the menu.
  152. .TP
  153. .B xmenu.gap
  154. The gap, in pixels, between the menus.
  155. .TP
  156. .B xmenu.width
  157. The minimum width, in pixels, of the items in the menu.
  158. .TP
  159. .B xmenu.height
  160. The size in pixels of the height of a single menu item.
  161. .TP
  162. .B xmenu.borderWidth
  163. The size in pixels of the border around the menu.
  164. .TP
  165. .B xmenu.separatorWidth
  166. The size in pixels of the item separator.
  167. .SH EXAMPLES
  168. The following script illustrates the use of
  169. .BR xmenu .
  170. The output is redirected to
  171. .IR sh (1),
  172. creating a command to be run by the shell.
  173. .IP
  174. .EX
  175. #!/bin/sh
  176. cat <<EOF | xmenu | sh &
  177. Applications
  178. IMG:./web.png Web Browser firefox
  179. IMG:./gimp.png Image editor gimp
  180. Terminal (xterm) xterm
  181. Terminal (urxvt) urxvt
  182. Terminal (st) st
  183. Shutdown poweroff
  184. Reboot reboot
  185. EOF
  186. .EE
  187. .PP
  188. For example, by selecting \(lqApplications\(rq, a new menu will appear.
  189. Selecting \(lqWeb Browser\(rq in the new menu opens firefox.
  190. .SH SEE ALSO
  191. .IR dmenu (1),
  192. .IR 9menu (1),
  193. .IR thingmenu (1)