dwm-flavored CTWM
I first encountered TWM
while working on a project for an information security course I took
during my years at Wisconsin. I fell in love with its simplicity and
late 80's/early 90's aesthetic, and pretty soon I began using it at home.
Over the years since I've continued using TWM, mostly switching back and
forth between it and dwm.
Recently I migrated to a new machine, and deciding to go with a floating
window manager setup, I installed and configured TWM as I have in the past.
But I quickly began to miss some of the features I had gotten used to
with dwm. So I got to merging the two and created a nice little window
manager configuration that I'm fairly pleased with. Here's how I did it:
First, TWM doesn't support virtual desktops; for that, we'll need to
swap out TWM for CTWM (an old TWM
fork). This move, however, brings about its own problems. According to the
man pages of both TWM and CTWM:
When new windows are created, twm will honor any size and location information requested by the user (usually through -geometry command line argument or resources for the individual applications). Otherwise, an outline of the window's default size, its titlebar, and lines dividing the window into a 3x3 grid that track the pointer are displayed. Clicking pointer Button1 will position the window at the current position and give it the default size.
Despite this, it's been my experience that CTWM never prompts the user
for new window placement like TWM does. In order to address this discrepancy, I
created a
patch
for CTWM to always force this behavior.
After building and installing this patched version of CTWM, we install
dmenu and configure a
.ctwmrc that enforces several standard dwm
keyboard shortcuts, including pressing Mod1-[1..n]
to switch to the nth virtual desktop.
Here is an example screenshot of the resulting product:
For the complete configuration, see my
dotfiles git repository.
There you can find the configuration files both for CTWM and dmenu.
© 2024 Stephanos Pavlou