From 2a1ddedc7a3a8780a762ca2b040e819361e390be Mon Sep 17 00:00:00 2001 From: Ayo Date: Mon, 30 Jun 2025 18:13:09 +0200 Subject: [PATCH] feat: new separate display script --- display.sh | 9 +++++++++ up.sh | 16 ++-------------- 2 files changed, 11 insertions(+), 14 deletions(-) create mode 100644 display.sh diff --git a/display.sh b/display.sh new file mode 100644 index 0000000..b7e371a --- /dev/null +++ b/display.sh @@ -0,0 +1,9 @@ +# laptop display management + +if [ "$1" = "1920" ] || [ "$1" = "1200" ]; then + xrandr --output eDP-1 --mode 1920x1200 +elif [ "$1" = "1280" ] || [ "$1" = "800" ]; then + xrandr --output eDP-1 --mode 1280x800 +else + xrandr --output eDP-1 --mode 1680x1050 +fi diff --git a/up.sh b/up.sh index 51f060f..a4d3ff0 100755 --- a/up.sh +++ b/up.sh @@ -8,17 +8,5 @@ #command=$1 -set_display_resolution() { - if [ "$1" = "1920" ] || [ "$1" = "1200" ]; then - xrandr --output eDP-1 --mode 1920x1200 - else - xrandr --output eDP-1 --mode 1680x1050 - fi -} - -if [ $1 = "display" ] || [ $1 = "d" ]; then - set_display_resolution $2 -else - sudo apt update && sudo apt upgrade -y - flatpak update -y -fi +sudo apt update && sudo apt upgrade -y +flatpak update -y