Playing Around with dwm
I use i3 as my main window manager but I like to play around with others so I know what’s out there. One of the window managers that I find very interesting is dwm. It is a very small window manager, about 2k lines of code and you configure it my changing a header file and re-compiling. Definitely not beginner-friendly!
To make playing easier I wanted to run dwm inside i3, that way I don’t have to keep logging in and out. I could have used a VM but the same problem would exist. Below is the shell script I use to do this. I found out how to do this from LinuxExchange.
#!/bin/bash xhost +local:<USER> Xephyr -screen 800x600 -reset -terminate -extension GLX 2>/dev/null :1 & export DISPLAY=:1 ./dwm ./dwm
For some reason I need to run dwm twice before it works, the first time it says “dwm: cannot open display”. Anyone know why this is happening? Below is a screenshot of dwm running emacs, it is the bottom right panel. The panel to the left is emacs editing the config.h file.
So far I have modified the background colour of the status bar and set the status message. To set the status message all you need to do is set the WM_NAME property of the root window. Most systems have a utility that lets you do this in the command line.
xsetroot -name “Hello World”
You can also use this utility to change the background colour, I did a similar thing for i3.
xsetroot -solid “#222222″