From da2c8a7cae5ebf0894c7835935bb43b989e45b5d Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 4 Aug 2014 04:13:11 +0200 Subject: i3: Apply reverseHeads option to bar config. Signed-off-by: aszlig --- modules/i3/default.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'modules/i3') diff --git a/modules/i3/default.nix b/modules/i3/default.nix index 417e987a..68295270 100644 --- a/modules/i3/default.nix +++ b/modules/i3/default.nix @@ -39,7 +39,7 @@ let inherit pkgs; }; - mkBar = output: statusCmd: '' + mkBar = output: statusCmd: singleton '' bar { ${optionalString (output != null) "output ${output}"} ${optionalString (statusCmd != null) "status_command ${statusCmd}"} @@ -52,13 +52,15 @@ let } ''; - barConfig = - if headCount == 0 then mkBar null conky.single - else if headCount == 1 then mkBar (head xrandrHeads) conky.single - else let inner = take (length xrandrHeads - 2) (tail xrandrHeads); - in mkBar (head xrandrHeads) conky.left - + concatMapStrings (flip mkBar null) inner - + mkBar (last xrandrHeads) conky.right; + barConfig = let + bars = if headCount == 0 then mkBar null conky.single + else if headCount == 1 then mkBar (head xrandrHeads) conky.single + else let inner = take (length xrandrHeads - 2) (tail xrandrHeads); + in mkBar (head xrandrHeads) conky.left + ++ map (flip mkBar null) inner + ++ mkBar (last xrandrHeads) conky.right; + in concatStrings (headModifier bars); + in { options.vuizvui.i3 = { -- cgit 1.4.1