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.
This commit is contained in:
William Carroll 2020-09-28 13:41:24 +01:00
parent 34ec3104f7
commit 831dba20bf
2 changed files with 74 additions and 67 deletions

View file

@ -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