39 lines
722 B
Plaintext
39 lines
722 B
Plaintext
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
COUNT=0
|
||
|
|
POTENTIAL=0
|
||
|
|
if command -v eww &> /dev/null; then
|
||
|
|
eww reload
|
||
|
|
COUNT=$(( COUNT + $? ))
|
||
|
|
((POTENTIAL++))
|
||
|
|
fi
|
||
|
|
|
||
|
|
if command -v pywalfox &> /dev/null; then
|
||
|
|
pywalfox update
|
||
|
|
COUNT=$(( COUNT + $? ))
|
||
|
|
((POTENTIAL++))
|
||
|
|
fi
|
||
|
|
|
||
|
|
if command -v spicetify &> /dev/null; then
|
||
|
|
spicetify apply
|
||
|
|
COUNT=$(( COUNT + 0 ))
|
||
|
|
((POTENTIAL++))
|
||
|
|
fi
|
||
|
|
|
||
|
|
if command -v swaync &> /dev/null; then
|
||
|
|
swaync-client -rs
|
||
|
|
COUNT=$(( COUNT + $? ))
|
||
|
|
((POTENTIAL++))
|
||
|
|
fi
|
||
|
|
|
||
|
|
if [[ $COUNT -ne 0 ]] && [[ $COUNT -eq $POTENTIAL ]]; then
|
||
|
|
notify-send -u critical "Failed to reload."
|
||
|
|
exit 0
|
||
|
|
fi
|
||
|
|
if [[ $COUNT -ne 0 ]]; then
|
||
|
|
notify-send -u critical "Failed to reload some colors"
|
||
|
|
else
|
||
|
|
notify-send "Colors changed" --expire-time=1000
|
||
|
|
fi
|
||
|
|
exit 0
|