summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob L. Kreuze2019-09-14 17:42:37 -0400
committerJakob L. Kreuze2019-09-14 17:42:37 -0400
commit81b1bd287be830d69428107672b9240b59a32699 (patch)
tree7fb7ab51b4b2e8e30a1b65bb24bd1ba983346db3
parentad1447801170609fade3ea0d49502b5e150f4211 (diff)
Add 'exwm-randr configuration for Upsilon.
-rw-r--r--jakob.org22
1 files changed, 17 insertions, 5 deletions
diff --git a/jakob.org b/jakob.org
index a1a06ae..f5a4f5e 100644
--- a/jakob.org
+++ b/jakob.org
@@ -969,16 +969,28 @@ to pop a new buffer for editing.
#+END_SRC
#+BEGIN_SRC elisp
-:config
-(when (string= (system-name) "Epsilon")
+ :config
(require 'exwm-randr)
+ (defun hdmi-out ()
+ (and (string= (system-name) "Upsilon")
+ (save-window-excursion
+ (with-temp-buffer
+ (shell-command "xrandr" (current-buffer))
+ (cl-search "HDMI-1 connected" (buffer-string))))))
(setq exwm-randr-workspace-monitor-plist
- '(0 "DVI-D-0" 1 "HDMI-A-3"))
+ (if (string= (system-name) "Epsilon")
+ '(0 "DVI-D-0" 1 "HDMI-A-3")
+ '(0 (if (hdmi-out) "HDMI-1" "eDP-1"))))
(add-hook 'exwm-randr-screen-change-hook
(lambda ()
(start-process-shell-command
- "xrandr" nil "xrandr --output DVI-D-0 --primary --left-of HDMI-A-0")))
- (exwm-randr-enable)))
+ "xrandr" nil
+ (if (string= (system-name) "Epsilon")
+ "xrandr --output DVI-D-0 --primary --left-of HDMI-A-0"
+ (if (hdmi-out)
+ "xrandr --output HDMI-1 --mode 1920x1080 --output eDP-1 --off"
+ "xrandr --output eDP-1 --mode 1920x1080")))))
+ (exwm-randr-enable))
#+END_SRC
EXWM has issues popping any sort of pinentry window, so I just let Emacs do

© 2015 - 2026 Jakob L. Kreuze