From 6552bb1fa4796dbdb0a5537d21ffb9297857bd90 Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 25 Jul 2014 16:08:33 +0200 Subject: i3: Allow to work only with a single head. This is very ugly and just to be taken as a workaround because the i3 status line will be completely messed up. The main reason for doing this is that the config will evaluate with a single head. Signed-off-by: aszlig --- modules/i3/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/i3/default.nix b/modules/i3/default.nix index 4ac730ed..25121fa3 100644 --- a/modules/i3/default.nix +++ b/modules/i3/default.nix @@ -24,7 +24,8 @@ let labelPrefix = "${toString number}: "; keys.switchTo = "$mod+${if number == 10 then "0" else toString number}"; keys.moveTo = "$mod+Shift+${numberSymbol}"; - head = getHeadAt ((number - (excessWs + 1)) / wsPerHead); + head = if headCount == 0 then null + else getHeadAt ((number - (excessWs + 1)) / wsPerHead); }; }; @@ -77,11 +78,13 @@ in inherit (pkgs.xorg) xsetroot; inherit wsConfig; - leftHead = head config.services.xserver.xrandrHeads; - rightHead = last config.services.xserver.xrandrHeads; leftConky = conky.left; rightConky = conky.right; + } // optionalAttrs (config.networking.hostName == "mmrnmhrm" || # <- XXX + config.networking.hostName == "dnyarri") ({ + leftHead = head config.services.xserver.xrandrHeads; + rightHead = last config.services.xserver.xrandrHeads; } // (let # Workaround for Synergy: we need to have polarizing heads. leftHead = head config.services.xserver.xrandrHeads; @@ -89,6 +92,6 @@ in in if config.networking.hostName == "mmrnmhrm" then { inherit leftHead rightHead; } else { leftHead = rightHead; rightHead = leftHead; } - )); + ))); }; } -- cgit 1.4.1