Fluxbox

Fluxbox is a window manager for X11. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox provides a number of window management features such as tabbing and grouping and has hundreds of styles (themes) available. All Fluxbox configuration is stored in plaintext files; however, some settings are exposed graphically in the configuration menu.

Installation

Install the fluxbox package.

Starting

Run startfluxbox with xinit.

Configuration

System-wide Fluxbox configuration files are in /usr/share/fluxbox while user configuration files are in ~/.fluxbox:

The Fluxbox root menu is defined in ~/.fluxbox/menu and it can be accessed by right clicking on the desktop. As with other lightweight window managers, Fluxbox does not automatically update its menu when you install new applications. Therefore, the menu will need to be regenerated when new applications are installed/uninstalled.

The basic syntax for a menu item to appear is:

[exec] (name) {command} <path to icon>

...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:

[exec] (Firefox Browser) {/usr/bin/firefox} <path to firefox icon>

Note that the "<path to icon>" is optional. If you want to create a submenu, the syntax is:

[submenu] (Name)
...
...
[end]

When you have finished editing, save the file and exit. There is no need to restart Fluxbox. For more information, read editing the Fluxbox menu.

Automatic menu generation

There are some programs which can generate either a complete Fluxbox root menu or a submenu of installed applications which can be manually included in an existing root menu definition. These are outlined below.

fluxbox-generate_menu

There is a built-in command provided with Fluxbox:

$ fluxbox-generate_menu

This command will auto-generate a ~/.fluxbox/menu file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by MenuMaker.

MenuMaker is a powerful tool that creates XML-based menus for a variety of Window Managers, including Fluxbox. MenuMaker will search your computer for executable programs and create a menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if desired.

Install menumaker, then you can generate a complete menu and overwrite the default one by running:

$ mmaker -f FluxBox

You can avoid populating your menu with terminal based applications such as alsamixer by running the following switches with the mmaker command: --no-legacy and --no-debian. For example:

$ mmaker -f --no-legacy --no-debian FluxBox

To see more MenuMaker options:

$ mmaker --help
Xdg-menu

You can also generate a menu using Xdg-menu. See the Xdg-menu#FluxBox section.

Other menus

In addition to the root menu, Fluxbox also provides the following menus:

  • Workspaces Menu: middle click on desktop.
  • Configuration Menu: located within the "Fluxbox" section of the "Root" menu.
  • Window menu: right click on the titlebar of any window, or its bar if minimized. Can be edited. See fluxbox-menu man page.
  • Toolbar menu: right click on empty part of toolbar. Also found as a sub-menu within the Configuration Menu.
  • Slit Menu: found as a sub-menu within the configuration menu.

Hotkeys

The Fluxbox hotkey file is located at . The Control key is represented by . corresponds to the Alt key and corresponds to Super (not a standard key but most users map Super to the Win key).

Set the keyboard layout with Fluxbox

Just add the following line to :

setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)

Instead of 'us', you can also pass your language code and remove the variant option (ex.: 'us_intl', which works like the command above in some setups). See setxkbmap(1) for more options.

To make a help function in your menu, just add in ~/.fluxbox/menu:

[submenu] (Keyboard)
      [exec] (normal) {setxkbmap us}
      [exec] (international) {setxkbmap us -variant intl}
[end]

Clipboard Manager for Fluxbox

You can use just about any clipboard manager you like with Fluxbox. Arch packages (in the community repository) that works very well with Fluxbox. Simply install parcellite and then add the commands to start parcellite when Fluxbox starts by adding the following in before the call to :

## clipboard manager
clipmgr=$(type -p parcellite)
[ -x "$clipmgr" ] && "$clipmgr" &

Workspaces

Fluxbox defaults to having four workspaces. These are accessible using the shortcuts, or by using the left mouse button to click the arrows on the toolbar. You can also access workspaces via a middle mouse button click on desktop which pops up the Workspaces Menu.

Tabbing and grouping

With at least two windows visible on your desktop, use on the upper window tab of one window and drag it into the other open window. The two windows will now be grouped together with window tabs in the upper window tab bar. You may now perform a window operation that will affect the entire window "group". To reverse the tabbing, use on a tab and drag it to an empty space on the desktop.

Autostart

Fluxbox provides functionality to autostart applications. The file is a script for autostarting applications as well as starting Fluxbox itself. The symbol denotes a comment. Make sure that any lines starting applications come before the call to start Fluxbox itself. Otherwise, these lines will not be reached until Fluxbox itself terminates.

Wallpaper

Fluxbox provides a wrapper script fbsetbg which can help one to set the wallpaper. Please refer to the Fluxbox wiki for details. Alternatively, you can use a wallpaper setter such as feh or Nitrogen independently if you wish. See below.

Swapping multiple backgrounds easily

Place the following submenu in your Fluxbox menu:

[submenu] (Backgrounds)
[wallpapers] (~/.fluxbox/backgrounds) {feh --bg-scale}
[wallpapers] (/usr/share/fluxbox/backgrounds) {feh --bg-scale}
[end]

Then, put your background images into or any other directory you specify; they will then appear in the same fashion as your styles.

The same applies to a dual screen wallpaper on a system without 'xinerama' (NVidia TwinView for example):

[submenu] (Backgrounds)
[wallpapers] (/path/to/your/backgrounds) {feh --bg-scale --no-xinerama }
[end]

Using feh with Fluxbox

Install feh.

To make sure Fluxbox will load feh background next time start:

1. Make .fehbg executable.

2. Then add (or modify) the following line to the file :

session.screen0.rootCommand:	~/.fehbg

3. or add (or modify) the following line to the file :

~/.fehbg

Theming

To install a Fluxbox theme, extract the theme archive file to a styles directory. The default directories are:

  • Global -
  • User only -

The package contains a number of Fluxbox styles from the (now defunct) fluxmod.dk site.

To create your own Fluxbox styles, please refer to fluxbox-style(5), Fluxbox/Style guide and tenr.de Fluxbox style guide.

If you use mmaker -f FluxBox to create your menus, you will not see the styles menu selection after you install the styles. To correct this, add the following to ~/.fluxbox/menu after the restart menu item:

               [submenu] (System Styles) {Choose a style...}
                     [stylesdir] (/usr/share/fluxbox/styles)
                       [end]
               [submenu] (User Styles) {Choose a style...}
                     [stylesdir] (~/.fluxbox/styles)
                       [end]

The Slit

Some window managers, such as Fluxbox, Window Maker and Openbox, have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is essentially a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather apps and so on. Visit dockapps.net to see what dockapps are available.

gollark: Good work.
gollark: Hmm, that came out okay, yes.
gollark: I can flip the background to transparent easily enough, but then the semitransparent bits will be broken.
gollark: Sure?
gollark: I'm not a graphic designer. Sinthorion added it as one of their last acts before being demoted.

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.