2023-06-27 10:13:14 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
state () {
|
|
|
|
if [[ $(hyprctl layers | grep swaync-control-center) == "" ]]; then
|
2023-07-05 21:57:17 -04:00
|
|
|
if [[ $(eww get notif-panel-state) == "true" ]]; then
|
|
|
|
eww update notif-panel-state=false
|
|
|
|
eww reload
|
|
|
|
fi
|
2023-06-27 10:13:14 -04:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
icon () {
|
|
|
|
local COUNT=$(swaync-client -c)
|
|
|
|
|
|
|
|
if [[ $(swaync-client -D) == "true" ]]; then
|
|
|
|
echo " "
|
|
|
|
elif [[ $COUNT == "0" ]]; then
|
|
|
|
echo "$COUNT "
|
|
|
|
else
|
|
|
|
echo "$COUNT "
|
|
|
|
fi
|
|
|
|
state
|
|
|
|
}
|
|
|
|
|
|
|
|
if [[ $1 == "icon" ]]; then
|
2023-07-05 21:57:17 -04:00
|
|
|
while true; do
|
|
|
|
sleep 0.2
|
|
|
|
icon
|
|
|
|
done
|
2023-06-27 10:13:14 -04:00
|
|
|
fi
|
|
|
|
|