diff options
author | William Carroll <wpcarro@gmail.com> | 2020-01-13T10·27+0000 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-01-17T10·56+0000 |
commit | 88a315eee1046451e0cd67656ef8c960fed1214b (patch) | |
tree | dbc2c659401c6daf095fbeada983c14d8e2d1082 /configs | |
parent | 2515304c7796b3651c0cf5b724a82dc771d05128 (diff) |
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.
Diffstat (limited to 'configs')
-rw-r--r-- | configs/shared/.emacs.d/wpc/display.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configs/shared/.emacs.d/wpc/display.el b/configs/shared/.emacs.d/wpc/display.el index 1c664204b227..727f783e62e0 100644 --- a/configs/shared/.emacs.d/wpc/display.el +++ b/configs/shared/.emacs.d/wpc/display.el @@ -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 |