From 81b1bd287be830d69428107672b9240b59a32699 Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Sat, 14 Sep 2019 17:42:37 -0400 Subject: Add 'exwm-randr configuration for Upsilon. --- jakob.org | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'jakob.org') 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 -- cgit v1.3