feat(up): add script for switching laptop screen resolution
This commit is contained in:
parent
88aa4a67d5
commit
dbfbd03d2c
1 changed files with 14 additions and 2 deletions
16
up.sh
16
up.sh
|
@ -8,5 +8,17 @@
|
|||
|
||||
#command=$1
|
||||
|
||||
sudo apt update && sudo apt upgrade -y
|
||||
flatpak update -y
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue