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