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

View file

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