#!/bin/bash
hyprctl dismissnotify
# Check if muted
if wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -q "[MUTED]"; then
    # If muted, show notification
    hyprctl notify -1 5000 0 "Volume muted"
    exit 0
fi

hyprctl notify -1 5000 0 "Volume $(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2 * 100}' | sed 's/\.0*$//g')%"