about summary refs log tree commit diff
path: root/modules/user/aszlig/services
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2017-06-18 02:09:33 +0200
committeraszlig <aszlig@redmoonstudios.org>2017-06-18 02:24:02 +0200
commit1e4d169795a65be418cd53cb475cc8774b502f0a (patch)
tree71dc91c97c853f87ccb434183851fba940df717d /modules/user/aszlig/services
parent37143b3fa7b54026d0d55279c5bdb80747443dbf (diff)
modules/aszlig: Cope with new xrandrHeads options
The way xrandrHeads are addressed has changed with the following
upstream merge commit:

  NixOS/nixpkgs@9dca737d6269759745c9e68ea462446cde4d9be9

Now xrandrHeads are no longer a list of strings but a list of attribute
sets, but we new do have even more information about a particular head.

So apart from fixing this, we new also set --primary whenever applicable
in "xreset".

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'modules/user/aszlig/services')
-rw-r--r--modules/user/aszlig/services/i3/default.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/user/aszlig/services/i3/default.nix b/modules/user/aszlig/services/i3/default.nix
index 9000efb3..34767e38 100644
--- a/modules/user/aszlig/services/i3/default.nix
+++ b/modules/user/aszlig/services/i3/default.nix
@@ -18,7 +18,7 @@ let
   wsPerHead = wsCount / headCount;
   excessWs = wsCount - (headCount * wsPerHead);
   headModifier = if cfg.reverseHeads then reverseList else id;
-  getHeadAt = elemAt (headModifier xrandrHeads);
+  getHeadAt = x: (elemAt (headModifier xrandrHeads) x).output;
 
   mkSwitchTo = number: "$mod+${if number == 10 then "0" else toString number}";
 
@@ -57,7 +57,7 @@ let
   '';
 
   barConfig = let
-    barHeads = headModifier xrandrHeads;
+    barHeads = map (h: h.output) (headModifier xrandrHeads);
     bars = if headCount == 0 then mkBar null conky.single
       else if headCount == 1 then mkBar (head barHeads) conky.single
       else let inner = take (length barHeads - 2) (tail barHeads);