My Window Manager Environment Desktop

Hello readers!

This is going to be another one of those Linux posts that I put up here for my own reminders. I don’t know if anyone else will ever read or appreciate these, but I’ve found them helpful. To wit:

The Desktop Environment vs. Window Manager debate. Lots of people who use Linux spend time deciding on which Desktop Environment they want to use. Windows users don’t really have that option: Microsoft chooses your Desktop Environment, and that’s the end of it. That’s why Windows 98 looked so different from Windows XP, which looked different from Windows 7, which looked different from Windows 8, to Windows 10 and 11. (I bought a new computer last month, and I was *shocked* at how much Windows 11 looked like… a Linux desktop called Gnome. I hated it, but I’m not a Gnome fan.)

Some Desktop Environments have lots of “bells and whistles”, like the aforesaid Gnome, and another one called KDE, or Cinnamon. Other Desktop Environments are a little more lightweight, like XFCE, MATE, or Enlightenment. But regardless of how much how memory they consume, what seems to define a Desktop Environment is a pre-selected collection of programs, like a file manager, default text editor, image viewer, wallpapers, and the interface used to log in and log out of the local system.

A Window Manager, on the other hand, is pretty much JUST controlling the window itself. Window managers tend to be faster and use less memory (because they only take care of the window itself). If you own a computer with not very much memory, you would see much better response with only a window manager than by running an entire Desktop Environment.

Personally, I am a big fan of a very small and versatile window manager called JWM (Joe’s Window Manager). It’s very small, VERY fast, and has the ability to do almost everything that a larger full-fledged desktop environment can do… with a fraction of the memory footprint. It has its own tray/panel function, which is a big part of how modern desktops look.

I very much enjoy tweaking JWM to make it function exactly the way I want it… but whenever I have to reinstall JWM onto a new computer, I often find that I’ve forgotten how much customization I’ve done. SO… I’m going to put all my tweaks in here, so that I have a place to remember what I’ve done.

FIRST, let’s start with the menuing system. I don’t want to have to hunt down and find every program and type it into the .jwmrc configuration file, so I use a program called xdgmenumaker. Here’s how to do that:

sudo apt install make txt2tags python-xdg python-gtk2
git clone https://github.com/gapan/xdgmenumaker.git
cd xdgmenumaker
make
sudo make install

Once the program is installed, you’ll run

xdgmenumaker -i -f jwm > yourmenufile.txt

which will create a txt file with your JWM formatted menus, suitable for import into your .jwmrc file.

SECOND, there are a few programs that need to be installed for me to have the Tray act the way I want. The biggest pain is that the program I like the most for controlling the volume is called pa-applet, and it’s old enough to have been removed from the current repositories. So, I have to compile it from scratch. Here’s how to do THAT.

Go to

https://github.com/fernandotcl/pa-applet

and read the instructions. Download the zip, unzip the file, install the pre-requisites to build the program {sudo apt install build-essential libpulse-dev libnotify-dev libgtk-3-dev libglib2.0-dev checkinstall}, complile the program {./autogen.sh && ./configure && make}, and make the package (so you don’t have to do this again) {sudo checkinstall}.

Now that the program has been created and installed, you have to tell JWM to use it. For this, we use

    <StartupCommand>

. Here’s the ones I use –

    <StartupCommand>cbatticon</StartupCommand>
    <StartupCommand>thunar --daemon</StartupCommand>
    <StartupCommand>nm-applet</StartupCommand>
    <StartupCommand>pulseaudio -D</StartupCommand>
    <StartupCommand>pa-applet</StartupCommand>
    <StartupCommand>/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1</StartupCommand>

cbatticon gives me a battery usage icon; thunar –daemon makes my USB’s show up when I plug them in; nm-applet is my wifi monitor; pulseaudio -D makes sure I’ve got sound; pa-applet is my volume control; and the policykit line does a bunch of stuff in the background that I need.

THIRD, we want make sure that the panel (called a Tray in JWM) is vertical, and over on the left (because that’s how I want it, dang it!). So, here’s the entry for that:

    <Tray layout="vertical" x="0" y="0" width="34" height="1080" autohide="false">

This tells me that my Tray will be vertical, start in the upper left corner (0,0), be 34 pixels wide, and 1080 pixels tall. Now, I add what I want in the Tray:

    <TrayButton tooltip="" icon="/home/ed/Pictures/xodos-button.png">root:1</TrayButton>

