fix project script

This commit is contained in:
Murphy 2023-11-27 14:30:09 -05:00
parent 2ecefa0ce2
commit 24561a73ba
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