2014-04-14 15:26:48 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2013-09-04 12:05:09 +01:00
|
|
|
|
2014-04-14 15:26:48 +01:00
|
|
|
with lib;
|
2009-01-25 15:49:08 +00:00
|
|
|
|
|
|
|
let
|
2013-09-04 12:05:09 +01:00
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
cfg = config.services.xserver.windowManager.wmii;
|
2009-04-11 23:28:38 +01:00
|
|
|
|
2013-09-04 12:05:09 +01:00
|
|
|
in
|
2009-04-11 23:28:38 +01:00
|
|
|
|
2013-09-04 12:05:09 +01:00
|
|
|
{
|
|
|
|
options = {
|
|
|
|
|
|
|
|
services.xserver.windowManager.wmii.enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
description = "Enable the wmii window manager.";
|
2009-04-11 23:28:38 +01:00
|
|
|
};
|
|
|
|
|
2013-09-04 12:05:09 +01:00
|
|
|
};
|
2009-01-25 15:49:08 +00:00
|
|
|
|
2013-09-04 12:05:09 +01:00
|
|
|
config = mkIf cfg.enable {
|
2009-04-11 23:28:38 +01:00
|
|
|
|
2013-09-04 12:05:09 +01:00
|
|
|
services.xserver.windowManager.session = singleton
|
2009-04-30 12:37:23 +01:00
|
|
|
# stop wmii by
|
|
|
|
# $wmiir xwrite /ctl quit
|
|
|
|
# this will cause wmii exiting with exit code 0
|
|
|
|
#
|
|
|
|
# why this loop?
|
|
|
|
# wmii crashes once a month here. That doesn't matter that much
|
|
|
|
# wmii can recover very well. However without loop the x session terminates and then your workspace setup is
|
|
|
|
# lost and all applications running on X will terminate.
|
|
|
|
# Another use case is kill -9 wmii; after rotating screen.
|
|
|
|
# Note: we don't like kill for that purpose. But it works (-> subject "wmii and xrandr" on mailinglist)
|
2013-09-04 12:05:09 +01:00
|
|
|
{ name = "wmii";
|
|
|
|
start = ''
|
|
|
|
while :; do
|
|
|
|
${pkgs.wmiiSnap}/bin/wmii && break
|
|
|
|
done
|
|
|
|
'';
|
2009-01-25 15:49:08 +00:00
|
|
|
};
|
|
|
|
|
2013-09-04 12:05:09 +01:00
|
|
|
environment.systemPackages = [ pkgs.wmiiSnap ];
|
2009-04-11 23:28:38 +01:00
|
|
|
|
|
|
|
};
|
2013-09-04 12:05:09 +01:00
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
}
|