From 98f3ac8fe930a365728fd223ce640dcbf1f3dab6 Mon Sep 17 00:00:00 2001 From: Ayo Date: Sat, 23 Aug 2025 12:08:39 +0200 Subject: [PATCH] feat(display): set solo or dual monitor mode --- display.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/display.sh b/display.sh index 616a383..9bb2ce3 100755 --- a/display.sh +++ b/display.sh @@ -6,12 +6,19 @@ #. ${HOME}/ayo.conf #. ${scripts_dir}/functions.sh -#command=$1 +intern=eDP-1 +extern=DP-1 -if [ $1 = "big" ] || [ "$1" = "1920" ] || [ "$1" = "1200" ]; then - xrandr --output eDP-1 --mode 1920x1200 -elif [ $1 = "small" ] || [ "$1" = "1280" ] || [ "$1" = "800" ]; then - xrandr --output eDP-1 --mode 1280x800 +command=$2 + +if [ $command = "big" ] || [ "$command" = "1920" ] || [ "$command" = "1200" ]; then + xrandr --output "$intern" --mode 1920x1200 +elif [ $command = "small" ] || [ "$command" = "1280" ] || [ "$command" = "800" ]; then + xrandr --output "$intern" --mode 1280x800 +elif [ $command = "solo" ]; then + xrandr --output "$extern" --off --output "$intern" --auto +elif [ $command = "dual" ]; then + xrandr --output "$extern" --mode 1680x1050 --right-of "$intern" else - xrandr --output eDP-1 --mode 1680x1050 + xrandr --output "$intern" --mode 1680x1050 fi