testsAndMisc/linux_configuration/dwm
Krzysztof kuhy Rudnicki f15f00f3fe Re-point paths for the ~ reorganisation (home-tidy)
Also bumps the 16 meta/requirements pins the freshness gate flagged
(anthropic 1.5.0, numpy 2.5.3, pytest-randomly 5, flake8-bugbear 26.9.9,
ruff 0.16.7, pyright 1.1.414, selenium 4.49.0, hypothesis 6.168.0, lxml
6.1.3, pipdeptree 4.2.5, the two types-* stubs) and Flutter 3.47.3 in
meta/.fvmrc. One test still expected the pre-move ~/mcp-servers path.

The pre-commit hook fed .zsh files to shfmt and shellcheck, neither of
which parses zsh (SC2148/SC1071), so no zsh file could be committed since
the hook was tightened on 2026-08-22; those now get `zsh -n` instead. The
hook's own shfmt pass also staged its reformat of 8 shell files.

CI_GREEN_SKIP because main is red on exactly the dependency-freshness
finding this commit fixes, which is the documented use of that flag.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AwtowrowDXx6ccmWVPkCaF
2026-09-11 20:50:19 +02:00
..
bin Re-point paths for the ~ reorganisation (home-tidy) 2026-09-11 20:50:19 +02:00
patches feat: split oversized modules for 500-line limit, fix kasa coverage gap 2026-06-14 07:19:37 +02:00
config.h Re-point paths for the ~ reorganisation (home-tidy) 2026-09-11 20:50:19 +02:00
pointer-confine.c feat: split oversized modules for 500-line limit, fix kasa coverage gap 2026-06-14 07:19:37 +02:00
README.md Dissolve linux_configuration/scripts/ and single_use/ 2026-08-23 18:53:30 +02:00

dwm (i3-like, compiled from source)

Versioned customisation for suckless dwm. This directory is the source of truth; the installer ../features/setup_dwm.sh clones upstream dwm master, copies these files on top, applies the two dwm.c patches, and builds. Nothing here is a full fork of dwm — only the files we actually change live in the repo, so upstream stays bleeding-edge.

How a build works

setup_dwm.sh runs, in order:

  1. git clone / git reset --hard origin/master into ~/.local/src/dwm (always the latest upstream).
  2. Copy config.h over the clone.
  3. heal_config — auto-merge any new upstream scalar knob (e.g. refreshrate) that the current dwm.c needs but our config.h predates.
  4. Apply patches/focus-on-click.patch and patches/fullscreen-pointer-confine.patch to dwm.c — done with perl rewrites (robust against upstream line shifts), not git apply. The .patch files are the human-readable record of exactly those changes.
  5. make && sudo make install.
  6. Compile pointer-confine.c and install bin/* to /usr/local/bin.

Because the clone is reset every run, the patches are re-applied each build, which is what keeps "always latest master" working.

Files

Path What it is
config.h dwm config: Mod4, Dracula colours, 10 tags, bottom bar, vim-style focus/move, multi-monitor keys, media keys, movestack/togglefullscr defined inline so dwm.c needs no extra patch for them.
pointer-confine.c Standalone helper: traps the X pointer on the current monitor with XFixes pointer barriers until killed. Used for fullscreen gaming so the cursor can't slide onto the other screen.
patches/focus-on-click.patch No-ops enternotify/motionnotify so the pointer never changes focus or switches monitors — focus only changes on click or via keys.
patches/fullscreen-pointer-confine.patch Hooks setfullscreen/unmanage to start/stop pconfine-auto so the cursor-lock turns on automatically when a window goes fullscreen.
bin/dwm-session lightdm session launcher (autostart + dwmstatus + exec dwm).
bin/dwmstatus Status feeder: CPU/GPU/board temps, RAM, load, volume, clock → root window name. dwmstatus once prints the line without xsetroot.
bin/dwm-rebuild Recompile ~/.local/src/dwm in place (quick local rebuild).
bin/switch-wm Flip the lightdm boot session between i3 and dwm.
bin/pconfine-auto on/off single-instance control of the pointer-confine daemon (called by the dwm hooks and the panic key).

Customising

  • Permanent change: edit the file here (e.g. config.h), then re-run setup_dwm.sh. Log out / back in to apply (dwm has no live restart).
  • Quick experiment: edit ~/.local/src/dwm/config.h directly and run dwm-rebuild — but note the next setup_dwm.sh run overwrites it from here.

Notable bindings (Mod = Super)

  • Mod+Return terminal, Mod+d dmenu, Mod+f fullscreen, Mod+Shift+q kill, Mod+Shift+e exit, Mod+Shift+r recompile.
  • Multi-monitor: Mod+,/Mod+. (or Mod+Ctrl+←/→) focus the other screen; Mod+Shift+,/Mod+Shift+. (or Mod+Ctrl+Shift+←/→) throw the window there.
  • Mod+Shift+p force-releases the fullscreen cursor-lock if a barrier sticks.

Dependencies

Build/runtime: libx11 libxft libxinerama gcc make dmenu terminator, plus xorg-xsetroot for the status bar and libxfixes for pointer-confine (present as a dep of Xorg). Install missing ones interactively — this system's pacman is a wrapper that deadlocks when driven non-interactively.