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