Skip to content

ChrisTitusTech/dwm-titus

Repository files navigation

dwm-logo-bordered

dwm - dynamic window manager

dwm is an extremely fast, small, and dynamic window manager for X.


This is a heavily modified version of dwm based on the original suckless.org dwm. It includes numerous patches and customizations for a productive, user-friendly desktop on Arch Linux with Xorg.

Patches & Features

  • Polybar integration (replaces dwm built-in bar)
  • Window swallowing — terminals absorb child GUI windows
  • EWMH compliance — proper desktop/tag reporting for external tools
  • Pertag — independent layouts, master counts, and sizing per tag
  • Cfact — per-window sizing in tiled layouts
  • Movestack — reorder windows in the stack with keybinds
  • Systray — built-in system tray (disabled by default when using Polybar)
  • Fullscreen — actual and fake fullscreen toggle (3-state)
  • Window icons — title bar icons via _NET_WM_ICON
  • Cursor warp — cursor follows focus across windows/monitors
  • Noborder — auto-remove borders when only one window is visible
  • Multi-monitor — Xinerama support with per-monitor Polybar bars

📋 Install

Quick Install (Recommended)

Use Linutil for automated setup:

curl -fsSL https://christitus.com/linux | sh
image

Select dwm, rofi, bash prompt, and ghostty using the v key, then press Enter.

Manual Install

1. Install Dependencies

Build dependencies (required to compile):

sudo pacman -S --needed base-devel libx11 libxft libxinerama imlib2 libxcb xcb-util freetype2 fontconfig

Xorg:

sudo pacman -S --needed xorg-server xorg-xinit xorg-xrandr xorg-xsetroot xorg-xset

Runtime dependencies (desktop experience):

sudo pacman -S --needed rofi picom dunst feh flameshot dex mate-polkit alsa-utils noto-fonts-emoji ttf-meslo-nerd

Terminal emulator (at least one):

# Pick one — ghostty is the default in config.h
sudo pacman -S ghostty   # or: alacritty, kitty

Polybar (status bar):

sudo pacman -S polybar

2. Clone and Build

git clone https://github.com/ChrisTitusTech/dwm-titus.git
cd dwm-titus
cp config.def.h config.h    # Create your personal config
make
sudo make install

3. Install Fonts

Polybar icon fonts (MaterialIcons, Feather) are bundled in polybar/fonts/:

mkdir -p ~/.local/share/fonts
cp -r polybar/fonts/* ~/.local/share/fonts/
fc-cache -fv

Automated Installer

An install script is provided that handles all of the above:

./install.sh

Post-Install Setup

Option A — Display Manager (SDDM, GDM, LightDM): Log out, select dwm from the session menu, and log back in.

Option B — startx: The installer places .xinitrc in your home directory. Start with:

startx

The .xinitrc disables screen blanking/DPMS (prevents NVIDIA GPU issues on wake), launches Polybar, and starts dwm.


⌨️ Keybindings

Press SUPER + / inside dwm for an interactive keybind viewer (via rofi).

See docs/src/keybinds.md for the full reference.

Essential Keybinds

Keybind Action
SUPER + X Open terminal
SUPER + R Launch rofi (app launcher)
SUPER + Q Close window
SUPER + J / K Focus next / previous window
SUPER + H / L Resize master area
SUPER + 1-9 Switch to tag (workspace)
SUPER + Shift + 1-9 Move window to tag
SUPER + T Tile layout
SUPER + F Floating layout
SUPER + M Fullscreen
SUPER + Space Toggle floating
SUPER + Shift + Q Quit dwm
SUPER + Ctrl + Q Power menu

🔧 Configuration

dwm is configured by editing config.h and recompiling:

$EDITOR config.h
make && sudo make install

Note: config.def.h is the clean default template. config.h is your personal customization. If config.h doesn't exist, make will create it from config.def.h automatically.

Key things to customize in config.h:

  • refresh_rate — match your monitor (default: 60, set to 120 for high-refresh)
  • fonts[] — font family and size
  • colors[] — color scheme (Nord theme by default in config.h)
  • autostart[] — programs launched on startup
  • rules[] — per-application window rules (floating, tags, terminal detection)
  • keys[] — all keybindings
  • MODKEY — modifier key (Mod4Mask = Super, Mod1Mask = Alt)

🔍 Troubleshooting

Black screen / dwm doesn't start:

  • Verify Xorg is installed: pacman -Q xorg-server xorg-xinit
  • Check .xinitrc exists and ends with exec dwm
  • Try startx from a TTY to see error output

No status bar / Polybar missing:

  • Install polybar: sudo pacman -S polybar
  • Check fonts are installed: fc-list | grep -i meslo
  • Verify polybar config: ls ~/.config/polybar/

Missing icons in Polybar:

  • Install icon fonts: cp -r polybar/fonts/* ~/.local/share/fonts/ && fc-cache -fv

Terminal doesn't open (SUPER+X):

  • Install a terminal emulator (ghostty, alacritty, kitty, or st)
  • Or edit config.htermcmd[] to use your preferred terminal

Multi-monitor issues:

  • Polybar auto-detects monitors via xrandr
  • Primary monitor gets systray + EWMH tags; secondary monitors get a simpler bar
  • If tags don't switch correctly across monitors, check debug_ewmh.sh

Dependency check:

bash scripts/check-deps.sh

📁 Project Structure

Path Purpose
config.def.h Default configuration template
config.h Your personal configuration (edit this)
dwm.c Main window manager source
Makefile Build and install system
.xinitrc Startup script for startx
dwm.desktop Session entry for display managers
install.sh Automated installer (Arch Linux)
polybar/ Polybar config, themes, and fonts
config/ Terminal, rofi, and app configurations
scripts/ Helper scripts (keybinds viewer, dep checker, etc.)
docs/src/keybinds.md Full keybinding reference
docs/ROADMAP.md Project roadmap and planned features

About

My DWM configuration with everything pre-patched

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors