about summary refs log tree commit diff
path: root/emacs/.emacs.d/wpc/keybindings.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-09-28T12·41+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-09-28T12·41+0100
commit831dba20bf8ef1aa60410a98e0a4fbd70b848e86 (patch)
tree0d8edb3c5ba92cdce3a69b9256304853e325f686 /emacs/.emacs.d/wpc/keybindings.el
parent34ec3104f77222164e3ef970c9834d149653b880 (diff)
Define display-4k-vertical
I recently acquired a new monitor, which I'm orienting vertically for logs,
chats, etc. As such I needed to add more functions, KBDs to wrangle the
setup. To DRY up my code, I define a macro, `display-register`, as a DSL for
supporting new monitors. This:
- defines two functions for enabling and disabling the displays
- defines a constant, `display-<name>`

It's basically just a wrapper around `xrandr`, and that's good enough for now.
Diffstat (limited to 'emacs/.emacs.d/wpc/keybindings.el')
-rw-r--r--emacs/.emacs.d/wpc/keybindings.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/emacs/.emacs.d/wpc/keybindings.el b/emacs/.emacs.d/wpc/keybindings.el
index 05ab876e2041..35f8909aaf12 100644
--- a/emacs/.emacs.d/wpc/keybindings.el
+++ b/emacs/.emacs.d/wpc/keybindings.el
@@ -224,14 +224,15 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (when (device-work-laptop?)
-  (keybindings-exwm "<XF86Display>" #'display-cycle-display-states)
   (general-define-key
    :prefix "<SPC>"
    :states '(normal)
-   "d0" #'display-disable-laptop
-   "d1" #'display-enable-laptop
-   "D0" #'display-disable-4k
-   "D1" #'display-enable-4k))
+   "d0" #'display-enable-laptop
+   "D0" #'display-disable-laptop
+   "d1" #'display-enable-4k-horizontal
+   "D1" #'display-disable-4k-horizontal
+   "d2" #'display-enable-4k-vertical
+   "D2" #'display-disable-4k-vertical))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; notmuch