From 8908debbc2ed41eccef6e44a2d497c347de43df8 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 21 Aug 2025 11:02:45 -0700 Subject: pop-os/stumpwm: Add commands for specific monitor setups --- oni/home/services/stumpwm/pop-os-config.lisp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/oni/home/services/stumpwm/pop-os-config.lisp b/oni/home/services/stumpwm/pop-os-config.lisp index 9c0acb5..86b9943 100644 --- a/oni/home/services/stumpwm/pop-os-config.lisp +++ b/oni/home/services/stumpwm/pop-os-config.lisp @@ -55,3 +55,21 @@ (sb-ext:run-program "/usr/bin/gtk-launch" (list application) :wait nil)) (define-key *user-bindings* (kbd "a") "run-application") + +(defvar *xrandr-program* "/usr/bin/xrandr") + +(defcommand laptop-screen () () + (sb-ext:run-program *xrandr-program* '("--output" "eDP-1" "--primary" "--auto" "--output" "HDMI-1" "--off" "--output" "DP-1" "--off")) + (if (> (length (screen-heads (current-screen))) 1) + (refresh-heads))) + + +(defcommand samsung-screen () () + (sb-ext:run-program *xrandr-program* '("--output" "eDP-1" "--off" "--output" "DP-1" "--auto" "--primary")) + (when (and (= 1 (length (screen-heads (current-screen)))) + (/= (screen-width (current-screen)) + (frame-width (car (screen-heads (current-screen)))))) + (refresh-heads))) + +(defcommand laptop+mnn-screen () () + (sb-ext:run-program *xrandr-program* '("--output" "eDP-1" "--auto" "--output" "HDMI-1" "--auto" "--primary" "--right-of" "eDP-1"))) -- cgit v1.3-2-g0d8e