Difference between revisions of "Fluxbox"

From ArchWiki
Jump to navigation Jump to search
(Put autostart in Configuration part (follow Fluxbox and Openbox articles format))
 
(244 intermediate revisions by 70 users not shown)
Line 1: Line 1:
[[Category:Desktop environments (English)]]
+
[[Category:Stacking WMs]]
[[Category:HOWTOs (English)]]
+
[[cs:Fluxbox]]
{{i18n_links_start}}
+
[[de:Fluxbox]]
{{i18n_entry|English|Fluxbox}}
+
[[es:Fluxbox]]
{{i18n_entry|Italiano|Fluxbox (Italiano)}}
+
[[fr:Fluxbox]]
{{i18n_links_end}}
+
[[it:Fluxbox]]
 +
[[ja:Fluxbox]]
 +
[[ko:Fluxbox]]
 +
[[pl:Fluxbox]]
 +
[[pt:Fluxbox]]
 +
[[ru:Fluxbox]]
 +
[[sr:Fluxbox]]
 +
[[zh-hant:Fluxbox]]
 +
[[zh-hans:Fluxbox]]
 +
{{Related articles start}}
 +
{{Related|Window manager}}
 +
{{Related articles end}}
 +
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.
  
===Installing Fluxbox===
+
== Installation ==
Install fluxbox from the repositories. New users may want to also install menumaker and/or fluxconf.
 
pacman -Sy fluxbox fluxconf
 
  
Menumaker was moved to unsupported, to install you need download tarball from aur.
+
[[Install]] the {{Pkg|fluxbox}} package.
wget http://aur.archlinux.org/packages/menumaker/menumaker.tar.gz
 
tar xvf menumaker.tar.gz
 
cd menumaker
 
makepkg
 
Install it with:
 
pacman -U menumaker-0.99.7-2-i686.pkg.tar.gz
 
Modify if necessary.
 
  
Remove fluxconf and menumaker if you want a more minimal install, usage of each will be covered but not required
+
== Starting ==
  
===Starting Fluxbox===
+
Run {{ic|startfluxbox}} with [[xinit]].
====Method 1: kdm/gdm====
 
This will automaticly be added to the session types. Select fluxbox from the menu.
 
  
''Note:'' you will have to have '''login manager''' enabled at first. For instructions how to do that, look [[Adding_a_login_manager_(KDM%2C_GDM%2C_or_XDM)_to_automatically_boot_on_startup|here]].
+
== Configuration ==
  
====Method 2: xinitrc====
+
System-wide Fluxbox configuration files are in {{ic|/usr/share/fluxbox}} while user configuration files are in {{ic|~/.fluxbox}}. The user config files are:
In your home folder add the code below to your .xinitrc file
 
exec fluxbox  
 
or if you like to use the 'startfluxbox' file use :
 
exec startfluxbox
 
It is better to use 'startfluxbox', because only then file ~/.fluxbox/startup file is used.
 
