about summary refs log tree commit diff
path: root/init
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-01-04T08·29+0100
committerVincent Ambo <tazjin@gmail.com>2018-01-04T08·30+0100
commitf50c4a9ec137185afa7143801d71f9b18ca46d79 (patch)
tree36f8e7e9033df98fae3c93d45fddf02f78c5562b /init
parent443e8ea995e423f6a0795bd88b79164cd816b795 (diff)
feat(nixos): Fix EXWM multi-screen outputting
Pins a set amount of screens on each display corresponding to the key
wells on my Kinesis :sun:
Diffstat (limited to 'init')
-rw-r--r--init/nixos.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/init/nixos.el b/init/nixos.el
index 2fc5bc434027..3caeec9a5c01 100644
--- a/init/nixos.el
+++ b/init/nixos.el
@@ -4,6 +4,7 @@
 
 (require 's)
 (require 'f)
+(require 'dash)
 
 (defvar is-nixos
   (let ((os-f "/etc/os-release"))
@@ -32,11 +33,17 @@
   (interactive)
   (shell-command "i3lock"))
 
+(defun generate-randr-config ()
+  (-flatten `(,(-map (lambda (n) (list n "DP2")) (number-sequence 1 5))
+              (0 "eDP1")
+              ,(-map (lambda (n) (list n "eDP1")) (number-sequence 6 9)))))
+
 (if is-nixos
     (progn
       (message "Running on NixOS, configuring ExWM.")
       (require 'exwm)
       (require 'exwm-config)
+      (require 'exwm-randr)
 
       (fringe-mode 3)
 
@@ -85,6 +92,10 @@
       ;; Show time in the mode line
       (display-time-mode)
 
+      ;; Another attempt at xrandr configuration
+      (setq exwm-randr-workspace-output-plist (generate-randr-config))
+      (exwm-randr-enable)
+
       ;; Let buffers move seamlessly between workspaces
       (setq exwm-workspace-show-all-buffers t)
       (setq exwm-layout-show-all-buffers t)))