diff options
author | William Carroll <wpcarro@gmail.com> | 2020-01-11T20·01+0000 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-01-17T10·56+0000 |
commit | fac128f00c7f4d8ebecf656e02b42d393bc5678a (patch) | |
tree | b6cd62dfcf0a3f476d54165307b7e59a0ca36989 /configs/shared/.emacs.d/wpc | |
parent | 5a1b869af30f85c79ef7f02a3a453af475bad88d (diff) |
Debug xrandr integration to support 4k monitor
Two things: 1. I'm unsure if what I previously committed ever worked because the arguments to `string/format` were flipped. 2. I'm unsure why my screen devices are sometimes eDP-1 and eDP1. Perhaps expect more commits as this becomes more clear to me.
Diffstat (limited to 'configs/shared/.emacs.d/wpc')
-rw-r--r-- | configs/shared/.emacs.d/wpc/display.el | 17 | ||||
-rw-r--r-- | configs/shared/.emacs.d/wpc/window-manager.el | 5 |
2 files changed, 13 insertions, 9 deletions
diff --git a/configs/shared/.emacs.d/wpc/display.el b/configs/shared/.emacs.d/wpc/display.el index 7f2f5e034609..1c664204b227 100644 --- a/configs/shared/.emacs.d/wpc/display.el +++ b/configs/shared/.emacs.d/wpc/display.el @@ -24,10 +24,11 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; TODO: Consider if this logic should be conditioned by `device/work-laptop?'. -(defconst display/primary "eDP-1" +(defconst display/laptop-monitor "eDP1" "The xrandr identifier for my primary screen (on work laptop).") -(defconst display/4k "HDMI-1" +;; TODO: Why is HDMI-1, eDP-1 sometimes and HDMI1, eDP1 other times. +(defconst display/4k-monitor "HDMI1" "The xrandr identifer for my 4K monitor.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -38,17 +39,19 @@ "Attempt to connect to my 4K monitor." (interactive) (prelude/start-process - :name "display" - :command (string/format "xrandr --output %s --dpi 144 --auto --right-of %s" - display/4k - display/primary))) + :name "display/enable-4k" + :command (string/format + "xrandr --output %s --above %s --primary --auto --dpi 144" + display/4k-monitor + display/laptop-monitor))) (defun display/disable-4k () "Disconnect from the 4K monitor." (interactive) (prelude/start-process :name "display/disable-4k" - :command (string/format "xrandr --output %s --off" display/4k))) + :command (string/format "xrandr --output %s --off" + display/4k-monitor))) (provide 'display) ;;; display.el ends here diff --git a/configs/shared/.emacs.d/wpc/window-manager.el b/configs/shared/.emacs.d/wpc/window-manager.el index 4e9770a40cdb..0c350acd2f7c 100644 --- a/configs/shared/.emacs.d/wpc/window-manager.el +++ b/configs/shared/.emacs.d/wpc/window-manager.el @@ -123,8 +123,9 @@ (exwm-randr-enable) ;; TODO: Consider generating this plist. ;; TODO: Replace integer index values with their named workspace equivalents. - (setq exwm-randr-workspace-monitor-plist (list 0 display/4k - 1 display/primary)) + (setq exwm-randr-workspace-monitor-plist + (list 0 display/4k-monitor + 1 display/laptop-monitor)) (evil-set-initial-state 'exwm-mode 'emacs) (ido-mode 1) |