My xmonad setup
goals: high density, high contrast, low friction, low latency; non-goals: eye candy
-
24 workspaces named 1…12, W1…W12, bound to Alt-F1…12, Win-F1…F2
-
dynamic workspace names/descriptions using X.A.WorkspaceNames; dynamic per-workspace workdirs using X.L.WorkspaceDir; tied together with ~/bin/rofi-git-all-repos (screenshot) to get dynamic topic/project workspaces
-
two most used layouts: X.L.ResizableTile with tabs using X.L.SubLayouts (minimal decoration, window titles are in xmobar); Full (with window titles in xmobar this resembles fullscreen tabbed)
-
top xmobar on primary screen shows workspaces, weechat notifications, urgents on the left; batteries, temperature, CPUs, net throughput and datetime on the right; commonly used words are replaced with icons to increase density
-
bottom xmobar on each screen shows layout, workdir and window titles (like a tmux status line or screen hardstatus); plus trayer on primary screen
-
do-not-disturb mode that hides chat notifications and defers urgency requests; together with an xmobar widget and a timer (started from xmonadctl) this acts as a "pomodoro timer"
-
program launching, layout selection, emoji typing, password typing via rofi (see bindings and scripts in
~/bin) -
media keys bound to liskin-media, a script that handles controlling the right media player and bluetooth volume
-
screen locking via xss-lock + xsecurelock (more robust than xscreensaver, integrated with systemd-logind, can handle media keys)
-
xrandr automation via layout-auto and xrandr-smart (
xrandr-smart --output 'eDP-*' --auto --output '!(eDP-*)' --auto --above 'eDP-*') -
automatic time tracking via arbtt (guided by workspace names, see categorize.cfg), visualisaton via arbtt-chart, daily summary in mail
-
git submodules in
~/src-haskell: mostly my forks with adotfilesbranch that has some extra stuff that hasn't been upstreamed yet -
haskell modules in
~/.xmonad/XMonad: self-contained additions not suitable for upstreaming or still work-in-progress -
~/.xmonad/xmonad.hs: xmonad config main -
~/.xmonad/xmobar.hs,~/.xmobar/icons/: xmobar configuration
-
~/src-haskell/Makefile: dependencies (xmonad, xmonad-contrib, xmobar, X11, …) built bystack build; utilities (xmonadctl, xmonadpropwrite, …) built bystack exec ghc -
~/.xmonad/Makefile: xmonad config binary built bystack exec ghc; helper targets for ghci/ghcid -
no automatic recompile: invoked directly via the
xmonad-ARCH-OSbinary, built manually by typingmake
TL;DR: startx in .bash_profile, xmonad as graphical-session.target in
user systemd, support for multiple X sessions (primary on intel, temporary on
nvidia dGPU).
Details:
-
.bash_profilesources.bash_profile_xdm -
.bash_profile_xdm: ifXDG_SESSION_TYPE=x11,exec startx /etc/X11/xinit/xinitrc ~/.xsession-wrapper(secondary X sessions skip the/etc/X11/xinit/xinitrcto avoid messing up user systemd and dbus environments) -
getty 9 additionally sets
_LISKIN_NVIDIA=1so that a differentxorg.confis used and everything is rendered on the dGPU -
.xsession-wrapperinvokes.xsessionwith stdout/stderr to systemd journal -
.xsessionperforms some initialization (xrdb, xrandr, xset, xsetroot, setxkbmap, xmodmap, xinput, …) and then launches xmonad via systemd-run: in primary sessions as a unit binding tographical-session.targetandxmonad@$DISPLAY.target, in secondary sessions as a scope binding toxmonad@$DISPLAY.target -
graphical-session.targetstarts primary session services like tray applets, notification daemon, … -
xmonad@$DISPLAY.targetstarts services meant to run in all sessions (compton, xss-lock, redshift, …)
-
there may be other interesting (but likely undocumented) bits in my dotfiles
-
my mostly technical blog/web; @Liskni_si twitter

