#!/usr/bin/env bash # toggles dunstctl + sends a message (thru dounst ironically) lvl=$(dunstctl get-pause-level) send_msg() { dunstify -u low \ -a Backlight \ -r 92 \ -i ~/.icons/candy-icons/apps/scalable/cliq.svg \ "Toggled dunst $1" } if [[ $lvl == "0" ]]; then # dunst is currently enabled; send message first then disable dunstctl close-all # send_msg "off" # sleep 2 dunstctl set-paused toggle else # dunst is currently disabled; enable then send message dunstctl set-paused toggle # send_msg "on" fi