dwm notes
It’s funny how the dislike one develops as a novice user towards severe minimalism and its intimidating terminal interface turns a corner. It has certainly been the case with me. I mean, as an end user of Domain/OS back in 1996, I’m no stranger to window managers. I had a job to do, and I was given these Apollo systems to build models and carry out structural analyses on and I did. It’s only when ubuntu began shipping a user-friendly system around 2004-5 was when I began warming up. If I was offered a window manager as a UI instead of Gnome 2.x, then I’d have flinched and said no.
2007 was the year of linux on desktop, but since then the interfaces have been going downhill. My Atom-powered, and generally fine, tiny desktop started feeling out of breath with the new xubuntu, forcing me to look for a simpler interface without swapping its guts. So I switched to ubuntu 16.x and chose dwm — window manager with a pedigree, as my primary interface.
A couple of weekends ago I’d edit header files and compile C code just to get my customised version of dwm and other suckless tools running. Here’s that routine.
Installation
- Install ubuntu (16.04.1 as of this post) as usual ([a] download the iso, [b] make a bootable usb stick, [c] boot from the usb, and install it on hard drive).
-
Install a few libraries to help compile suckless-tools:
sudo apt-get install suckless-tools libx11-dev libxft-dev libxinerama-dev -
To download suckless tools, get
gitfirst:sudo apt-get install git-core -
Download suckless tools (dwm – dynamic window manager, dmenu, st – simple terminal, surf – web browser):
cd Downloads git clone http://git.suckless.org/dwm git clone http://git.suckless.org/dmenu git clone http://git.suckless.org/st git clone http://git.suckless.org/surf -
Compile each tool within its downloaded folder:
cd ~/Downloads/dwm make && sudo make install cd ~/Downloads/dmenu make && sudo make install cd ~/Downloads/st make && sudo make install cd ~/Downloads/surf make && sudo make install -
Logout, and at the login drop down window (click on ubuntu icon to reveal the dropdown), select dwm.
-
Optional: Custom font setting for
dwm(editconfig.hand recompile withmake && sudo make install):static const char *fonts[] = { "Ubuntu Mono:size=13" }; static const char dmenufont[] = "Ubuntu Mono:size=13"; -
Optional: Custom font setting for
st(editconfig.hand recompile withmake && sudo make install):static char font[] = "Ubuntu Mono:pixelsize=16:antialias=true:autohint=true"; -
Optional: Set (auto-updating) clock in the status bar by saving this following in
.xprofile:# Statusbar loop while true; do xsetroot -name "$( date +"%F %R" )" sleep 1m # Update time every minute done & -
Optional:
sthas no cut-paste option, so installxclipwithsudo apt-get install xclipand setalias xclip="xclip -selection c"in~/.zshrc, and then usecat somefile | xclip
Useful commands
Alt+P– Access menuShift+Alt+Return– New terminal windowShift+Alt+C– Close windowShift+Alt+Q– Close session (logout)surf– Open surf browser,Ctrl+GAccess URL barAlt+H– Resize tile window on the left hand sideAlt+L– Resize tile window on the right hand sideeog– Image viewernautilus --no-desktop– Access file manager
There’s a nice introductory video by Jason Ryan, if you’re not familiar with dwm.