fix project script

This commit is contained in:
Freya Murphy 2023-11-27 14:30:09 -05:00
parent a1d7fe97eb
commit 768f2555dd
No known key found for this signature in database
GPG key ID: 988032A5638EE799
2 changed files with 11 additions and 7 deletions

View file

@ -58,20 +58,23 @@ get_id() {
i=0 i=0
while true; do while true; do
NAME="$(get_name $i)" NAME="$(get_name $i)"
if [ "$NAME" == "$1" ]; then if [ $(echo "$NAME" | grep "^$1") ]; then
echo "$i" echo "$i"
exit 0 return 0
elif [ "$NAME" == "null" ]; then elif [ "$NAME" == "null" ]; then
notify-send -u critical -t 3000 "Sway" "Failed to get display" return 1
kill $PID
exit 1
fi fi
((i=i+1)) ((i=i+1))
done done
} }
PRIMARY=$(get_id "eDP-1") die() {
EXTERNAL=$(get_id "DP-1" || get_id "HDMI-1" || get_id "HDMI-A-1") notify-send -u critical -t 3000 "Sway" "Failed to get display"
kill $PID
}
PRIMARY=$(get_id "eDP-1" || die)
EXTERNAL=$(get_id "DP" || get_id "HDMI" || die)
PRIMARY_SCALE=1.5 PRIMARY_SCALE=1.5
EXTERNAL_SCALE=1 EXTERNAL_SCALE=1

View file

@ -29,6 +29,7 @@ grub
htop htop
imv imv
iwd iwd
jq
krita krita
less less
lib32-libva-mesa-driver lib32-libva-mesa-driver