Install dwm (Dynamic Window Manager)
Published at 2026-04-04 11:31
This tutorial is a continuation of:
DIR 🐧 Arch Linux Installation
It assumes you already have a working Arch Linux system.
dwm is a minimal, fast, and highly customizable tiling window
manager written in C. It follows the suckless philosophy: simple,
clean, and efficient. This tutorial is for the official dwm
installation.
A lot of people, including me, have their own builds (with patches
and customizations) of dwm. If you would like to take a look at my
arch/dwm/slstatus build you can see it at:
HTML GitHub Repo Arch + DWM
It has a handy install script that makes it easier to install.
The README files should contain all the info you need. The
config.def.h in dwm and slstatus have comments to help you
customize your own dwm and slstatus.
Let's install, for now, the official, unpatched DWM ...
More info and documention are on:
HTML dwm official website
Requirements
‾‾‾‾‾‾‾‾‾‾‾‾
Before installing dwm, make sure you have:
* a working Xorg installation
* gcc
* make
* libX11
* libXft
* libXinerama (optional, for multi-monitor)
On Arch Linux:
sudo pacman -S base-devel libx11 libxft libxinerama xorg
xorg-xinit xorg-server
Download dwm
‾‾‾‾‾‾‾‾‾‾‾‾
Clone the official repository:
git clone https://git.suckless.org/dwm
cd dwm
Configuration
‾‾‾‾‾‾‾‾‾‾‾‾‾
dwm is configured by editing the file `config.def.h`
Copy it:
cp config.def.h config.h
Edit `config.h` to customize:
* keybindings
* fonts
* colors
* layout behavior
Read the comments. It's all explained and you can easily
customize dwm to your liking!
Install
‾‾‾‾‾‾‾
sudo make install
Running dwm
‾‾‾‾‾‾‾‾‾‾‾
Add to your ~/.xinitrc:
exec dwm
If you are starting other processes make sure they are before
exec dwm (notice the & at the end of the commands - it runs the
processes in the background as daemons):
# set wallpaper
feh --bg-scale ~/Work/dwm/wallpaper.jpg &
# start dunst notification daemon
dunst &
# start custom bash script
/home/sava/.config/scripts/music_notification.sh &
#start slstatus
slstatus &
# start dwm
exec dwm
and then start X:
startx
Default Keybindings
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Mod key = Alt or Super
* Mod + Enter → terminal
* Mod + j / k → focus
* Mod + Shift + q → quit
* Mod + d → launcher (if configured)
Patching dwm
‾‾‾‾‾‾‾‾‾‾‾‾
There are a lot of custom patches for dwm, make by users like you
and me, that customize DWM and make it better. A full list
of patches are avaiable at:
HTML dwm patches
To apply a patch you can download it to the dwm folder and run:
patch -p1 < patch.diff
Once the patch is done, rebuild:
make clean install
Tips
‾‾‾‾
* Backup your config.h
* Read the source code (it's small!)
* Use dmenu for launching apps
Troubleshooting
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Just in case DWM doesn't start you should
* check ~/.xinitrc for typos
* verify Xorg works
* check logs: ~/.local/share/xorg/Xorg.0.log
Conclusion
‾‾‾‾‾‾‾‾‾‾
dwm is powerful because of its simplicity. Once set up, it gives
you a fast, distraction free environment.
Enjoy your minimal setup!
🪙 Donate
‾‾‾‾‾‾‾‾‾
If this tutorial saved you time, sanity, or a mild existential
crisis... consider fueling future chaos with a small donation:
HTML Buy me a Ko-Fi ☕
DIR 🎓 Back to my tutorials
DIR Back to my homepage