Skip to content

Commit

Permalink
add dunst script to toggle notifs and show history
Browse files Browse the repository at this point in the history
  • Loading branch information
maximelouet committed May 11, 2023
1 parent 724f11e commit ae63d37
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions dunst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env sh
#
# Saumon i3blocks scripts
# dunst (toggle notifs and show previous ones)
#

if ! command -v dunstctl >/dev/null; then
echo " !dep "
exit 33
fi

case $BLOCK_BUTTON in
2) # middle click: show previous notification
dunstctl history-pop
;;
3) # right click: toggle do not disturb
dunstctl set-paused toggle
;;
esac

if [ "$(dunstctl is-paused)" = "true" ]; then
echo "<span color='#f44336'></span>"
else
echo "<span color='#dddddd'></span>"
fi

0 comments on commit ae63d37

Please sign in to comment.