stumpwm/external-screens.lisp @ 7cb0e1e6a217
More
| author | Steve Losh <steve@stevelosh.com> |
|---|---|
| date | Thu, 20 Nov 2025 11:24:53 -0500 |
| parents | a65fd2691c94 |
| children | (none) |
(in-package :stumpwm-user) (defcommand screen-laptop () () (only) (hostcase ((:gro :juss) (loop :with laptop = "eDP" :with extern = (hostcase (:gro "DisplayPort-0") (:juss "HDMI-A-0")) :for (output commands) :in `((,laptop ("--auto")) (,laptop ("--primary")) (,extern ("--off"))) :do (progn (uiop:run-program `("xrandr" "--output" ,output ,@commands))))) (t (message "Not configured on this system.")))) (defcommand screen-external () () (only) (hostcase ((:gro :juss) (loop :with laptop = "eDP" :with extern = (hostcase (:gro "DisplayPort-0") (:juss "HDMI-A-0")) :for (output commands) :in `((,extern ("--auto")) (,extern ("--primary")) (,laptop ("--off"))) :do (uiop:run-program `("xrandr" "--output" ,output ,@commands)))) (t (message "Not configured on this system.")))) (defcommand screen-alan-single () () (hostcase ((:juss) (loop :with laptop = "eDP" :with extern = "DisplayPort-0" :for (output commands) :in `((,laptop ("--mode" "1920x1080")) (,extern ("--mode" "1920x1080" "--same-as" "eDP"))) :do (uiop:run-program `("xrandr" "--output" ,output ,@commands)))) (t (message "Not configured on this system.")))) (defcommand screen-alan-two () () (hostcase ((:juss) (loop :with laptop = "eDP" :with extern = "DisplayPort-0" :for (output commands) :in `((,laptop ("--auto")) (,extern ("--mode" "1920x1080" "--right-of" "eDP"))) :do (uiop:run-program `("xrandr" "--output" ,output ,@commands)))) (t (message "Not configured on this system."))))