.\" Title: fluxbox-menu
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.74.0
.\" Date: 02/19/2009
.\" Manual: Fluxbox Manual
.\" Source: fluxbox-menu.txt 1.1.2
.\" Language: English
.\"
.TH "FLUXBOX\-MENU" "5" "02/19/2009" "fluxbox\-menu\&.txt 1\&.1\&.2" "Fluxbox Manual"
.\" -----------------------------------------------------------------
.\" * (re)Define some macros
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" toupper - uppercase a string (locale-aware)
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de toupper
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
\\$*
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
..
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" SH-xref - format a cross-reference to an SH section
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de SH-xref
.ie n \{\
.\}
.toupper \\$*
.el \{\
\\$*
.\}
..
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" SH - level-one heading that works better for non-TTY output
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de1 SH
.\" put an extra blank line of space above the head in non-TTY output
.if t \{\
.sp 1
.\}
.sp \\n[PD]u
.nr an-level 1
.set-an-margin
.nr an-prevailing-indent \\n[IN]
.fi
.in \\n[an-margin]u
.ti 0
.HTML-TAG ".NH \\n[an-level]"
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
\." make the size of the head bigger
.ps +3
.ft B
.ne (2v + 1u)
.ie n \{\
.\" if n (TTY output), use uppercase
.toupper \\$*
.\}
.el \{\
.nr an-break-flag 0
.\" if not n (not TTY), use normal case (not uppercase)
\\$1
.in \\n[an-margin]u
.ti 0
.\" if not n (not TTY), put a border/line under subheading
.sp -.6
\l'\n(.lu'
.\}
..
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" SS - level-two heading that works better for non-TTY output
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de1 SS
.sp \\n[PD]u
.nr an-level 1
.set-an-margin
.nr an-prevailing-indent \\n[IN]
.fi
.in \\n[IN]u
.ti \\n[SN]u
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.ps \\n[PS-SS]u
\." make the size of the head bigger
.ps +2
.ft B
.ne (2v + 1u)
.if \\n[.$] \&\\$*
..
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" BB/BE - put background/screen (filled box) around block of text
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de BB
.if t \{\
.sp -.5
.br
.in +2n
.ll -2n
.gcolor red
.di BX
.\}
..
.de EB
.if t \{\
.if "\\$2"adjust-for-leading-newline" \{\
.sp -1
.\}
.br
.di
.in
.ll
.gcolor
.nr BW \\n(.lu-\\n(.i
.nr BH \\n(dn+.5v
.ne \\n(BHu+.5v
.ie "\\$2"adjust-for-leading-newline" \{\
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
.\}
.el \{\
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
.\}
.in 0
.sp -.5v
.nf
.BX
.in
.sp .5v
.fi
.\}
..
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" BM/EM - put colored marker in margin next to block of text
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.de BM
.if t \{\
.br
.ll -2n
.gcolor red
.di BX
.\}
..
.de EM
.if t \{\
.br
.di
.ll
.gcolor
.nr BH \\n(dn
.ne \\n(BHu
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
.in 0
.nf
.BX
.in
.fi
.\}
..
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "Name"
fluxbox-menu \- fluxbox(1) menu syntax
.SH "Synopsis"
.sp
@pkgdatadir@/menu
.sp
~/\&.fluxbox/menu
.sp
~/\&.fluxbox/windowmenu
.SH "SYNTAX"
.sp
Variable parameters are shown in emphasis: \fIargument\fR
.sp
All other characters shown are required verbatim\&. Whitespce is only required to delimit words, but it is fine to add more whitespace\&.
.SH "DESCRIPTION"
.sp
There are two types of menus in fluxbox which can be configured\&.
.sp
The first is the root menu, which normally appears when you right\-click on the desktop\&.
.sp
The first is the \fBROOT MENU\fR (Or right\-click menu), is usually bound to a right\-click on the desktop, though this binding can be changed in the `keys\' file (\fBfluxbox\-keys(5)\fR)\&. This same syntax is used for the \fBCustomMenu\fR command, also mentioned in \fBfluxbox\-keys(5)\fR\&.
.sp
Fluxbox installs a default root menu file in \fB@pkgdatadir@/menu\fR\&. You can also use fluxbox \-i to confirm this location\&. Of course this system\-wide menu can be customized for all users at once, but it is also possible to create an individual menu file for each user\&. By convention, users create a menu file in \fB~/\&.fluxbox/menu\fR\&. Once you\'ve created your own menu file, you\'ll want to make sure that you properly declare this location in your `init\' file so that fluxbox knows where to look\&. See \fBRESOURCES\fR, below for details\&.
.sp
The second type is the \fBWINDOW MENU\fR, which defines the contents of the menu which appears when you right\-click on a window\'s titlebar or iconbar\&. This opens a menu file as defined by \fB~/\&.fluxbox/windowmenu\fR\&. If this file does not exist, fluxbox will copy in the default from \fB@pkgdatadir@/windowmenu\fR\&.
.sp
You do not need to \(lqreload\(rq fluxbox after editing the apps file, the changes should be taken into account the next time you open the menu\&.
.SH "ROOT MENU"
.sp
The root menu must begin with a \fB[begin]\fR tag and end with an \fB[end]\fR tag, and every tag must be on its own line\&.
.PP
There are up to four fields in a menu line\&. They are of the form:
.RS 4
[\fItag\fR] (\fIlabel\fR) {\fIcommand\fR} <\fIicon\fR>
.RE
.sp
The <\fIicon\fR> field is always optional when show below\&. If specified, the \fIicon\fR will be scaled down and displayed in the menu alongside the text label of the item\&. It must be in \&.xpm or \&.png format\&.
.sp
Any line that starts with a \fI#\fR or \fI!\fR is considered a comment and ignored by fluxbox\&. Also, in the label/command/filename fields you can escape any character\&. Using \fI\e\e\fR inserts a literal back\-slash into the label/command/filename field\&.
.sp
You may enter labels, commands, and icons using characters from any \fBiconv(1)\fR language/locale by specifying the encoding used via the \fB[encoding]\fR tag, detailed below\&.
.SS "Structural Tags"
.PP
\fB[begin]\fR (\fItitle\fR)
.RS 4
This tells fluxbox to start parsing the menu file\&. This tag is required for fluxbox to read your menu file\&. If it cannot find it, the system default menu is used in its place\&. The
\fItitle\fR
appears at the top of the menu\&. And
\fB[end]\fR
tag is required to end the menu\&.
.RE
.PP
\fB[submenu]\fR (\fIlabel\fR) {\fItitle\fR} <\fIicon\fR>
.RS 4
This tells fluxbox to create and parse a new menu, which is inserted as a submenu into the parent menu\&. These menus are parsed recursively, so there is no limit to the number of levels or nested submenus you can have\&. The
\fIlabel\fR
is the text that will appear in the parent menu, and the
\fItitle\fR
is shown at the top of the submenu\&. If omitted, the
\fItitle\fR
will be the same as the
\fIlabel\fR\&. An
\fB[end]\fR
tag is required to end the submenu\&.
.RE
.PP
\fB[end]\fR
.RS 4
This tells fluxbox that it is at the end of a menu\&. This can either be a
\fB[submenu]\fR
or the
\fB[begin]\fR
tag of the main root menu\&. There must be at least one of these tags in your menu to correspond to the required
\fB[begin]\fR
tag, and one for each
\fB[submenu]\fR\&.
.RE
.PP
\fB[encoding]\fR {\fIencoding\fR}
.RS 4
This begins an
\fB[encoding]\fR
section and specifies the string encoding of all strings until the matching
\fB[endencoding]\fR
tag\&. For a list of available encodings on your system, run
\fBiconv \-l\fR\&.
.RE
.PP
\fB[endencoding]\fR
.RS 4
This ends an
\fB[encoding]\fR
section\&.
.RE
.PP
\fB[include]\fR (\fIpath\fR)
.RS 4
Parses the file specified by filename inline with the current menu\&. The
\fIpath\fR
can be the full path to a file or it can begin with
\fB~/\fR, which will be expanded into your home directory\&. If
\fIpath\fR
is a directory, then all files in that directory are included\&.
.RE
.PP
\fB[separator]\fR
.RS 4
This will create a nice separation line\&. Useful for splitting up sections in a \(lqpretty\(rq way\&. The optional
\fIcomment\fR
is not displayed, but can be useful for internal documentation or script parsing of menu files\&.
.RE
.PP
\fB[nop]\fR (\fIlabel\fR) <\fIicon\fR>
.RS 4
Insert a non\-operational item into the current menu\&. This is much like
\fB[separator]\fR, but instead of a line, it inserts a
\fIlabel\fR\&. This can be used to help format the menu into blocks or sections if so desired\&. The
\fIlabel\fR
is optional, and if omitted a blank item will be inserted\&.
.RE
.SS "Applications"
.PP
\fB[exec]\fR (\fIlabel\fR) {\fIcommand\&...\fR} <\fIicon\fR>
.RS 4
Inserts a command item into the menu\&. When you select the menu item from the menu, fluxbox runs
\fIcommand\&...\fR
in your
\fB$SHELL\fR
(or /bin/sh if $SHELL is not set)\&. You can use this to launch applications, run shell scripts, etc\&. Since all arguments are passed verbatim to te shell, you can use environment variables, pipes, or anything else the shell can do\&. Note that processes only see environment variables that were set before fluxbox started (such as in ~/\&.fluxbox/startup)\&.
.RE
.SS "Fluxbox Functions"
.PP
\fB[config]\fR (\fIlabel\fR) <\fIicon\fR>
.RS 4
Inserts a fluxbox native submenu item, containing numerous configuration options concerning window placement, focus style, window moving style, etc\&. See
\fBConfiguration Menu\fR
in
\fBfluxbox(1)\fR
for details\&.
.RE
.PP
\fB[reconfig]\fR (\fIlabel\fR) <\fIicon\fR>
.RS 4
When selected this item re\-reads the current style and menu files and applies any changes\&. This is useful for creating a new style or theme, as you don\'t have to constantly restart fluxbox every time you save your style\&. However, fluxbox automatically rereads the menu whenever it changes\&.
.RE
.PP
\fB[restart]\fR (\fIlabel\fR) {\fIcommand\fR} <\fIicon\fR>
.RS 4
This tells fluxbox to restart\&. If
\fIcommand\fR
is supplied, it shuts down and runs the command (which is commonly the name of another window manager)\&. If
\fIcommand\fR
is omitted, fluxbox restarts itself\&.
.RE
.PP
\fB[exit]\fR (\fIlabel\fR) <\fIicon\fR>
.RS 4
Inserts an item that shuts down and exits fluxbox\&. Any open windows are reparented to the root window before fluxbox exits\&.
.RE
.PP
\fB[style]\fR (\fIlabel\fR) {\fIfilename\fR} <\fIicon\fR>
.RS 4
This tells fluxbox to insert an item that, when selected, reads style file named filename and apply the new textures, colors and fonts to the current running session\&.
.RE
.PP
\fB[stylesmenu]\fR (\fIdirectory\fR) <\fIicon\fR>
.RS 4
Reads all filenames from the specified directory, assuming that they are all valid style files, and creates inline menu items in the current menu for every filename, that, when selected by the user will apply the selected style file to the current session\&. The labels that are created in the menu are the filenames of the style files\&.
.RE
.PP
\fB[stylesdir]\fR (\fIlabel\fR) {\fIdirectory\fR} <\fIicon\fR>
.RS 4
Creates a submenu entry with
\fIlabel\fR
(that is also the title of the new submenu), and inserts in that submenu all filenames in the specified
\fIdirectory\fR, assuming that they are all valid style files (directories are ignored) in the same way as the
\fB[stylesdir]\fR
command does\&. Both
\fB[stylesdir]\fR
and
\fB[stylesmenu]\fR
commands make it possible to install style files without editing your init file\&.
.RE
.PP
\fB[wallpapers]\fR (\fIdirectory\fR) {\fIcommand\fR} <\fIicon\fR>
.RS 4
This inserts a menu item to set the wallpaper for each file in the given directory\&. The
\fIcommand\fR
is optional, and defaults to
\fBfbsetbg\fR\&.
.RE
.PP
\fB[workspaces]\fR (\fIlabel\fR) <\fIicon\fR>
.RS 4
This tells fluxbox to insert a link to the workspaces menu directly into your menu\&. See
\fBWorkspace Menu\fR
in
\fBfluxbox(1)\fR
for details\&.
.RE
.PP
\fB[\fR\fIcommand\fR\fB]\fR (\fIlabel\fR) <\fIicon\fR>
.RS 4
In addition to the commands above, any legal keys file
\fIcommand\fR
may be used as a menu item\&. See
\fBfluxbox\-keys(5)\fR
for more information\&.
.RE
.SH "WINDOW MENU"
.sp
Like the \fBROOT MENU\fR, this menu file must start with \fB[begin]\fR and end with \fB[end]\fR\&. However, this file consists of only one \fB[\fR\fItag\fR\fB]\fR per line with no labels, commands, or icons\&.
.sp
The available tags in this menu are:
.PP
\fB[shade]\fR
.RS 4
Provides a menu item to shade or unshade (or, roll\-up) the window\&. This is equivalent to the shade titlebar button\&.
.RE
.PP
\fB[stick]\fR
.RS 4
Provides a menu item to stick or unstick the window\&. Stuck windows are displayed on all workspaces\&. This is equivalent to the stick titlebar button\&.
.RE
.PP
\fB[maximize]\fR
.RS 4
Provides a menu item to maximize or unmaximize the window, equivalent to the maximize titlebar button\&. The button with which you click alters the behaviour of this item as follows:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Button 1 (Un)Maximize as normal\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Button 2 (Un)Maximize window vertically\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Button 3 (Un)Maximize window horizontally\&.
.RE
.RE
.PP
\fB[iconify]\fR
.RS 4
Provides a menu item to iconify (or, minimize) the window, equivalent to the iconify titlebar button\&.
.RE
.PP
\fB[close]\fR
.RS 4
Closes the window gracefully, equivalent to the titlebar button\&.
.RE
.PP
\fB[kill]\fR
.RS 4
Kills the window\'s process, like
\fBxkill(1)\fR\&.
.RE
.PP
\fB[raise]\fR
.RS 4
Raise the window to the top of the stack within its layer\&.
.RE
.PP
\fB[lower]\fR
.RS 4
Lower the window to the bottom of the stack within its layer\&.
.RE
.PP
\fB[settitledialog]\fR
.RS 4
Opens a dialog which can be used to set the window\'s title\&. Some applications may re\-set their own title from time\-to\-time, wiping out your setting\&.
.RE
.PP
\fB[sendto]\fR
.RS 4
Sends the window to a different workspace\&. When you select the workspace with a middle\-click, fluxbox will also change to the new workspace\&. A regular click only sends the window\&.
.RE
.PP
\fB[layer]\fR
.RS 4
Adds a \(lqLayer\&...\(rq submenu which lets you change the layer of this window\&.
.RE
.PP
\fB[alpha]\fR
.RS 4
Adds a \(lqTransparency\&...\(rq submenu which lets you change the focused and unfocused transparency of this window\&.
.RE
.PP
\fB[extramenus]\fR
.RS 4
Adds the \(lqRemember\&...\(rq menu item, which allows you to specify which settings should be stored in the `apps\' file (See
\fBfluxbox\-apps(5)\fR
for more details)\&.
.RE
.PP
\fB[separator]\fR
.RS 4
Adds a horizontal line to the menu
.RE
.SH "FILES"
.PP
\fB~/\&.fluxbox/menu\fR
.RS 4
This is the default location for the user\'s root menu\&.
.RE
.PP
\fB@pkgdatadir@/menu\fR
.RS 4
This is the system\-wide root menu file\&. It will be used if the user\'s root menu is missing or unparseable\&.
.RE
.PP
\fB~/\&.fluxbox/windowmenu\fR
.RS 4
This is the user\'s window menu definition file
.RE
.PP
\fB@pkgdatadir@/menu\fR
.RS 4
This is the default window menu\&. If the user does not have this file, it will be copied to
\fB~/\&.fluxbox/windowmenu\fR
on fluxbox startup\&.
.RE
.SH "RESOURCES"
.PP
\fBsession\&.menuFile:\fR \fIlocation\fR
.RS 4
This may be set to override the location of the user\'s root menu\&.
.RE
.SH "ENVIRONMENT"
.sp
The \fIcomand\&...\fR field of the \fB[exec]\fR tag can take advantage of other environment variables if they are set before fluxbox is started\&.
.SH "EXAMPLES"
.PP
\fBExample\ \&1.\ \&Root Menu\fR
.sp
.if n \{\
.RS 4
.\}
.fam C
.ps -1
.nf
.BB lightgray
# fluxbox menu file
[begin] (fluxbox)
[exec] (rxvt) {rxvt \-ls}
[exec] (netscape) {netscape \-install}
[exec] (The GIMP) {gimp}
[exec] (XV) {xv}
[exec] (Vim) {rxvt \-geometry 132x60 \-name VIM \-e screen vim}
[exec] (Mutt) {rxvt \-name mutt \-e mutt}
[submenu] (mozilla)
[exec] (browser) {mozilla \-browser}
[exec] (news) {mozilla \-news}
[exec] (mail) {mozilla \-mail}
[exec] (edit) {mozilla \-edit}
[exec] (compose) {mozilla \-compose}
[end]
[submenu] (Window Manager)
[exec] (Edit Menus) {nedit ~/\&.fluxbox/menu}
[submenu] (Style) {Which Style?}
[stylesdir] (~/\&.fluxbox/styles)
[stylesmenu] (fluxbox Styles) {@pkgdatadir@/styles}
[end]
[config] (Config Options)
[reconfig] (Reconfigure)
[restart] (Restart)
[end]
[exit] (Log Out)
[end]
.EB lightgray
.fi
.fam
.ps +1
.if n \{\
.RE
.\}
.PP
\fBExample\ \&2.\ \&Default Window Menu\fR
.sp
.if n \{\
.RS 4
.\}
.fam C
.ps -1
.nf
.BB lightgray
[begin]
[shade]
[stick]
[maximize]
[iconify]
[raise]
[lower]
[settitledialog]
[sendto]
[layer]
[alpha]
[extramenus]
[separator]
[close]
[end]
.EB lightgray
.fi
.fam
.ps +1
.if n \{\
.RE
.\}
.SH "AUTHORS"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Jim Ramsay (>fluxbox\-1\&.0\&.0)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Curt Micol (>fluxbox\-0\&.9\&.11)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Tobias Klausmann (\(lafluxbox\-0\&.9\&.11)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Grubert (fluxbox)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Matthew Hawkins (blackbox)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Wilbert Berendsen (blackbox)
.RE
.SH "SEE ALSO"
.sp
fluxbox(1) fluxbox\-keys(5) fluxbox\-apps(5) xkill(1) iconv(1)