stumpwm/external-screens.lisp @ ea681bd9c52d

Tweak stump
author Steve Losh <steve@stevelosh.com>
date Tue, 19 Mar 2024 16:09:11 -0400
parents 4673e928c08e
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."))))