Editing the windowmenu
From Fluxbox-wiki
Contents |
What is windowmenu
Windowmenu is the menu you get when you right click on a window's titlebar, press the menu-button on the titlebar, use the :WindowMenu keybind or even from the workspaces menu. By default it has options to maximize, minimize, shade etc windows, send them to different layers or workspaces and to rembember window's options.
Preparations
First, let Fluxbox know you're using a custom windowmenu. Open ~/.fluxbox/init and search for line
session.screen0.windowMenu:
Change it to
session.screen0.windowMenu: ~/.fluxbox/windowmenu
Reload fluxbox's config and you should be ready to start editing the menu
Editing the menu
Windowmenu is like the rootmenu, except it has some special items that normal menu doesn't.
The menu should start with [begin] and end with [end].
You can use the normal menuitems or special ones from the list below. Note that (label) is optional, without it a default one will be used:
[shade] (label) This option shades/unshades the window, only titlebar will be left visible. Same effect as double clicking on the title, pressing the shade button, using a keybind or maybe even scrolling with the mousewheel.
[close] (label) Closes the window. Just like pressing the X on the corner.
[kill] (label) [killwindow] (label) Kills the window. Comes in handy if the program has crashed and wont close.
[stick] (label) Toggles the window stickiness. When it is sticky, it is visible on all workspaces.
[maximize] (label) Maximizes and restores the window.
[iconify] (label) Minimizes (iconifies) the window.
[raise] (label) Raises the window to an upper layer.
[lower] (label) Lowers the window one layer.
[sendto] (label) Shows the "Send To..." menu. Allows sending windows to other workspaces.
[layer] (label) Shows the "Layer..." menu, allowind user to change the window's layer easily.
[extramenus] Shows the "Remember..." menu to remember window parameters through sessions.
[alpha] (label) A submenu containing various options for window transparency
[separator] Horizontal separator line, does nothing but sits there
After editing the menu, save it, and choose Reload config from Fluxbox' menu or you won't see your changes.
Examples
This one should make a menu similar to the default one:
# ~/.fluxbox/windowmenu - a 'custom' windowmenu [begin] [shade] (Shade) [stick] (Stick) [maximize] [iconify] (Iconify) [raise] [lower] [sendto] [layer] [extramenus] [separator] [close] (Close) [end]
This one is a little different:
[begin]
[exec] (terminal) {xterm}
[maximize] (maximize)
[iconify] (minimize)
[submenu] (advanced)
[layer] (layer)
[extramenus] (remember)
[sendto] (send to)
[end]
[separator]
[close] (close)
[end]

