Preface
Goal: Simple Example of Custom Fluxbox Menu Configuration
Table of Content
-
Preface: Table of Content
-
1: Config: Menu
-
2: XDG Menu
-
3: Custom Menu
1: Config: Menu
Syntax
The syntax is:
[exec] (Label) {command} < optional path to .xpm icon >
Default
This is the default fluxbox menu in openSUSE.
You can find it in ~/.fluxbox/menu
file.
# Version 0.2 07.12.2004 - hvogel@hennevogel.de
[begin] (Fluxbox Menu)
[exec] (xterm) {xterm}
[include] (~/.fluxbox/menu.xdg)
[submenu] (Fluxbox Configuration) {}
[config] (Config)
[workspaces] (Workspace)
[submenu] (System-Styles) {Choose a style...}
[stylesdir] (/usr/share/fluxbox/styles)
[end]
[submenu] (User-Styles) {Choose a style...}
[stylesdir] (~/.fluxbox/styles)
[end]
[end]
[exec] (Run Command) {fbrun}
[exec] (Lock Screen) {xlock}
[restart] (Restart) {}
[exit] (Logout)
[end]
Source
We will learn to customize later.
Window Menu
There are other menu, used for window context,
~/.fluxbox/windowmenu
file.
The window menu is actually customizable.
Other Distribution
This is the default fluxbox menu in Fedora.
You can find it in ~/.fluxbox/menu
file.
[begin] (Fluxbox-1.3.7)
[encoding] {UTF-8}
[exec] (xterm) {xterm}
[exec] (firefox) {}
[submenu] (Fluxbox menu)
[config] (Configure)
[submenu] (System Styles) {Choose a style...}
[stylesdir] (/usr/share/fluxbox/styles)
[end]
[submenu] (User Styles) {Choose a style...}
[stylesdir] (~/.fluxbox/styles)
[end]
[workspaces] (Workspace List)
[commanddialog] (Fluxbox Command)
[reconfig] (Reload config)
[restart] (Restart)
[exec] (About) {(fluxbox -v; fluxbox -info | sed 1d) | xmessage -file - -center}
[separator]
[exit] (Exit)
[end]
[endencoding]
[end]
Include
This is what I found in my Debian, as an example.
[begin] (fluxbox)
[include] (/etc/X11/fluxbox/fluxbox-menu)
[end]
On other distribution, I prefer creating XDG menu.
2: XDG Menu
We can create xdg menu for fluxbox using this command:
$ xdg_menu --format fluxbox --root-menu /etc/xdg/menus/applications.menu > ~/.fluxbox/menu.xdg
Depend on your setup,
the result of ~/.fluxbox/menu.xdg
would looks similar like this one:
[submenu] (SUSE Menu)
[submenu] (Development)
[submenu] (Debugger)
[exec] (Qt 5 D-Bus Viewer) {/usr/bin/qdbusviewer-qt5}
[end] # (Debugger)
...
[end] # (Development)
...
[end] # (SUSE Menu)
Now you can see the openSUSE’s XDG menu.
Source
3: Custom Menu
I would rather create my own menu ~/.fluxbox/menu.favorites
,
based on my favorites application.
It is either the minimalist version.
[submenu] (Favorites)
[exec] (URxvt) {urxvt}
[exec] (XFCE4 Terminal) {xfce4-terminal}
[separator]
[exec] (Geany) {geany}
[exec] (Thunar ) {thunar}
[exec] (Firefox) {firefox}
[exec] (Thunderbird) {thunderbird}
[separator]
[exec] (Inkscape) {inkscape}
[exec] (GIMP) {gimp}
[exec] (Clementine) {clementine}
[exec] (scrot -d 5) {scrot -d 5}
[end] # (Favorites)
Or a more structured one:
[submenu] (Favorites)
[submenu] (Terminal) {}
[exec] (URxvt) {urxvt}
[exec] (XFCE4 Terminal) {xfce4-terminal}
[end]
[submenu] (File Manager) {}
[exec] (Thunar ) {thunar}
[exec] (PCMan FM) {pcmanfm-qt}
[end]
[submenu] (Internet) {}
[exec] (Firefox) {firefox}
[exec] (Chromium) {chromium}
[exec] (Midori) {midori}
[exec] (Thunderbird) {thunderbird}
[exec] (Transmission) {transmission-qt}
[end]
[submenu] (Graphics and Media) {}
[exec] (Inkscape) {inkscape}
[exec] (GIMP) {gimp}
[separator]
[exec] (VLC) {vlc}
[exec] (Clementine) {clementine}
[end]
[exec] (Libreoffice) {libreoffice}
[exec] (Geany) {geany}
[exec] (scrot -d 5) {scrot -d 5}
[end] # (Favorites)
And the main menu ~/.fluxbox/menu
would be:
[begin] (Fluxbox Menu)
[include] (~/.fluxbox/menu.xdg)
[include] (~/.fluxbox/menu.favorites)
[separator]
[submenu] (Fluxbox Configuration) {}
[config] (Config)
[workspaces] (Workspace)
[submenu] (System-Styles) {Choose a style...}
[stylesdir] (/usr/share/fluxbox/styles)
[end]
[submenu] (User-Styles) {Choose a style...}
[stylesdir] (~/.fluxbox/styles)
[end]
[end]
[submenu] (Window Manager) {}
[exec] (Run Command) {fbrun}
[exec] (Lock Screen) {xlock}
# [reconfig] (Reload config)
[exec] (Shutdown) {/usr/bin/sudo /sbin/shutdown -h now} <>
[restart] (Restart) {}
[end]
[exit] (Logout)
[end]
Source
4: Generated Menu
There are also built in tools to generate menu, based on application installed on your system.
$ fluxbox-generate_menu
What’s Next
We are done with configuration. Consider having fun with theme by continue reading [ Theme: Inkscape Part ]