about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2014-07-16 06:35:58 +0200
committeraszlig <aszlig@redmoonstudios.org>2014-07-16 06:38:04 +0200
commita9886ecb73af0ac6a705e5c86640a727051803d6 (patch)
treeb37a58711102e62fb00c90a01069468f93fb0f1a /modules
parentaf9a848e07cf54db86d232f33a1f3cc7bbc590ee (diff)
i3: Reverse head assignment for dnyarri.
This is because of a limitation of Synergy not being able to cope with
multihead assignments. At least not at the time I have implemented it at
first, so might be worth to check if it has improved in the meantime.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'modules')
-rw-r--r--modules/i3/default.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/i3/default.nix b/modules/i3/default.nix
index 7a47b1c9..4ac730ed 100644
--- a/modules/i3/default.nix
+++ b/modules/i3/default.nix
@@ -14,7 +14,8 @@ let
   headCount = length config.services.xserver.xrandrHeads;
   wsPerHead = wsCount / headCount;
   excessWs = wsCount - (headCount * wsPerHead);
-  getHeadAt = elemAt config.services.xserver.xrandrHeads;
+  headModifier = if config.aszlig.i3.reverseHeads then reverseList else id;
+  getHeadAt = elemAt (headModifier config.services.xserver.xrandrHeads);
 
   mkDefaultWorkspace = number: numberSymbol: {
     name = toString number;
@@ -46,6 +47,16 @@ in
         monitor and 6 to 10 on the right.
       '';
     };
+
+    reverseHeads = mkOption {
+      type = types.bool;
+      default = false;
+      description = ''
+        Reverse the order of the heads, so if enabled and you have two heads,
+        you'll end up having workspaces 1 to 5 on the right head and 6 to 10 on
+        the left head.
+      '';
+    };
   };
 
   config.aszlig.i3.workspaces = defaultWorkspaces;