Support keybindings for using 4k monitor
I'm not sure I'm sold on the "D{0,1}" keybindings. The thought was that 0 would indicate off and 1 would indicate on. This seems sensible to me. I'm hesitant because I don't think I have precedent for this idiom in any of my existing keybindings. I'm also not sure I like these being leader-prefixed keybindings.
This commit is contained in:
parent
2515304c77
commit
88a315eee1
1 changed files with 10 additions and 0 deletions
|
@ -23,6 +23,9 @@
|
|||
;; Constants
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defconst display/install-kbds? t
|
||||
"When t, install the keybindings defined in this module.")
|
||||
|
||||
;; TODO: Consider if this logic should be conditioned by `device/work-laptop?'.
|
||||
(defconst display/laptop-monitor "eDP1"
|
||||
"The xrandr identifier for my primary screen (on work laptop).")
|
||||
|
@ -53,5 +56,12 @@
|
|||
:command (string/format "xrandr --output %s --off"
|
||||
display/4k-monitor)))
|
||||
|
||||
(when display/install-kbds?
|
||||
(general-define-key
|
||||
:prefix "<SPC>"
|
||||
:states '(normal)
|
||||
"D0" #'display/disable-4k
|
||||
"D1" #'display/enable-4k))
|
||||
|
||||
(provide 'display)
|
||||
;;; display.el ends here
|
||||
|
|
Loading…
Reference in a new issue