about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--configs/shared/.emacs.d/wpc/display.el10
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