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