diff options
Diffstat (limited to 'configs/shared/.emacs.d/wpc/display.el')
-rw-r--r-- | configs/shared/.emacs.d/wpc/display.el | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/configs/shared/.emacs.d/wpc/display.el b/configs/shared/.emacs.d/wpc/display.el index 4f2527b20cb6..8e5b89030325 100644 --- a/configs/shared/.emacs.d/wpc/display.el +++ b/configs/shared/.emacs.d/wpc/display.el @@ -58,10 +58,39 @@ :command (string/format "xrandr --output %s --off" display/4k-monitor))) +(defun display/enable-laptop () + "Turn the laptop monitor off. +Sometimes this is useful when I'm sharing my screen in a Google Hangout and I + only want to present one of my monitors." + (interactive) + (prelude/start-process + :name "display/disable-laptop" + :command (string/format "xrandr --output %s --auto" + display/laptop-monitor))) + +(defun display/disable-laptop () + "Turn the laptop monitor off. +Sometimes this is useful when I'm sharing my screen in a Google Hangout and I + only want to present one of my monitors." + (interactive) + (prelude/start-process + :name "display/disable-laptop" + :command (string/format "xrandr --output %s --off" + display/laptop-monitor))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Keybindings +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + (when display/install-kbds? (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)) |