2009-01-25 15:49:08 +00:00
|
|
|
{pkgs, config, ...}:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (pkgs.lib) mkOption mkIf;
|
|
|
|
cfg = config.services.xserver.windowManager.wmii;
|
2009-04-11 23:28:38 +01:00
|
|
|
|
|
|
|
option = { services = { xserver = { windowManager = {
|
|
|
|
|
|
|
|
wmii = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
description = "Enable the wmii window manager.";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
}; }; }; };
|
2009-01-25 15:49:08 +00:00
|
|
|
in
|
|
|
|
|
2009-04-11 23:28:38 +01:00
|
|
|
mkIf cfg.enable {
|
|
|
|
require = option;
|
|
|
|
|
2009-01-25 15:49:08 +00:00
|
|
|
services = {
|
|
|
|
xserver = {
|
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)
|
2009-01-25 15:49:08 +00:00
|
|
|
windowManager = {
|
2009-04-11 23:28:38 +01:00
|
|
|
session = [{
|
2009-01-25 15:49:08 +00:00
|
|
|
name = "wmii";
|
|
|
|
start = "
|
2009-04-30 12:37:23 +01:00
|
|
|
while :; do
|
|
|
|
${pkgs.wmiiSnap}/bin/wmii && break
|
|
|
|
done
|
2009-01-25 15:49:08 +00:00
|
|
|
";
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
2009-04-11 23:28:38 +01:00
|
|
|
|
|
|
|
environment = {
|
2009-06-25 23:08:03 +01:00
|
|
|
x11Packages = [
|
2009-04-11 23:28:38 +01:00
|
|
|
pkgs.wmiiSnap
|
|
|
|
];
|
|
|
|
};
|
2009-01-25 15:49:08 +00:00
|
|
|
}
|