1
0
mirror of https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles.git synced 2025-09-15 09:45:58 +03:00
Files
linux-nixos-hyprland-config…/home/.config/fish/functions/dunst_pause.fish
2023-09-28 03:29:43 +03:00

20 lines
829 B
Fish

function dunst_pause
set COUNT_WAITING (dunstctl count waiting)
set COUNT_DISPLAYED (dunstctl count displayed)
set ENABLED "{ \"text\": \"󰂜\", \"tooltip\": \"notifications <span color='#a6da95'>on</span>\", \"class\": \"on\" }"
set DISABLED "{ \"text\": \"󰪑\", \"tooltip\": \"notifications <span color='#ee99a0'>off</span>\", \"class\": \"off\" }"
if [ $COUNT_DISPLAYED != 0 ]
set ENABLED "{ \"text\": \"󰂚$COUNT_DISPLAYED\", \"tooltip\": \"$COUNT_DISPLAYED notifications\", \"class\": \"on\" }"
end
if [ $COUNT_WAITING != 0 ]
set DISABLED "{ \"text\": \"󰂛$COUNT_WAITING\", \"tooltip\": \"(silent) $COUNT_WAITING notifications\", \"class\": \"off\" }"
end
if dunstctl is-paused | rg -q "false"
echo $ENABLED
else
echo $DISABLED
end
end