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
|
|
|
|
fi
|
2023-06-27 10:13:14 -04:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
icon () {
|
2023-08-20 11:37:56 -04:00
|
|
|
COUNT=$(swaync-client -c)
|
2023-06-27 10:13:14 -04:00
|
|
|
|
|
|
|
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
|
2023-08-04 23:01:46 -04:00
|
|
|
sleep 0.01
|
2023-07-05 21:57:17 -04:00
|
|
|
icon
|
|
|
|
done
|
2023-06-27 10:13:14 -04:00
|
|
|
fi
|
|
|
|
|