| 1 | .TH PROG 1 |
| 2 | .SH NAME |
| 3 | xmenu \- menu utility for X |
| 4 | .SH SYNOPSIS |
| 5 | .B xmenu |
| 6 | .RB [ \-w ] |
| 7 | .RI [ title... ] |
| 8 | .SH DESCRIPTION |
| 9 | .B xmenu |
| 10 | is a menu for X, |
| 11 | it reads a list of newline-separated items from stdin, |
| 12 | shows a menu for the user to select one of the items, |
| 13 | and outputs the item selected to stdout. |
| 14 | .PP |
| 15 | The options are as follows: |
| 16 | .TP |
| 17 | .B -w |
| 18 | Asks the window manager to draw a border around the menus. |
| 19 | Without this options, the menus do not have border drawn by the window manager. |
| 20 | .PP |
| 21 | Each item read from stdin has the following format: |
| 22 | .IP |
| 23 | .EX |
| 24 | ITEM := TABS LABEL TABS COMMAND NEWLINE |
| 25 | .EE |
| 26 | .PP |
| 27 | That means, each item is composed by |
| 28 | tabs, followed by a label, followed by more tabs, followed by a command, |
| 29 | and ended by a newline. |
| 30 | .IP |
| 31 | The initial tabs indicate the menu hierarchy: |
| 32 | items indented with a tab is shown in a submenu of the preceding item not indented. |
| 33 | .IP |
| 34 | The label is the string that will be shown as a item in the menu. |
| 35 | An item without label is considered a separator and is drawn as a thin line in the menu |
| 36 | separating the item above from the item below. |
| 37 | .IP |
| 38 | The command is the string that will be output after selecting the item. |
| 39 | If the item spawns a submenu, the command is the title of the menu. |
| 40 | .IP |
| 41 | The newline terminates the item specification. |
| 42 | .PP |
| 43 | If the argument |
| 44 | .I title |
| 45 | is given, the title of the menu window is set to it. |
| 46 | .SH USAGE |
| 47 | .B xmenu |
| 48 | is controlled by the mouse, |
| 49 | but can also be controlled by the keyboard. |
| 50 | Items can be selected using the arrow keys, |
| 51 | Tab (with and without Shift), |
| 52 | Enter and Esc. |
| 53 | .TP |
| 54 | .BR Down ", " Tab |
| 55 | Cycle through the items in the regular direction. |
| 56 | .TP |
| 57 | .BR Up ", " Shift-Tab |
| 58 | Cycle through the items in the reverse direction. |
| 59 | .TP |
| 60 | .BR Right ", " Enter |
| 61 | Select the highlighted item. |
| 62 | .TP |
| 63 | .B Left |
| 64 | Go to the menu above. |
| 65 | .TP |
| 66 | .B Esc |
| 67 | Go to the menu above or exit xmenu. |
| 68 | .SH RESOURCES |
| 69 | .B |
| 70 | xmenu |
| 71 | understands the following X resources. |
| 72 | .TP |
| 73 | .B xmenu.font |
| 74 | The font in which the labels should be drawn. |
| 75 | .TP |
| 76 | .B xmenu.background |
| 77 | The background color of non-selected itens in the menu. |
| 78 | .TP |
| 79 | .B xmenu.foreground |
| 80 | The color of the label text of non-selected itens in the menu. |
| 81 | .TP |
| 82 | .B xmenu.selbackground |
| 83 | The background color of selected itens in the menu. |
| 84 | .TP |
| 85 | .B xmenu.selforeground |
| 86 | The color of the label text of selected itens in the menu. |
| 87 | .TP |
| 88 | .B xmenu.border |
| 89 | The color of the border around the menu. |
| 90 | .TP |
| 91 | .B xmenu.separator |
| 92 | The color of the separator between itens in the menu. |
| 93 | .TP |
| 94 | .B xmenu.width |
| 95 | The minimum width, in pixels, of the items in the menu. |
| 96 | .TP |
| 97 | .B xmenu.itemborder |
| 98 | The size in pixels of the border around the label text in items in the menu. |
| 99 | .TP |
| 100 | .B xmenu.menuborder |
| 101 | The size in pixels of the border around the menu. |
| 102 | .TP |
| 103 | .B xmenu.separatorsize |
| 104 | The size in pixels of the item separator. |
| 105 | |
| 106 | .SH EXAMPLES |
| 107 | The following is an script exemplifying the use |
| 108 | .BR xmenu . |
| 109 | The output is redirected to xargs to make a command to be run by the shell. |
| 110 | .IP |
| 111 | .EX |
| 112 | #!/bin/sh |
| 113 | |
| 114 | cat <<EOF | xmenu | xargs sh -c |
| 115 | Applications |
| 116 | Web Browser firefox |
| 117 | Image editor gimp |
| 118 | Terminal (xterm) xterm |
| 119 | Terminal (urxvt) urxvt |
| 120 | Terminal (st) st |
| 121 | |
| 122 | Shutdown poweroff |
| 123 | Reboot reboot |
| 124 | EOF |
| 125 | .EE |
| 126 | .PP |
| 127 | For example, by selecting \(lqApplications\(rq, a new menu will appear. |
| 128 | Selecting \(lqWeb Browser\(rq in the new menu will open firefox. |
| 129 | .SH SEE ALSO |
| 130 | .IR dmenu (1), |
| 131 | .IR 9menu (1), |
| 132 | .IR thingmenu (1) |