1{ config, lib, pkgs, ... }: 2 3with lib; 4 5let 6 7 cfg = config.services.xserver.windowManager.wmii; 8 9in 10 11{ 12 options = { 13 14 services.xserver.windowManager.wmii.enable = mkOption { 15 default = false; 16 example = true; 17 description = "Enable the wmii window manager."; 18 }; 19 20 }; 21 22 config = mkIf cfg.enable { 23 24 services.xserver.windowManager.session = singleton 25 # stop wmii by 26 # $wmiir xwrite /ctl quit 27 # this will cause wmii exiting with exit code 0 28 # 29 # why this loop? 30 # wmii crashes once a month here. That doesn't matter that much 31 # wmii can recover very well. However without loop the x session terminates and then your workspace setup is 32 # lost and all applications running on X will terminate. 33 # Another use case is kill -9 wmii; after rotating screen. 34 # Note: we don't like kill for that purpose. But it works (-> subject "wmii and xrandr" on mailinglist) 35 { name = "wmii"; 36 start = '' 37 while :; do 38 ${pkgs.wmiiSnap}/bin/wmii && break 39 done 40 ''; 41 }; 42 43 environment.systemPackages = [ pkgs.wmiiSnap ]; 44 45 }; 46 47}