This is my main menu section, usually at the beginning of the .jwmrc file. It can be followed by any number of

    <TrayButtons>

which are quick launchers of individual programs: I usually load the programs I use all the time here: a browser, a file manager, that kind of thing. Think of them as tiny icons that don’t take up any extra screen space.

    <Spacer width="10" height="10"/>

This is a nice little separator before the next bit.

    <TaskList maxwidth="20"/>

This is where all the currently running programs are shown. I can see what programs I’m running here, and can swtich between them (or close them) from the TaskList.

    <Spacer/>

Another spacer… but since this one has no specific size attributes, it just expands to fill the available space. It puts a visual separation between the top part and the bottom part of the Tray.

    <Pager  height="30"/>

The Pager gives me a way to see what programs are running on which desktops. Oh, that’s right – if you’re in Windows, you probably don’t know much about virtual desktops, a function which has been in Linux for YEARS. I can set up as many virtual desktops as I want: if I want a 9×9 grid of desktops, it’s very easy to set up. I usually just use two of them, stacked vertically. That control is also kept in the .jwmrc file. The Pager is the little screen area that shows me if there’s something running on the other desktop.

    <TrayButton icon="/home/ed/Pictures/JWMtrayicon_mintupdate.png">exec:mintupdate</TrayButton>
    <TrayButton icon="/home/ed/Pictures/JWMtrayicon_bluetooth.png">exec:blueman-applet</TrayButton>

These two buttons launch the programs that control updates, and Bluetooth functionality.

    <Dock/>

The Dock is where all the notifications show up from any program that wants to let me know they’re working. This is where the battery usage indication shows up, the volume control, and the wifi status.

    <TrayButton icon="/home/ed/Pictures/JWMtrayicon_brightUP.png">exec:brightnessctl set 15%+</TrayButton>
    <TrayButton icon="/home/ed/Pictures/JWMtrayicon_brightDOWN.png">exec:brightnessctl set 15%-</TrayButton>

I decided here that I would create a simple little control that would let me adjust my screen brightness. I know there are keys on the laptop itself which do this, but when I’m using my laptop late at night, I can’t easily see those function keys… so these little buttons control my brightness. I had to install this particular program (brightnessctl).

    <Swallow name="xload" width="34" height="34">
    xload -nolabel -bg black -fg orange -hl white
    </Swallow>

The Swallow attribute allows me to place the entire output of a program into the Taskbar itself. Not all programs do well with being Swallowed, but xload, a system monitor which shows me how hard my CPU is running, works great.

    <Clock width="20" height="34" format="%l:"></Clock>
    <Clock width="20" height="34" format="%M"></Clock>

So, my issue with the Clock – if you put both entries (%l:%M) on one line, you get a smushed clock with doesn’t always display well. And I don’t feel like installing a special tall font, or some weird digital looking thing from the late 70’s, so I split the display into two lines: the (%l:) displays the hour and the colon separator, and the (%M) displays the minutes below.

    </Tray>

and THAT closes the tray.

THERE. That should be sufficient to remind me about what I’ll need to do if I ever have to rebuild my JWM setup from scratch. Oh, I almost forgot – Dear Reader, you might be wondering WHY I go to all the work to set this up. Well, let me show you the memory usage of XFCE (a pretty lightweight Desktop) and compare that with JWM’s usage:

XFCE = 846,520
JWM = 243,256

XFCE is almost 3.48 times LARGER in memory than JWM. For me, that’s significant… and JWM starts REALLY fast.

So, that’s it for this post – I have no idea if ANYONE will ever read this… but I wanted to have this information someplace on the cloud, just in case I need it in a few years…

KFJ – Ed

1 Response to “My Window Manager Environment Desktop”


  1. 1 Anonymous December 5, 2022 at 2:36 am

    “I have no idea if ANYONE will ever read this” Well, I did and found it interesting. Being a fan of XFCE for my linux systems, I haven’t look around for other Desktop Environment for ages. But your assessment about the memory usage is striking (“XFCE is almost 3.48 times LARGER in memory than JWM”). JVM is well known but I never felt like trying it because I thought it would be too basic. OK, I will give it a try. Thx for the tip Pastor, and greetings from ol’ Europe.


Leave a comment




Pastor Ed Backell

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 314 other subscribers