Fixed broken notifications

This commit is contained in:
edwark43 2025-03-17 20:09:32 -04:00
parent 69da425885
commit dd6bae7680
4 changed files with 8 additions and 8 deletions

View File

@ -87,7 +87,7 @@ super + {_,shift + }q
# Reload Keybindings
super + Escape
pkill -USR1 -x sxhkd; dunstify -u low -i ~/.local/share/assets/reload.svg 'sxhkd' 'The configuration file has been reloaded successfully!'
pkill -USR1 -x sxhkd; notify-send -u low -i ~/.local/share/assets/reload.svg 'sxhkd' 'The configuration file has been reloaded successfully!'
#####

View File

@ -7,7 +7,7 @@ function send_notification {
icon="$HOME/.local/share/assets/brightness.svg"
brightness=$(brightnessctl i | grep -oP '\(\K[^%\)]+')
bar=$(seq -s "─" 0 $((brightness / 5)) | sed 's/[0-9]//g')
dunstify "Brightness $brightness%" -i $icon -r 5555 -u normal -h int:value:$(($brightness))
notify-send "Brightness $brightness%" -i $icon -r 5555 -u normal -h int:value:$(($brightness))
}
case $1 in
@ -19,4 +19,4 @@ case $1 in
brightnessctl set "${BRIGHTNESS_STEPS:-5}%-" -q
send_notification
;;
esac
esac

View File

@ -9,9 +9,9 @@ filename="$dir/ss-${timestamp}.png"
show_notification() {
if [[ -e "$filename" ]]; then
dunstify --replace=699 -i "$filename" "Screenshot" "Screenshot saved and copied to clipboard"
notify-send -r 699 -i "$filename" "Screenshot" "Screenshot saved and copied to clipboard"
else
dunstify --replace=699 -i custom-trash-bin "Screenshot" "Screenshot Canceled"
notify-send -r 699 -i user-trash "Screenshot" "Screenshot Canceled"
fi
}
@ -23,7 +23,7 @@ take_screenshot() {
countdown() {
for sec in $(seq "$1" -1 1); do
dunstify -t 1000 --replace=699 -i ~/.local/misc/share/assets/screenshot.svg "Taking screenshot in : $sec"
notify-send -t 1000 -r 699 -i ~/.local/misc/share/assets/screenshot.svg "Taking screenshot in : $sec"
sleep 1
done
}

View File

@ -3,7 +3,7 @@
# Icons
vol_dir="$HOME/.local/share/assets"
notify_cmd='dunstify -u low -h string:x-dunst-stack-tag:cvolum'
notify_cmd='notify-send -u low -h string:x-dunst-stack-tag:cvolum'
# Get Volume
get_volume() {
@ -56,4 +56,4 @@ if command -v pamixer &>/dev/null; then
esac
else
${notify_cmd} "'pamixer' is not installed."
fi
fi