3.4 Emacs Lisp wmii controller ============================== ‘wmii-el’ (GitHub repository) (1) allows complete control of the wmii window manager through Emacs Lisp. Wmii (2) is a tiling window manager for X11, strongly inspired by Plan 9. For me, it was always the tiling window manager whose behaviour I found easier, and the extensibility of it through the Plan 9 filesystem made it scriptable from the start - the default installation used a shell script, so that was very much a part of the design. Some of the reasons I preferred it to alternatives: • The dynamic tilling model of wmii hits the sweetspot between being restricted to some predefined layouts and allowing all sorts of partitioning • The way it is configured is something I personally find attractive: via reading and writing to files, using the 9P protocol. This makes it easy to integrate with everything. • While “minimal” by most standards it comes with enough functionality to do without external applications (including some useful tools like wimenu) • It draws titlebars in windows. For some this is uneeded, for me it makes it aesthetically pleasing in managed mode and essential in unmanaged (floating) mode • The code itself is compact and has, with minor upkeep, withstood the passage of years. I don't currently use it, mostly because of multi-monitor support issues that made it difficult for me to connect to external projectors for presenting, but it was likely the best experience in terms of being in control of the desktop (and yes, I know about i3, which I also used, and then sway, but they lack a 9P interface and the tilling model is not the same). One of the reasons this worked so well was because it created primitives, in Emacs Lisp, for the wmii functions, which made it a joy to use Emacs to automate everything else. This example from my config file shows how ‘rcirc’ notifications are sent to the notification bar, and how every action received by wmii (which could be from any source) calls a hook. (defun wmii-rcirc-notification (proc sender response target text) (wmii-write-to-button-with-timer "rbar" "!notice" (format "%s: %s" sender text) 10)) (add-hook 'rcirc-print-hooks 'wmii-rcirc-notification) ;; Adding event hooks Every event received by wmii is passed to the ;; functions in wmii-event-hook; we can take advantage of that to add ;; all sorts of additional functions. ;; ;; Here we turn on transparency for every created client; this could ;; be changed to limit it to only certain clients, etc. (add-hook 'wmii-event-hook (lambda (ev) (let ((event-type (car (split-string ev))) (client (cadr (split-string ev)))) (when (equal (downcase event-type) "createclient") (wmii-transparency-toggle client))))) ---------- Footnotes ---------- (1) GitHub repository) (https://github.com/fsmunoz/wmii-el) (2) Wmii (https://github.com/0intro/wmii)