about summary refs log tree commit diff
path: root/emacs/.emacs.d/wpc/keybindings.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/wpc/keybindings.el')
-rw-r--r--emacs/.emacs.d/wpc/keybindings.el19
1 files changed, 19 insertions, 0 deletions
diff --git a/emacs/.emacs.d/wpc/keybindings.el b/emacs/.emacs.d/wpc/keybindings.el
index 5cebf34b8f0a..c9af5b48d1e9 100644
--- a/emacs/.emacs.d/wpc/keybindings.el
+++ b/emacs/.emacs.d/wpc/keybindings.el
@@ -19,6 +19,8 @@
 (require 'window-manager)
 (require 'vterm-mgt)
 (require 'buffer)
+(require 'display)
+(require 'device)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Configuration
@@ -66,5 +68,22 @@
  "<C-S-iso-lefttab>" #'vterm-mgt-prev
  "<s-backspace>" #'vterm-mgt-rename-buffer)
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Displays
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(when (device/work-laptop?)
+  (keybinding/exwm "<XF86Display>" #'display/cycle-display-states)
+  (general-define-key
+   :prefix "<SPC>"
+   :states '(normal)
+   "d0" #'display/disable-laptop
+   "d1" #'display/enable-laptop)
+  (general-define-key
+   :prefix "<SPC>"
+   :states '(normal)
+   "D0" #'display/disable-4k
+   "D1" #'display/enable-4k))
+
 (provide 'keybindings)
 ;;; keybindings.el ends here