From 831dba20bf8ef1aa60410a98e0a4fbd70b848e86 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Mon, 28 Sep 2020 13:41:24 +0100 Subject: Define display-4k-vertical I recently acquired a new monitor, which I'm orienting vertically for logs, chats, etc. As such I needed to add more functions, KBDs to wrangle the setup. To DRY up my code, I define a macro, `display-register`, as a DSL for supporting new monitors. This: - defines two functions for enabling and disabling the displays - defines a constant, `display-` It's basically just a wrapper around `xrandr`, and that's good enough for now. --- emacs/.emacs.d/wpc/keybindings.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'emacs/.emacs.d/wpc/keybindings.el') diff --git a/emacs/.emacs.d/wpc/keybindings.el b/emacs/.emacs.d/wpc/keybindings.el index 05ab876e20..35f8909aaf 100644 --- a/emacs/.emacs.d/wpc/keybindings.el +++ b/emacs/.emacs.d/wpc/keybindings.el @@ -224,14 +224,15 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (when (device-work-laptop?) - (keybindings-exwm "" #'display-cycle-display-states) (general-define-key :prefix "" :states '(normal) - "d0" #'display-disable-laptop - "d1" #'display-enable-laptop - "D0" #'display-disable-4k - "D1" #'display-enable-4k)) + "d0" #'display-enable-laptop + "D0" #'display-disable-laptop + "d1" #'display-enable-4k-horizontal + "D1" #'display-disable-4k-horizontal + "d2" #'display-enable-4k-vertical + "D2" #'display-disable-4k-vertical)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; notmuch -- cgit 1.4.1