summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/emacs/modules/bd--exwm.el27
1 files changed, 21 insertions, 6 deletions
diff --git a/.config/emacs/modules/bd--exwm.el b/.config/emacs/modules/bd--exwm.el
index af21661..45591b9 100644
--- a/.config/emacs/modules/bd--exwm.el
+++ b/.config/emacs/modules/bd--exwm.el
@@ -3,21 +3,30 @@
;;; Code:
-(bd/set-bg)
-
(use-package exwm
:demand t
:config
+
+ (require 'exwm-randr)
+ (setopt exwm-randr-workspace-monitor-plist '(0 "HDMI-1" 1 "eDP-1")
+ exwm-workspace-number 2)
+ (add-hook 'exwm-randr-screen-change-hook
+ (lambda ()
+ (start-process-shell-command
+ "xrandr" nil
+ "xrandr --output HDMI-1 --mode 2560x1440 --primary --auto --left-of eDP-1 --output eDP-1 --mode 1920x1080")
+ (bd/set-bg)))
+ (exwm-randr-mode)
+
(defun bd/exwm-update-title ()
"Changes the buffer name to reflect the class name for
that buffer."
(exwm-workspace-rename-buffer exwm-title))
(add-hook 'exwm-update-title-hook #'bd/exwm-update-title)
-
(define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key)
(exwm-enable)
(setopt exwm-replace nil
- exwm-manage-force-tiling t
+ exwm-manage-force-tiling nil
exwm-input-prefix-keys
`([?\C-x]
[?\C-u]
@@ -34,7 +43,7 @@ that buffer."
(number-sequence 0 9)))
exwm-input-global-keys
- '(([?\s-n] . other-window)
+ `(([?\s-n] . other-window)
([?\s-p] . (lambda ()
(interactive)
(other-window -1)))
@@ -55,7 +64,13 @@ that buffer."
([?\s-q] . kill-current-buffer)
([?\s-x] . (lambda (command)
(interactive (list (read-shell-command "s-x ")))
- (start-process-shell-command command nil command))))
+ (start-process-shell-command command nil command)))
+ ,@(mapcar (lambda (i)
+ `(,(kbd (format "s-%s" (car i))) .
+ (lambda ()
+ (interactive
+ (exwm-workspace-switch-create ,(car (cdr i)))))))
+ '((! 0) (@ 1) (\# 2) ($ 3) (% 4) (^ 5) (& 6) (* 7) (\( 8) (\) 9))))
exwm-input-simulation-keys
'(([?\C-b] . [left])