# dwm Setup Custom dwm (dynamic window manager) configuration based on LARBS. ## Location - Config: `~/.local/src/dwm/config.h` - After editing, rebuild with: `cd ~/.local/src/dwm && sudo make clean install` - Restart dwm to apply changes (Mod+Shift+q -> restart) ## Terminal Currently using **alacritty** as the default terminal. - Config: `~/.config/alacritty/alacritty.toml` - Defined in dwm config.h: `#define TERMINAL "alacritty"` - Also set in `~/.config/shell/profile`: `export TERMINAL="alacritty"` ## Key Bindings Mod key is Super (Windows key). ### Essential | Key | Action | |-----|--------| | Mod+Return | Open terminal | | Mod+d | dmenu (app launcher) | | Mod+q | Close window | | Mod+Shift+q | System actions (logout/restart/shutdown) | | Mod+b | Toggle status bar | ### Window Navigation | Key | Action | |-----|--------| | Mod+j/k | Focus next/prev window in stack | | Mod+h/l | Resize master area | | Mod+Space | Zoom (swap with master) | | Mod+Shift+Space | Toggle floating | | Mod+f | Toggle fullscreen | | Mod+Tab | Switch to last tag | ### Tags (Workspaces) | Key | Action | |-----|--------| | Mod+1-9 | Switch to tag 1-9 | | Mod+Shift+1-9 | Move window to tag 1-9 | | Mod+0 | View all tags | | Mod+Shift+0 | Tag window on all tags | | Mod+g / Mod+; | Shift view left/right | ### Layouts | Key | Layout | |-----|--------| | Mod+t | Tile (default) | | Mod+Shift+t | Bottom stack | | Mod+y | Spiral | | Mod+Shift+y | Dwindle | | Mod+u | Deck | | Mod+Shift+u | Monocle | | Mod+i | Centered master | | Mod+Shift+i | Centered floating master | | Mod+Shift+f | Floating | ### Gaps | Key | Action | |-----|--------| | Mod+a | Toggle gaps | | Mod+Shift+a | Reset gaps to default | | Mod+z | Increase gaps | | Mod+x | Decrease gaps | ### Scratchpads | Key | Action | |-----|--------| | Mod+Shift+Return | Terminal scratchpad | | Mod+' | Calculator scratchpad (bc) | ### Multi-Monitor | Key | Action | |-----|--------| | Mod+Left/Right | Focus prev/next monitor | | Mod+Shift+Left/Right | Move window to prev/next monitor | ### Applications | Key | Action | |-----|--------| | Mod+w | Browser (zen-browser) | | Mod+Shift+w | nmtui (network manager) | | Mod+r | lfub (file manager) | | Mod+Shift+r | htop | | Mod+n | Vimwiki | | Mod+Shift+n | newsboat | | Mod+m | ncmpcpp (music) | | Mod+e | neomutt (email) | | Mod+c | profanity (XMPP chat) | ### Media | Key | Action | |-----|--------| | Mod+p | Toggle music playback | | Mod+Shift+p | Pause all media | | Mod+[ / Mod+] | Seek -10s / +10s | | Mod+Shift+[ / Mod+Shift+] | Seek -60s / +60s | | Mod+, / Mod+. | Previous/next track | | Mod+- / Mod+= | Volume down/up | | Mod+Shift+m | Mute toggle | ### Screenshots | Key | Action | |-----|--------| | Print | Full screenshot | | Shift+Print | Selection screenshot (maimpick) | | Mod+Print | Screen recording (dmenurecord) | ### Misc | Key | Action | |-----|--------| | Mod+` | Unicode picker (dmenuunicode) | | Mod+Shift+d | passmenu (password manager) | | Mod+s | Toggle sticky window | | Mod+Insert | Snippets | | Mod+F3 | Display select | | Mod+F4 | pulsemixer | | Mod+F5 | Reload Xresources | ## dwmblocks Status bar modules located in `~/.local/src/dwmblocks/`. - Config: `~/.local/src/dwmblocks/config.h` - Scripts: `~/.local/bin/statusbar/` - Rebuild: `cd ~/.local/src/dwmblocks && sudo make clean install` - Refresh: `kill -44 $(pidof dwmblocks)` (for volume updates) ### Current Modules | Module | Script | Interval | |--------|--------|----------| | Clocks | sb-clocks | 60s | | Volume | sb-volume | signal 10 | | Battery | sb-battery | 5s | | Internet | sb-internet | 5s | ### Multi-timezone Clocks (sb-clocks) Displays time for US (NYC), UK (London), CH (Zurich): - US: Statue of Liberty icon - UK: Tea icon - CH: Cheese icon - Shows local time if device is outside these zones ## Appearance ### Colors (via Xresources) dwm reads colors from `~/.config/x11/xresources`: - `color0`: Normal border, background - `color4`: Foreground - `color8`: Selected border ### Gaps Default gap settings in config.h: - Inner horizontal: 20px - Inner vertical: 10px - Outer horizontal: 10px - Outer vertical: 30px ### Fonts - Primary: monospace:size=10 - Emoji: NotoColorEmoji:pixelsize=10 ## Window Rules | Class | Behavior | |-------|----------| | Alacritty | Terminal (swallows) | | Gimp | Tag 9 | | floatterm | Floating terminal | | spterm | Scratchpad terminal | | spcalc | Scratchpad calculator | ## Tips - Click on status bar modules for more info (left click) or settings (right click) - Shift+click on status bar opens dwmblocks config in nvim - Mouse: Mod+click to move, Mod+right-click to resize - Mod+scroll on window adjusts gaps