fluxbox/doc/fluxbox-menu.5.in
2013-02-13 11:00:22 +01:00

523 lines
16 KiB
Groff

'\" t
.\" Title: fluxbox-menu
.\" Author: Jim Ramsay <i.am@jimramsay.com>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 13 February 2013
.\" Manual: Fluxbox Manual
.\" Source: fluxbox-menu.txt
.\" Language: English
.\"
.TH "FLUXBOX\-MENU" "5" "13 February 2013" "fluxbox\-menu\&.txt" "Fluxbox Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * 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\&. Whitespace 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 \(oqkeys\(cq 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\(cqve created your own menu file, you\(cqll want to make sure that you properly declare this location in your \(oqinit\(cq 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\(cqs 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} <\*(Aqicon\*(Aq>
.RE
.sp
The <\*(Aqicon\*(Aq> field is always optional when shown 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} <\*(Aqicon\*(Aq>
.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) <\*(Aqicon\*(Aq>
.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} <\*(Aqicon\*(Aq>
.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 the 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) <\*(Aqicon\*(Aq>
.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) <\*(Aqicon\*(Aq>
.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\(cqt 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} <\*(Aqicon\*(Aq>
.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) <\*(Aqicon\*(Aq>
.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} <\*(Aqicon\*(Aq>
.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) <\*(Aqicon\*(Aq>
.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} <\*(Aqicon\*(Aq>
.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} <\*(Aqicon\*(Aq>
.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) <\*(Aqicon\*(Aq>
.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) <\*(Aqicon\*(Aq>
.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\(cqs 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\(cqs 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 \(oqapps\(cq 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\(cqs 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\(cqs root menu is missing or unparseable\&.
.RE
.PP
\fB~/\&.fluxbox/windowmenu\fR
.RS 4
This is the user\(cqs 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\(cqs 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
\fBRoot Menu\fR.
.sp
.if n \{\
.RS 4
.\}
.nf
# fluxbox menu file
[begin] (fluxbox)
[exec] (rxvt) {rxvt \-ls} </usr/X11R6/share/icons/terminal\&.xpm>
[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]
.fi
.if n \{\
.RE
.\}
.PP
\fBDefault Window Menu\fR.
.sp
.if n \{\
.RS 4
.\}
.nf
[begin]
[shade]
[stick]
[maximize]
[iconify]
[raise]
[lower]
[settitledialog]
[sendto]
[layer]
[alpha]
[extramenus]
[separator]
[close]
[end]
.fi
.if n \{\
.RE
.\}
.sp
.SH "AUTHORS"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Jim Ramsay <i\&.am at jimramsay com> (>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 <asenchi at asenchi com> (>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 <klausman at users sourceforge net> (\(lafluxbox\-0\&.9\&.11)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Grubert <grubert at users sourceforge net> (fluxbox)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Matthew Hawkins <matt at mh dropbear id au> (blackbox)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Wilbert Berendsen <wbsoft at xs4all nl> (blackbox)
.RE
.SH "SEE ALSO"
.sp
fluxbox(1) fluxbox\-keys(5) fluxbox\-apps(5) xkill(1) iconv(1)
.SH "AUTHOR"
.PP
\fBJim Ramsay\fR <\&i\&.am@jimramsay\&.com\&>
.RS 4
Author.
.RE