From f50c4a9ec137185afa7143801d71f9b18ca46d79 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 4 Jan 2018 09:29:15 +0100 Subject: 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: --- init/nixos.el | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'init/nixos.el') 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))) -- cgit 1.4.1