Bye dwm, Welcome Back ratpoison

I wrote back in April that I would try dwm at least a week. I gave it quite a big longer. The experiment is over. Here’s why I’m using ratpoison instead of dwm…

  1. more screen real estate
  2. simpler navigation
  3. no zombies
  4. reconfiguration doesn’t require recompile
  5. can split but not by default

There’s a lot I like about dwm. Ultimately, though, it doesn’t suit my tastes or needs.

If you notice, a lot of my screenshots show screen sessions (like the one above). I think screen is my most-used utility/”window manager” and that means I really don’t need a status bar — screen has its own if a user chooses to leave it on (I do for a few reasons: I usually have more than one app running in each session, I run sessions from multiple computers via ssh, etc.). I realize the status bar in dwm can include just about anything via pipe, but I noticed the hit on CPU use because of the sleep + command used. For some users that would be trivial. To me it wasn’t because I was left with the default version number in a corner plus virtual window/tag names across the screen. That left a little region for app information. Convenient? No, because it only shows what’s currently open — much like a window title bar. I finally started using lsw, another nice tool from suckless, to both list windows in console as well as pipe out to dmenu.

I think ratpoison handles all that better. I can list the windows with my escape (ctrl-z) and w. I can also use lsw in ratpoison. Like I said above, I know I can pipe it to dmenu — which I’m also using in ratpoison. I need to work on this more because it’s not working the way I want. For example, I can successfully switch to an application like opera but selecting any open window in opera (they each list separately) causes me to switch to opera with a new open tab. This is on the backburner for now.

Speaking of dmenu, I read through a lot of blogs and forums where users said they were using dmenu with ratpoison. Many of them talked of scripts to use dmenu in ratpoison. I don’t know what’s so difficult that requires a script. I have an entry for it in my .ratpoisonrc and it works just as well as in dwm (only I use ctrl-z-P to open it):
bind P exec $(dmenu_path | dmenu)

Here it is atop mc. I edited the colors in dmenu’s config.h so it stands out from the black background in a subtle way:

Easy enough. I may experiment with more such commands piped to dmenu so I can bind a list of console apps to open directly in aterm (which I compiled as my default terminal instead of xterm) rather than binding “aterm -e” for each of them.

Anyway, I was willing to give up the dwn status bar and get back another line or so in each window.

Another thing that didn’t suit me was the number of variables to navigate windows. I think the best solution to this kind of thing is the way ion handles it with tiled tag headers/title bars so navigation is fairly straightforward. You can see what you have in any given region even if it’s not what’s presently visible. In dwm, the title bar is what you see. You have to either list windows (lsw) or toggle with alt-j and alt-k to see if there’s anything else in that particular region.

I realize ratpoison is similar in that there’s nothing but escape-w to list windows. You can escape-n/p through blindly if you want. But there’s no sacrifice of screen space to do it — with dwm, you give up  several pixels of height across the top of the screen to list tags, current window in view, and either the dwm version or whatever you choose to pipe to it.

My last dwm config.h reduced my tags to two: local and remote. Then I figured out that even that simpler configuration was excessive and I only needed one. And that I didn’t need a status bar to show me what I was doing — if anything, I needed one that showed me what was “behind the veil” of what I’m currently working on rather than what I’m presently working on. I think I can distinguish the interface for vim from mc from vifm from firefox from sylpheed without 800×15 (for this monitor) pixels across the top to tell me. Use that space to tell me what else is open, what else is available, what I can’t see — like ion does — or don’t take up that much space. Even with jwm I can edit the configuration file(s) so I get exactly what I want, where I want, the way I want. Maybe I can edit the dwm config so I get a list of unseen open windows instead of current seen open window. But my use of dwm was already more and more like ratpoison except with different keybindings and recompile to reconfigure.

I set dwm up to run monocle mode by default, so it was more like ratpoison with each app window taking up the full screen rather than automatically splitting things up in each view. I don’t care much for split windows, especially since most of my monitors are 800×600. There are times when I appreciate such features but not by default. At least dwm makes changing that fairly easy. I think ratpoison does it better by leaving everything full size unless the user decides to split things up himself or herself. There was really little I was doing differently in dwm with respect to ratpoison. The only differences were dwm accessories like dmenu and lsw, each of which is agnostic when it comes to use in window managers. I’ve also used both in jwm and other window managers, binding it to similar keystrokes each time (like I wrote above, in ratpoison I chose to simply mix the ratpoison escape sequence with the dwm default of P).

I also noticed that every restart of dwm gave me zombies for dwm, xset (for my beep and font paths), and sometimes for xsetroot. Not exactly a problem, but I wondered what in the world was causing that. In contrast, I can kill ratpoison or kill X or use the ratpoison command :restart and no zombies.

Finally, reconfiguring dwm to change colors, keystrokes, etc., gets a little old. I finally stopped messing with that and installed xbindkeys, added another dmenu for my scripts to manage certain things, and so on. With ratpoison, I edit one file and restart.

One thing I have to say is ratpoison uses a bit more memory than dwm. The VSZ of dwm was 2300 while ratpoison’s is 2488; RSS for dwm was 928 to 1104 for ratpoison. Not drastic, but worth mentioning.

Both are fine window managers and neither is ideal for everyone. I just think the dwm status bar is a bit of useless frippery and simple changes shouldn’t require recompiling an app no matter how small it is in LOC or how simple it is to edit. So ratpoison suits my tastes and needs a little better.

One Response to “Bye dwm, Welcome Back ratpoison”

  1. Not Sure (@bob99901) Says:

    Have used ratpoison for years. Appreciate the hint about dmenu! Currently running on my iMac. I get tired of all the frippery.

Leave a Reply to Not Sure (@bob99901) Cancel reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: