summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob L. Kreuze2019-05-23 14:06:46 -0400
committerJakob L. Kreuze2019-05-23 14:06:46 -0400
commit7ab03693f581232e9ee717f410811a35e55d9c6b (patch)
treea6597a39c7bd1a4234d618da8d428f94e8d50a27
parent1ce4d2c9955097c023ad059d6afb2719836029b3 (diff)
Configure multi-monitor support for Epsilon
-rw-r--r--jakob.org43
1 files changed, 35 insertions, 8 deletions
diff --git a/jakob.org b/jakob.org
index 88c86b3..cc08b26 100644
--- a/jakob.org
+++ b/jakob.org
@@ -818,12 +818,35 @@ windmove to my workflow, now that I have the super key at my disposal.
#+BEGIN_SRC elisp
:init
+ (require 'windmove)
+
+ (when (string= (system-name) "Epsilon")
+ (defun my-windmove-right ()
+ (interactive)
+ (if (windmove-find-other-window 'right)
+ (windmove-right)
+ (if (= exwm-workspace-current-index 1)
+ (exwm-workspace-switch 0)
+ (exwm-workspace-switch 1))))
+ (defun my-windmove-left ()
+ (interactive)
+ (if (windmove-find-other-window 'left)
+ (windmove-left)
+ (if (= exwm-workspace-current-index 1)
+ (exwm-workspace-switch 0)
+ (exwm-workspace-switch 1)))))
+
+ (when (and (not (fboundp #'my-windmove-left))
+ (not (fboundp #'my-windmove-right)))
+ (defalias #'my-windmove-left #'windmove-left)
+ (defailas #'my-windmove-right #'windmove-right))
+
(setq exwm-input-global-keys
`(([?\s-r] . exwm-reset)
+ ([?\s-a] . my-windmove-left)
+ ([?\s-d] . my-windmove-right)
([?\s-w] . windmove-up)
- ([?\s-a] . windmove-left)
([?\s-s] . windmove-down)
- ([?\s-d] . windmove-right)
([?\s-p] . (lambda (command)
(interactive (list (read-shell-command "$ ")))
(start-process-shell-command command nil command)))
@@ -915,12 +938,16 @@ to pop a new buffer for editing.
#+END_SRC
#+BEGIN_SRC elisp
- :config
- (when (string= (system-name) "Epsilon")
- (require 'exwm-randr)
- (setq exwm-randr-workspace-monitor-plist
- '(0 "DVI-D-0" 1 "HDMI-A-3"))
- (exwm-randr-enable)))
+:config
+(when (string= (system-name) "Epsilon")
+ (require 'exwm-randr)
+ (setq exwm-randr-workspace-monitor-plist
+ '(0 "DVI-D-0" 1 "HDMI-A-3"))
+ (add-hook 'exwm-randr-screen-change-hook
+ (lambda ()
+ (start-process-shell-command
+ "xrandr" nil "xrandr --output DVI-D-0 --primary --left-of HDMI-A-3")))
+ (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