about summary refs log tree commit diff
path: root/users/tazjin
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-06-30T10·42+0300
committertazjin <tazjin@tvl.su>2023-06-30T11·02+0000
commit22e7e7bc99bff8a3760483f2fc3c6344d5b2db37 (patch)
tree7a0af6a4091cd72fb5f4d7accf06f24df1ea4d9e /users/tazjin
parent9dca6c9c6ccaf10a3cc827ac5eb761b352cbdc5e (diff)
feat(tazjin/emacs): add screen layouts for khamovnik r/6365
Change-Id: I057c996650a48cfafdcba84e1087663e212eadda
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8879
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/tazjin')
-rw-r--r--users/tazjin/emacs/config/desktop.el22
1 files changed, 21 insertions, 1 deletions
diff --git a/users/tazjin/emacs/config/desktop.el b/users/tazjin/emacs/config/desktop.el
index 83336f74c200..77546c27765f 100644
--- a/users/tazjin/emacs/config/desktop.el
+++ b/users/tazjin/emacs/config/desktop.el
@@ -348,6 +348,22 @@ in-progress."
   (shell-command "xrandr --output DisplayPort-0 --auto --primary --left-of DisplayPort-1")
   (shell-command "xrandr --output DisplayPort-1 --auto --right-of DisplayPort-0 --rotate left"))
 
+(defun randr-khamovnik-layout-office ()
+  "Use the left and right screen on khamovnik, in the office."
+  (interactive)
+  (set-randr-config `(("eDP-1" 1 2)
+                      ("DP-2" 3 4 5 6 7 8 9 0)))
+
+  (shell-command "xrandr --output DP-2 --auto --primary --right-of eDP-1"))
+
+(defun randr-khamovnik-layout-single ()
+  "Use only the internal screen."
+  (interactive)
+  (set-randr-config '(("eDP-1" (number-sequence 0 9))))
+  (shell-command "xrandr --output eDP-1 --auto --primary")
+  (shell-command "xrandr --output DP-2 --off")
+  (exwm-randr-refresh))
+
 (pcase (s-trim (shell-command-to-string "hostname"))
   ("tverskoy"
    (exwm-input-set-key (kbd "s-m s") #'randr-tverskoy-layout-single)
@@ -355,7 +371,11 @@ in-progress."
 
   ("frog"
    (exwm-input-set-key (kbd "s-m b") #'randr-frog-layout-both)
-   (exwm-input-set-key (kbd "s-m r") #'randr-frog-layout-right-only)))
+   (exwm-input-set-key (kbd "s-m r") #'randr-frog-layout-right-only))
+
+  ("khamovnik"
+   (exwm-input-set-key (kbd "s-m 2") #'randr-khamovnik-layout-office)
+   (exwm-input-set-key (kbd "s-m s") #'randr-khamovnik-layout-single)))
 
 ;; Notmuch shortcuts as EXWM globals
 ;; (g m => gmail)