A mirror of phillbush's xmenu.
 
 
 
 
 

193 行
4.9 KiB

  1. .TH XMENU 1
  2. .SH NAME
  3. xmenu \- menu utility for X
  4. .SH SYNOPSIS
  5. .B xmenu
  6. .RB [ \-fiw ]
  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 -f
  20. Make glyphs align based solely on the first font specified.
  21. Without this option, glyphs are aligned based on the font in which they are found.
  22. This option may correct alignment of CJK glyphs
  23. if a CJK font is specified after a Latin font,
  24. but may break the alignment of other glyphs in some cases.
  25. .TP
  26. .B -i
  27. Disable icons.
  28. This makes xmenu loading faster when not using icons.
  29. .TP
  30. .BI -p " position"
  31. Set the position to spawn xmenu.
  32. Without this option, xmenu spawns next to the cursor.
  33. .I position
  34. is a string of the form
  35. .BR INTxINT[:MONITOR] ,
  36. where the first INT is the x position and the second INT is the y position.
  37. The monitor part between brackets is optional.
  38. .B MONITOR
  39. can be a number from 0 to the number of monitors minus 1;
  40. or it can be a string like
  41. .B current
  42. or
  43. .BR cursor .
  44. If present, the monitor specifies that the position is relative to the upper left corner
  45. of that monitor.
  46. If
  47. .B monitor
  48. is
  49. .B current
  50. or
  51. .BR cursor ,
  52. the monitor to be used is that where the cursor is in.
  53. For example,
  54. .B -p 0x0:cursor
  55. specifies that
  56. .B xmenu
  57. must spawn at the position 0x0 of the monitor where the cursor is in.
  58. And
  59. .B -p 100x500:0
  60. specifies that
  61. .B xmenu
  62. must spawn at the position 100x500 of the monitor 0.
  63. .TP
  64. .B -w
  65. Asks the window manager to draw a border around the menus.
  66. This option may be buggy in some window managers,
  67. specially tiled ones that do not respect window hints.
  68. .PP
  69. Each item read from stdin has the following format:
  70. .IP
  71. .EX
  72. ITEM := [TABS] [[IMAGE TABS] LABEL [TABS OUTPUT]] NEWLINE
  73. .EE
  74. .PP
  75. That means that each item is composed by
  76. tabs, followed by an optional image specification, followed by tabs
  77. followed by a label, followed by more tabs, followed by an output,
  78. and ended by a newline. Brackets group optional elements.
  79. .IP
  80. The initial tabs indicate the menu hierarchy:
  81. items indented with a tab is shown in a submenu of the preceding item not indented.
  82. An item without initial tabs is a top-level item.
  83. .IP
  84. The image is a string of the form "IMG:/path/to/image.png".
  85. It specifies a image to be shown as icon at the left of the entry.
  86. .IP
  87. The label is the string that will be shown as a item in the menu.
  88. An item without label is considered a separator and is drawn as a thin line in the menu
  89. separating the item above from the item below.
  90. .IP
  91. The output is the string that will be output after selecting the item.
  92. If an item does not have an output, its label is used as its output.
  93. .IP
  94. The newline terminates the item specification.
  95. .PP
  96. If the argument
  97. .I title
  98. is given, the title of the menu window is set to it.
  99. .SH USAGE
  100. .B xmenu
  101. is controlled by the mouse,
  102. but can also be controlled by the keyboard.
  103. Items can be selected using the arrow keys,
  104. Tab (with and without Shift),
  105. Enter and Esc.
  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. .SH RESOURCES
  122. .B
  123. xmenu
  124. understands the following X resources.
  125. .TP
  126. .B xmenu.font
  127. The font in which the labels should be drawn.
  128. Multiple fonts can be added as fallback fonts;
  129. they must be separated by a comma.
  130. .TP
  131. .B xmenu.background
  132. The background color of non-selected items in the menu.
  133. .TP
  134. .B xmenu.foreground
  135. The color of the label text of non-selected items in the menu.
  136. .TP
  137. .B xmenu.selbackground
  138. The background color of selected items in the menu.
  139. .TP
  140. .B xmenu.selforeground
  141. The color of the label text of selected items in the menu.
  142. .TP
  143. .B xmenu.border
  144. The color of the border around the menu.
  145. .TP
  146. .B xmenu.separator
  147. The color of the separator between items in the menu.
  148. .TP
  149. .B xmenu.gap
  150. The gap, in pixels, between the menus.
  151. .TP
  152. .B xmenu.width
  153. The minimum width, in pixels, of the items in the menu.
  154. .TP
  155. .B xmenu.height
  156. The size in pixels of the height of a single menu item.
  157. .TP
  158. .B xmenu.borderWidth
  159. The size in pixels of the border around the menu.
  160. .TP
  161. .B xmenu.separatorWidth
  162. The size in pixels of the item separator.
  163. .SH EXAMPLES
  164. The following script illustrates the use of
  165. .BR xmenu .
  166. The output is redirected to
  167. .IR sh (1),
  168. creating a command to be run by the shell.
  169. .IP
  170. .EX
  171. #!/bin/sh
  172. cat <<EOF | xmenu | sh &
  173. Applications
  174. IMG:./web.png Web Browser firefox
  175. IMG:./gimp.png Image editor gimp
  176. Terminal (xterm) xterm
  177. Terminal (urxvt) urxvt
  178. Terminal (st) st
  179. Shutdown poweroff
  180. Reboot reboot
  181. EOF
  182. .EE
  183. .PP
  184. For example, by selecting \(lqApplications\(rq, a new menu will appear.
  185. Selecting \(lqWeb Browser\(rq in the new menu opens firefox.
  186. .SH SEE ALSO
  187. .IR dmenu (1),
  188. .IR 9menu (1),
  189. .IR thingmenu (1)