Make a pretty Fvwm desktop on FreeBSD

Make a pretty theme for FVWM2 on FreeBSD

Make a pretty Fvwm desktop on FreeBSD

I’ve known that fvwm could be customized and prettied up but hadn’t really messed with customizing it until now. I started off with fvwm and afterstep back in the day so I still get a little nostalgic when I see anything with a fvwm feel to it. OpenBSD has fvwm as the default window manager instead of twm and I’ll usually worry about installing a window manager later since fvwm gets the job done.

I was looking around and ran across PEM’s Fvwm page and decided I wanted to give this theme a go. I really liked that the topbar, dock, etc. weren’t some addons but they are just built-in Fvwm modules. There’s a lot of shortcuts and tweaks for things like 3ddesktop, pseudo transparency, weather popup, icon thumbnails, etc. The icons for battery, wireless and sound all change to match the varying levels of each. The config is very modular and makes it easier to tweak. Most of the apps are setup as variables so you just fill in the variables in the ~/.fvwm/config with your terminal/browser/etc. of choice and it uses that everywhere else. It also can use gnome icon themes easily (I’m still using the gnant theme).

The one downside to this theme is that everything is hardcoded to the screen width (height doesn’t matter since it’s relative to top and bottom). I worked around this by making versions for 1024, 1280, 1400 and 1600 and making a script that copies them into place. I call the script (~/.fvwm/scripts/resolution.sh) from my ~/.xinitrc. Since X is running when .xinitrc is invoked, you can grep the resolution from xdpyinfo and copy the correct config before the window manager starts.

There’s a bunch of scripts in here that rely on Linux’s /proc, /dev/shm, etc. so I knew I’d have to rewrite some of the scripts for FreeBSD. The sysctls made this part of it a lot easier than I thought it was going to be since their output was what I was looking for. There’s sysctls for battery runtime, battery percentage and a whole lot more. There were some interesting ways to grab the info from proc on Linux so I was expecting worse. There’s a long thread on fvwm’s forums and it might be linux-centric but there’s a lot of good info because there’s a lot about the configs and application setup. I also posted a thread on Screaming Electron Forums discussing my fvwm desktop too.

This relies on the 2.5.x fvwm (fvwm2-devel port) since it added new features and the new layout. I also used xosd for battery and wireless output. Everything else (mixer, icon theme, browser, terminal, etc.) can be set as a variable in the ~/.fvwm/config. It will automatically start 3ddesktop when it loads if you have it installed (nice cool factor to have). I have a link for my configs, the gnant icon theme and the background here if you want to use them. Extract the config to your home, put the icon theme in /usr/X11R6/share/icons and copy the background to ~/pics/.current (or change the path in the config but still name it .current) to autoload.

Before:

After:

Sample Wireless output:

Configs:

fvwm configs

gnant icon theme

background

I haven’t gotten everything ported to FreeBSD yet and there’s more tweaking that could be done to this. I’ll make updated versions of this as I go but I wanted to get this going. The weather script needs fixing, the wireless icons should change with signal strength, etc. I’d be happy to add any tweaks someone wants to send me.

Even if this theme doesn’t float your boat you could check out Fvwm Crystal Theme, fvwm forum configs or the fvwm wiki for more ideas. Fvwm is extremely customizable but you have to dig into it to make your own.

Mastodon