The Fluxbox Windowmanager18 Apr
This article is part 4 of a series.
What fascinates me about Fluxbox is its history. It has been around for a very long time (since ~2001), is still actively developed and has a devoted user base. In its early days it must have been the number one alternative window manager / desktop environment for all the leet & stylish linux hackers.
How nice is that!
So we have a lot of heritage to work through. Ambitious side projects to make it into a full but lightweight desktop environment mostly came to a standstill, but are still maintained or at least hosted by enthusiasts (I presume).
Fluxbox, as it is now, seems to be concentrating more on being a good window manager, and leave utilities to third parties. It has a lot of good features, but also some that are better left unused or are in dire need of revision & improvement. My opinion of course.
Fluxbox is in practically all Linux distros' repositories. Installation should be trivial.
Version installed and tested:
Fluxbox 1.3.7 : (c) 2001-2015 Fluxbox Team on Arch Linux.
I don't know if it comes with a session file; probably not. If you don't use a login manager, you can use the method described here.
After first login you should be presented with a bottom panel (incl. a systray) and a right-click menu.
If I remember correctly, fluxbox creates the
~/.fluxbox folder and fills it with all config files necessary, with sane defaults.
Fluxbox comes with a few utilities:
/usr/bin/fbrun /usr/bin/fbsetbg /usr/bin/fbsetroot /usr/bin/fluxbox /usr/bin/fluxbox-generate_menu /usr/bin/fluxbox-remote /usr/bin/fluxbox-update_configs /usr/bin/startfluxbox
fbrun: A simple launcher - too limited for my taste, dmenu_run I use
fbsetbg: a wrapper that searches for a suitable wallpapersetter, I think fluxbox uses this internally, but can be used directly too
fbsetroot: a native wallpaper setter - can also create mod patterns
fluxbox-generate_menu generates menus, but I soon replaced it with trizen's fbmenugen
fluxbox-remote sends commands to a running fluxbox instance, very useful in scripts
fluxbox-update_configs is better left untouched
startfluxbox will start a fluxbox session, but I already have a mechanism in place for that.
If you want to know more, you should start here.
You can find current versions of all man pages there, and that's what I mostly used to configure it. Unfortunately, someone decided to rework the fluxbox wiki, but relied too much on community contributions it seems - the new wiki is practically empty, and as a result most links on fluxbox.org are broken. But you can fix them by prepending
old. to the URL, so that
This is quite important for me, I must have a few simple keyboard shortcuts to position windows side by side, and the window manager must be able to position newly opened windows intelligently into the remaining space. Fluxbox handles this quite well (but once again the comparison to openbox forces itself upon me, and I must say that openbox handles it better). Just take a look at my keys file; it also contains some more interesting bits & tricks.
Styles are stored in a styles folder and the fluxbox menu has a
[stylesdir] directive, so you can apply styles straight from the menu.
The style file is called theme.cfg (one of the many little inconsistencies of fluxbox) and for someone who has spent a lot of time with openbox theming
the format is easy to grasp. 1
Fluxbox has a big additional feature over openbox - it can use full color pixmaps for almost all styleable areas.
But this feature quickly becomes a non-feature when you examine it:
- an element's height needs to be precisely the height of the pixmap (I haven't tried what happens if you ignore it, but it will certainly look ugly)
- transparency is not supported, so one has to carefully style the button pixmaps and other background pixmaps to integrate seamlessly (dude, that is so 2002)
I couldn't accept that I can't just use a simple .xbm to shape a button, like in openbox, so I spent a frustrating hour trying things and reading scattered documentation until I could finally accept it. I hate the looks of the built-in default buttons. I am working on a theme that does not use pixmaps yet reduces the ugliness of the default buttons as much as possible.
So now go and get yourself some themes - I think even the oldest are still compatible, and so you have a huge pile to choose from. I bet your distro has some extra packages, too.
If not, just go here and download the two tarballs, and extract to
~/.fluxbox/styles (although you'll soon find that you can put them elsewhere, too).
I applaud the idea of having a special style folder item for the menu, but without previews
it is of little use to me. Unfortunately fluxbox does not come with a graphical application to choose styles, like openbox'
obconf. There is one very old app called
cutting the story short, I forked it because it needed some changes to even run on my system.
I also added a script that creates preview images according to some unofficial rules and copies the theme around to avoid writing to system directories.
If you use Archlinux, all tenr styles are in the AUR and you can configure your
~/.fluxStyle.rc like this:
# No need to add ~/.fluxbox/styles it is the default location and if it is listed it will # be ignored. STYLES_DIRS:Global,/usr/share/fluxbox/styles:tenr 1-100,/usr/share/fluxbox/tenr_styles/1-100:tenr 101-200,/usr/share/fluxbox/tenr_styles/101-200:tenr 201-300,/usr/share/fluxbox/tenr_styles/201-300:tenr 301-400,/usr/share/fluxbox/tenr_styles/301-400
I also found some even older styles here and bunched them together - who knows when that piece of internet and linux history will go down forever...
At the same time I grabbed the old documentation because I noticed that it's not easy getting both up-to-date & complete documentation for fluxbox.
Fluxbox has its own pager (that's a workspace switcher) called fbpager - but it sucks, full stop. All other standalone pagers seem to suck also, one way or another: bbpager, ipager, netwmpager...
I managed to get bbpager to work & look fairly good (if it's in the slit, its borders will take the style of the current fluxbox theme), please see the gallery below.
One configuration is included in this theme I modified.
Unfortunately, it behaved strangely when autostarted and I had to revert to this ugly hack in my autostart script:
( bbpager -w > $HOME/.bbtools/bbpager.log 2>&1 & sleep 1; fluxbox-remote restart ) &
Constantly getting this warning?
Warning: Failed to open file(fluxbox.cat) for translation, using default messages.
It means that your locale is not in
cd /usr/share/fluxbox/nls sudo ln -is en_US.UTF-8 $(locale | grep LANG | cut -d= -f2)
Adjust to taste.
In the beginning I really liked the thought of having a panel (toolbar) as part of the window manager. But fluxbox' toolbar is very limited. most things I can do without, but not a pager.
So in the end, instead of using a separate pager or some other hacky solution, I dropped the toolbar completely2 and went back to my good old tint2 workflow (see gallery below).
Fluxbox has so many good features, and its configurability, its config file structure with its plain format is ideal for a knob twiddler like me (see my enclosed bundled configuration), but some things are just too hacky (e.g. window icons) and, more importantly, have been like that for many years.
I found myself comparing it to Openbox all the time, trying to make it more like openbox. I think I should have a separate round of fluxbox vs. openbox sometime.
- My fork of fluxStyle
- A theme I hacked
- Another theme I hacked
- My fluxbox configuration files
- Old fluxbox documentation in HTML
- A bunch of really old styles
- tenr styles
- fluxmod styles, hosted by tenr
Another of these inconsistencies: if you do this from the configuration menu, the systemtray will still be in use, even though it's just not there. You have to disable it in
session.screen0.toolbar.visible: false session.screen0.toolbar.tools: prevworkspace, workspacename, nextworkspace, iconbar, clock <== no tray in this list