diff options
Diffstat (limited to 'jakob.org')
| -rw-r--r-- | jakob.org | 43 |
1 files changed, 35 insertions, 8 deletions
@@ -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 |