A fast, tiny, and dynamic window manager for X
Personal build with custom patches, keybindings, and scripts
中文 · Install · Keybindings · Customization · License
dwm is a dynamic window manager for X. It manages windows in tiled, monocle, and floating layouts. All layouts can be applied on the fly, adapting to the application and task at hand.
This is a personal build of dwm 6.8 with custom modifications:
- Dynamic color scheme powered by pywal16
- Media keys for brightness, volume, playback, and microphone control with Dunst notifications
- Screenshot utilities bound to function keys
- Actual fullscreen patch (proper fullscreen without the statusbar)
- kitty as the default terminal
- Super key as the primary modifier
- Xlib header files
- Xinerama (optional)
- libXft & fontconfig
brightnessctl— for brightness scriptspactl(PipeWire/PulseAudio) — for volume and microphone scriptsscrot— for screenshotsdunst— for on-screen notificationsplayerctl— for media playback controldmenu— application menu backendj4-dmenu-desktop— desktop entry launcherkitty— default terminal
Edit config.mk to adjust paths for your system, then:
make clean installIf you need root privileges:
sudo make clean installAdd the following line to your .xinitrc to start dwm via startx:
exec dwmTo display dynamic status info in the bar:
while xsetroot -name "$(date)"
do
sleep 1
done &
exec dwm| Symbol | Layout | Description |
|---|---|---|
[ ]= |
Tiled | Master area (left) + stacking area (right) |
><> |
Floating | Windows can be moved and resized freely |
[M] |
Monocle | Focused window maximized to full screen |
The floating layout is automatically applied to dialog windows.
Mod =
Super(Windows key)
| Binding | Action |
|---|---|
Mod + Return |
Zoom / swap focused window |
Mod + Shift + Return |
Launch terminal (kitty) |
Mod + d |
Launch application menu |
Mod + b |
Toggle status bar |
| Binding | Action |
|---|---|
Mod + j |
Focus next window |
Mod + k |
Focus previous window |
Mod + Shift + i |
Increase master area count |
Mod + Shift + d |
Decrease master area count |
Mod + h |
Shrink master area |
Mod + l |
Expand master area |
Mod + Shift + q |
Kill focused window |
Mod + Shift + space |
Toggle floating |
Mod + Shift + f |
Toggle actual fullscreen |
| Binding | Action |
|---|---|
Mod + t |
Tiled layout |
Mod + f |
Floating layout |
Mod + m |
Monocle layout |
Mod + space |
Toggle last layout |
| Binding | Action |
|---|---|
Mod + [1–9] |
View tag |
Mod + Shift + [1–9] |
Move window to tag |
Mod + Ctrl + [1–9] |
Toggle tag in view |
Mod + Ctrl + Shift + [1–9] |
Toggle tag on window |
Mod + 0 |
View all tags |
Mod + Shift + 0 |
Apply all tags |
Mod + Tab |
Toggle previous tags |
| Binding | Action |
|---|---|
Mod + , |
Focus previous monitor |
Mod + . |
Focus next monitor |
Mod + Shift + , |
Move window to previous monitor |
Mod + Shift + . |
Move window to next monitor |
| Binding | Action |
|---|---|
F2 |
Fullscreen screenshot |
Shift + F2 |
Area screenshot |
BrightnessUp |
Increase brightness (+5%) |
BrightnessDown |
Decrease brightness (-5%) |
VolumeUp |
Raise volume (+5%) |
VolumeDown |
Lower volume (-5%) |
VolumeMute |
Toggle mute |
AudioPlay |
Play / pause media |
MicToggle |
Toggle microphone mute |
Mod + Shift + e |
Quit dwm |
| Binding | Action |
|---|---|
Button1 on tag |
View that tag |
Button3 on tag |
Toggle tag in view |
Mod + Button1 on tag |
Apply tag to focused window |
Mod + Button3 on tag |
Toggle tag on focused window |
Button1 on layout |
Cycle layouts |
Button3 on layout |
Monocle layout |
Mod + Button1 on window |
Move window |
Mod + Button2 on window |
Toggle floating |
Mod + Button3 on window |
Resize window |
dwm/
├── dwm.c # Core source (2173+ lines)
├── drw.c / drw.h # Drawing abstraction layer
├── util.c / util.h # Utility macros & helpers
├── transient.c # Transient window test program
├── config.def.h # Default configuration template
├── config.h # Active configuration (customized)
├── config.mk # Build configuration & dependencies
├── Makefile # Build system
├── dwm.1 # Man page
├── dwm.png # Icon
├── LICENSE # MIT/X Consortium License
├── colorscheme/
│ └── colors-wal-dwm.h # pywal16 dynamic color scheme
├── patches/
│ └── dwm-actualfullscreen-*.diff # Fullscreen patch
├── scripts/
│ ├── audioplay.sh # Media play/pause + notification
│ ├── brightness.sh # Brightness control + notification
│ ├── dmenucmd.sh # Application launcher (j4-dmenu-desktop)
│ ├── dunst_show_playerctl.sh # Playerctl status notification
│ ├── screenshot.sh # Fullscreen screenshot
│ ├── screenshotsel.sh # Area screenshot
│ ├── toggle_mic.sh # Microphone mute toggle + notification
│ └── volume.sh # Volume control + notification
└── wallpaper/
├── 1.png # Custom wallpaper
└── please_put_an_png_wallpaper_here.txt # Wallpaper instructions
dwm is configured at compile time by editing config.h and rebuilding:
make clean installKey areas you can tweak:
MODKEY— Modifier key (Mod1Mask= Alt,Mod4Mask= Super)fonts[]— Status bar fontscolors[][]— Color scheme (imported fromcolorscheme/)tags[]— Tag labelsrules[]— Per-application rules (floating, tag placement)keys[]— Keyboard shortcutsbuttons[]— Mouse bindingslayouts[]— Available layoutsmfact— Master area width ratio (default 0.55)borderpx— Window border widthresizehints— Respect size hints on tiled resizelockfullscreen— Force focus on fullscreen windowrefreshrate— Refresh rate for client move/resize
| Patch | Description |
|---|---|
| actualfullscreen | True fullscreen using _NET_WM_STATE_FULLSCREEN, not just monocle + statusbar hide |
MIT/X Consortium License — See LICENSE for details.
Built with keep it simple, stupid in mind — suckless.org
