dotfiles/.i3blocks/dunst

22 lines
415 B
Bash
Executable file

#!/bin/bash
active=$(systemctl --user show -p ActiveState --value dunst.service)
if [[ "$active" == "active" ]]
then
if [[ -n "$button" ]]
then
dunstctl set-paused toggle
fi
echo -n "dunst "
if [[ "$(dunstctl is-paused)" == "true" ]]
then
echo "<span foreground=\"#FFCC66\">█</span>"
else
echo "<span foreground=\"#99CC99\">█</span>"
fi
else
echo "<span foreground=\"#F2777A\">█</span>"
fi