Remember: there can only be one exec line in your .xinitrc file
 
  
''Note'' : if it crashes on startup, it may be a locale problem.. Setting LC_ALL to the default "C" locale, may avoid this crash. [http://bbs.archlinux.org/viewtopic.php?t=25797 1]
+
* ''init'' - the main Fluxbox resource configuration file. See [http://fluxbox-wiki.org/category/howtos/en/Editing_the_init_file.html  Editing the init file].
Then you can start fluxbox with startx command.
+
* ''menu'' - the Fluxbox menu config. See below and [http://fluxbox-wiki.org/category/howtos/en/Editing_the_menu.html Editing the menu file].
 +
* ''keys'' - the Fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/category/howtos/en/Keyboard_shortcuts.html Keyboard shortcuts].
 +
* ''startup'' - where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/category/howtos/en/Editing_the_startup_file.html Editing the startup file].
 +
* ''overlay'' - a configuration file to override elements of styles. See [http://fluxbox-wiki.org/category/howtos/en/Style_overlay.html Style overlay].
 +
* ''apps'' - a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/category/howtos/en/Editing_the_apps_file.html Editing the apps file].
 +
* ''windowmenu'' - a configuration file for altering the Window Menu itself: [http://fluxbox-wiki.org/category/howtos/en/Editing_the_windowmenu.html Editing the windowmenu].
  
===Configuring Fluxbox===
+
=== Menus ===
====Menus====
 
=====Fast method:=====
 
build in command :
 
fluxbox-generate_menu
 
this command will generate a .fluxbox/menu/ file based on your installed programms. There is also "helper / regenerate menu" in the fluxbox menu.
 
  
======Archlinux xdg menu======
+
The Fluxbox root menu is defined in {{ic|~/.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.
Requires [http://aur.archlinux.org/packages.php?do_Details=1&ID=10535&O=0&L=0&C=0&K=archlinux-xdg-menu&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=ndarchlinux-xdg-menu Archlinux xdg menu] <br>
 
xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu
 
Tip: replace default xterm/urxvt
 
sed -i 's/xterm/urxvt/g' ~/.fluxbox/menu
 
More info
 
xdg_menu --help
 
See also:
 
[[XdgMenu|Archlinux xdg menu]]
 
  
 +
The basic syntax for a menu item to appear is:
 +
[exec] (name) {command} <path to icon>
  
=====Creating a custom menu with fluxconf=====
+
...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:
To start the menu section of fluxconf run:
+
[exec] (Firefox Browser) {/usr/bin/firefox} <path to firefox icon>
fluxmenu
 
In the window you will see three columns: Type, Title, & Command/Comment.<br>
 
Clicking on an entry in this will allow you to edit it.<br>
 
Clicking on "Add sub" will add a submenu.<br>
 
Clicking on "Add exec" will add a command.<br>
 
  
the type column has several valid options:
+
Note that the "<path to icon>" is optional. If you want to create a submenu the syntax is:
#begin, required to start the menu file. The title option is the menu header.<br>
 
#submenu, a "folder" inside the menu. Title is the name of the submenu.<br>
 
#exec, a command line. Title is what is shown and Command/Comment is the command to be executed.
 
#separator, a divider in the menu. No arguments to this one.
 
#workspaces, a list of workspaces and what applications are running on each. Title is what will be shown to the user.
 
#stylesdir, a directory containing styles. Title is the path to the dir. Recommended that you put this into its own subdirectory as it can get quite large. directories to use: /usr/share/fluxbox/styles ~/.fluxbox/styles .
 
#config, a menu with many options for configuring behavior of fluxbox. Title is the name of the menu shown to the user.
 
#reconfig, reloads the config file. Title is the title shown to the user.
 
#restart, restarts fluxbox. Title is the title shown to the user.
 
#exit, exit fluxbox, will drop back to the desktop manager or exit X depending on the startup method you used. Title is the title shown to the user.
 
 
 
Remember to hit save before closing
 
=====Manualy=====
 
Use comand:
 
nano ~/.fluxbox/menu
 
Then write lines in this style:
 
[exec] (name) {command}
 
If you want to make submenu write:
 
 
  [submenu] (Name)
 
  [submenu] (Name)
 
  ...
 
  ...
 
  ...
 
  ...
 
  [end]
 
  [end]
Then done save and exit. There is no need to restart fluxbox.
+
When you have finished editing, save the file and exit. There is no need to restart Fluxbox. For more information read [http://fluxbox-wiki.org/category/howtos/en/Editing_the_menu.html 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 {{ic|~/.fluxbox/menu}} file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by [[#MenuMaker|MenuMaker]].
 +
 
 +
===== MenuMaker =====
 +
 
 +
[http://menumaker.sourceforge.net 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 {{Pkg|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: {{ic|--no-legacy}} and {{ic|--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.
 +
 
 +
=== Keyboard ===
 +
 
 +
==== Hotkeys ====
 +
 
 +
The Fluxbox hotkey file is located at {{ic|~/.fluxbox/keys}}.
 +
The Control key is represented by {{ic|Control}}. {{ic|Mod1}} corresponds to the Alt key and {{ic|Mod4}} corresponds to Super (not a standard key but most users map Super to the Win key).
 +
 
 +
{{Tip|For volume control hotkeys, see [[Advanced Linux Sound Architecture#Keyboard volume control]] and [[PulseAudio#Keyboard volume control]].}}
 +
 
 +
==== Set the keyboard layout with Fluxbox ====
 +
 
 +
Just add the following line to {{ic|~/.fluxbox/startup}}:
 +
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 {{man|1|setxkbmap}} for more options.
 +
 
 +
To make a help function in your menu, just add in {{ic|~/.fluxbox/menu}}:
 +
[submenu] (Keyboard)
 +
      [exec] (normal) {setxkbmap us}
 +
      [exec] (international) {setxkbmap us -variant intl}
 +
[end]
 +
 
 +
=== Workspaces ===
  
====Hotkeys====
+
Fluxbox defaults to having four workspaces. These are accessible using the {{ic|Ctrl+F1-F4}} 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.
Fluxbox offers a basic hotkeys functionality. fluxbox key file is:
 
~/.fluxbox/keys
 
fluxconf offers a method of editing this in GUI with the command:
 
fluxkeys
 
The Mod1 button corresponds to Alt and Mod4 corresponds to Meta (not a standard key but many map meta to the win key)<br>
 
The First text box is for a button and the second is for an action. select execCommand to set a command and put the name of the command into the 3rd text box.
 
  
More functions of this can be used from the 2nd text box (A drop down menu is available)
+
=== Tabbing and grouping ===
====Workspaces====
 
Fluxbox defaults to having four workspaces available to the user. available with the alt+F1-4 keys or the arrows on the toolbar next to where it says "one"<br>
 
Right clicking on desktop and going to your Workspaces menu (menumaker users: FluxBox>Workspaces, fluxconf users: the workspaces title) will let you interact with the workspaces.
 
Workspaces Menu:
 
Icons - shows minimized applications
 
--separator--
 
Workspaces names (default: one,two,three,four) - Shows all the applications on that desktop
 
--separator--
 
New Workspace - Adds a workspace
 
Edit Current workspace name - lets you title your workspace whatever you want. Will show up on the left side of the toolbar
 
Remove Last - Removes the last workspace on the list, dumps all of the applications running on that desktop into the one before it
 
====Background====
 
Setting the background requires a background setter you will need to install one of these packages:
 
*eterm (recommended)
 
*feh (lacks menu transparency)
 
there are others but these are the most recommended two, to see others check out the fbsetbg documentation in the "Additional Links section"
 
To set the background:
 
fbsetbg /path/to/background.image
 
Fluxbox however does not set your background on bootup however you can make it do so by adding the below code to a bootup script, covered below:
 
fbsetbg -l
 
  
(It is of use only if you have previously issued the command with a valid image)
+
With at least two windows visible on your desktop use {{ic|Ctrl+left click}} 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 {{ic|Ctrl+left click}} on a tab and drag it to an empty space on the desktop.
  
You can also add (or modify) the following line to the file ~/.fluxbox/init to something like this:
+
=== Autostart ===
session.screen0.rootCommand: fbsetbg /path/to/wallpaper
 
  
Or simply:
+
Fluxbox provides functionality to autostart applications. The {{ic|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting Fluxbox itself. The {{ic|#}} 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.
session.screen0.rootCommand: fbsetbg -l
 
  
 +
=== Wallpaper ===
  
Additional notes for people who like to change wallpaper a lot.
+
Fluxbox provides a wrapper script ''fbsetbg'' which can help one to set the wallpaper. Please refer to the [http://fluxbox-wiki.org/category/howtos/en/Howto_set_the_background.html 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]
  
Place the following submenu in your fluxbox menu
+
Then put your background images into {{ic|~/.fluxbox/backgrounds}} or any other folder 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)
 
  [submenu] (Backgrounds)
  [wallpapers] (~/.fluxbox/backgrounds)
+
  [wallpapers] (/path/to/your/backgrounds) {feh --bg-scale --no-xinerama }
[wallpapers] (/usr/share/fluxbox/backgrounds)
 
 
  [end]
 
  [end]
  
Then put your background images into ~/.fluxbox/backgrounds or any other folder you specify, they will then appear in the same fashion as your styles.
+
==== Using feh with Fluxbox ====
 +
 
 +
Install {{Pkg|feh}}.
 +
 
 +
To make sure Fluxbox will load feh background next time start:
 +
 
 +
'''1.''' Make {{ic|.fehbg}} executable:
 +
$ chmod 770 ~/.fehbg
 +
 
 +
'''2.''' Then add (or modify) the following line to the file {{ic|~/.fluxbox/init}}:
 +
session.screen0.rootCommand: ~/.fehbg
 +
 
 +
'''3.''' or add (or modify) the following line to the file {{ic|~/.fluxbox/startup}}:
 +
~/.fehbg
 +
 
 +
=== Theming ===
 +
 
 +
To install a Fluxbox theme, extract the theme archive file to a styles directory. The default directories are:
 +
* Global    - {{ic|/usr/share/fluxbox/styles}}
 +
* User only - {{ic|~/.fluxbox/styles}}
 +
 
 +
The {{AUR|fluxmod-styles}} package contains a number of Fluxbox styles from the (now defunct) fluxmod.dk site.
 +
 
 +
To create your own Fluxbox styles, please refer to [http://fluxbox.org/help/man-fluxbox-style.php fluxbox-style(5)], [[Fluxbox/Style guide]] and [http://tenr.de/howto/style_fluxbox/style_fluxbox.html 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 {{ic|~/.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]
  
====Theming====
+
=== The Slit ===
Links to some theme sites are provided below.<br>
 
To install a theme extract the archive to a stylesdir the default ones are:
 
*global    - /usr/share/fluxbox/styles
 
*user only - ~/.fluxbox/styles
 
====Autostarting Applications====
 
xinitrc users should put all code into their .xinitrc. However, fluxbox provides functionality to autostart applications on its own.<br>
 
The ~/.fluxbox/startup file is a script for autostarting applications as well as starting fluxbox itself.<br>
 
The <nowiki>#</nowiki> symbol denotes a comment.<br>
 
  
a sample file:
+
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 [http://www.dockapps.net/ dockapps.net] to see what dockapps are available.
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.
 
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately.  
 
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.
 
idesk &
 
xterm &
 
<nowiki>#</nowiki> exec is for starting fluxbox itself, don't put an ampersand (&) after this or fluxbox will exit immediately
 
exec /usr/bin/fluxbox
 
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:
 
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log
 
  
===Additional Links===
+
== See also ==
  
* [http://fluxbox.sourceforge.net/ Fluxbox Homepage]
+
* [https://github.com/fluxbox/fluxbox Fluxbox on Github]
* [http://gentoo-wiki.com/HOWTO_Fluxbox gentoo-wiki Fluxbox HowTo]
+
* [http://fluxbox-wiki.org/ Fluxbox wiki]
* [http://www.gentoo.org/doc/en/fluxbox-config.xml gentoo Fluxbox Documentation]
+
* [https://wiki.gentoo.org/wiki/Fluxbox Gentoo Wiki about Fluxbox]
* [http://box-look.org/ Themes for Fluxbox]
+
* [https://www.box-look.org/browse/cat/139/ord/latest/ Themes for Fluxbox]
* [http://fluxbox-wiki.org/ Fluxbox Wiki]
+
* [https://jlk.fjfi.cvut.cz/arch/manpages/man/fluxbox.1 Fluxbox man page] (plus related fluxbox manpages such as fluxbox-keys)
* [http://www.xs4all.nl/~hanb/software/fbsetbg/fbsetbg.html fbsetbg documentation]
+
* [https://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox Guide]
* [http://archux.com/page/application-recommendations Application recommendations]
+
* [https://bbs.archlinux.org/viewtopic.php?id=90260 Arch Linux Fluxbox screenshots]

Latest revision as of 10:13, 15 May 2019

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 user config files are:

Menus

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

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.

Keyboard

Hotkeys

The Fluxbox hotkey file is located at ~/.fluxbox/keys. The Control key is represented by Control. Mod1 corresponds to the Alt key and Mod4 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 ~/.fluxbox/startup:

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]

Workspaces

Fluxbox defaults to having four workspaces. These are accessible using the Ctrl+F1-F4 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 Ctrl+left click 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 Ctrl+left click on a tab and drag it to an empty space on the desktop.

Autostart

Fluxbox provides functionality to autostart applications. The ~/.fluxbox/startup 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 ~/.fluxbox/backgrounds or any other folder 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:

$ chmod 770 ~/.fehbg

2. Then add (or modify) the following line to the file ~/.fluxbox/init:

session.screen0.rootCommand:	~/.fehbg

3. or add (or modify) the following line to the file ~/.fluxbox/startup:

~/.fehbg

Theming

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

  • Global - /usr/share/fluxbox/styles
  • User only - ~/.fluxbox/styles

The fluxmod-stylesAUR 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.

See also