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.
 
 
 
 
 

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