Skip to content

Instantly share code, notes, and snippets.

@sjl
Created August 15, 2018 19:41
Show Gist options
  • Save sjl/124c4eff0273e8d0b477bfecf11774f8 to your computer and use it in GitHub Desktop.
Save sjl/124c4eff0273e8d0b477bfecf11774f8 to your computer and use it in GitHub Desktop.
(defcommand screen-single () ()
(loop with laptop = "eDP1"
with extern = "DP1"
for (output commands) in `((,laptop ("--primary"))
(,extern ("--off"))
(,laptop ("--preferred")))
do (uiop:run-program `("xrandr" "--output" ,output ,@commands))))
(defcommand screen-multi () ()
(loop with laptop = "eDP1"
with extern = "DP1"
for (output commands) in `((,laptop ("--preferred"))
(,extern ("--on"))
(,extern ("--preferred"))
;; (,extern ("--mode" "2560x1440"))
(,extern ("--left-of" ,laptop))
(,extern ("--primary")))
do (uiop:run-program `("xrandr" "--output" ,output ,@commands))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment