notify-send instead of dunstify

This commit is contained in:
nomadics9 2024-10-25 17:44:10 +03:00
parent cf751fc088
commit e55574c842
5 changed files with 12 additions and 12 deletions

View file

@ -3,13 +3,13 @@
down() { down() {
brightnessctl set 5%- brightnessctl set 5%-
brightnessctl=$(brightnessctl | grep -oP "(\d+(\.\d+)?(?=%))") brightnessctl=$(brightnessctl | grep -oP "(\d+(\.\d+)?(?=%))")
dunstify -a "Brightness" "Decreasing to $brightnessctl%" -h int:value:"$brightnessctl" -i ~/icons/brightness.png -r 2593 -u normal notify-send -a "Brightness" "Decreasing to $brightnessctl%" -h int:value:"$brightnessctl" -i ~/icons/brightness.png -r 2593 -u normal
} }
up() { up() {
brightnessctl set 5%+ brightnessctl set 5%+
brightnessctl=$(brightnessctl | grep -oP "(\d+(\.\d+)?(?=%))") brightnessctl=$(brightnessctl | grep -oP "(\d+(\.\d+)?(?=%))")
dunstify -a "BRightness" "Increasing to $brightnessctl%" -h int:value:"$brightnessctl" -i ~/icons/brightness.png -r 2593 -u normal notify-send -a "BRightness" "Increasing to $brightnessctl%" -h int:value:"$brightnessctl" -i ~/icons/brightness.png -r 2593 -u normal
} }
case "$1" in case "$1" in

View file

@ -3,18 +3,18 @@
if hyprctl monitors | grep '2560x1600@120.00000'; then if hyprctl monitors | grep '2560x1600@120.00000'; then
json='{"text": "60", "tooltip": "Frequency", "class": "custom/power-menu", "percentage": 60 }' json='{"text": "60", "tooltip": "Frequency", "class": "custom/power-menu", "percentage": 60 }'
echo -e $json >~/.config/hypr/scripts/hz.json echo -e $json >~/.config/hypr/scripts/hz.json
hyprctl keyword monitor eDP-1,2560x1600@60,0x0,1.25 && dunstify "Set to 60Hz" -a "Monitor" -u "low" -i "/home/nomad/icons/desktop.png" -r "123" hyprctl keyword monitor eDP-1,2560x1600@60,0x0,1.25 && notify-send "Set to 60Hz" -a "Monitor" -u "low" -i "/home/nomad/icons/desktop.png" -r "123"
exit exit
fi fi
if hyprctl monitors | grep '2560x1600@90.00000'; then if hyprctl monitors | grep '2560x1600@90.00000'; then
json='{"text": "120", "tooltip": "Frequency", "class": "custom/power-menu", "percentage": 120 }' json='{"text": "120", "tooltip": "Frequency", "class": "custom/power-menu", "percentage": 120 }'
echo -e $json >~/.config/hypr/scripts/hz.json echo -e $json >~/.config/hypr/scripts/hz.json
hyprctl keyword monitor eDP-1,2560x1600@120,0x0,1.25 && dunstify "Set to 120Hz" -a "Monitor" -u "low" -i "/home/nomad/icons/desktop.png" -r "123" hyprctl keyword monitor eDP-1,2560x1600@120,0x0,1.25 && notify-send "Set to 120Hz" -a "Monitor" -u "low" -i "/home/nomad/icons/desktop.png" -r "123"
exit exit
fi fi
if hyprctl monitors | grep '2560x1600@60.00200'; then if hyprctl monitors | grep '2560x1600@60.00200'; then
json='{"text": "90", "tooltip": "Frequency", "class": "custom/power-menu", "percentage": 90 }' json='{"text": "90", "tooltip": "Frequency", "class": "custom/power-menu", "percentage": 90 }'
echo -e $json >~/.config/hypr/scripts/hz.json echo -e $json >~/.config/hypr/scripts/hz.json
hyprctl keyword monitor eDP-1,2560x1600@90,0x0,1.25 && dunstify "Set to 90Hz" -a "Monitor" -u "low" -i "/home/nomad/icons/desktop.png" -r "123" hyprctl keyword monitor eDP-1,2560x1600@90,0x0,1.25 && notify-send "Set to 90Hz" -a "Monitor" -u "low" -i "/home/nomad/icons/desktop.png" -r "123"
exit exit
fi fi

View file

@ -4,7 +4,7 @@ down() {
pamixer -d 2 pamixer -d 2
volume=$(pamixer --get-volume) volume=$(pamixer --get-volume)
[$volume -gt 0 ] && volume=`expr $volume` [$volume -gt 0 ] && volume=`expr $volume`
dunstify -a "Volume" "Decreasing to $volume%" -h int:value:"$volume" -i ~/icons/low-volume.png -r 2593 -u normal notify-send -a "Volume" "Decreasing to $volume%" -h int:value:"$volume" -i ~/icons/low-volume.png -r 2593 -u normal
canberra-gtk-play -i audio-volume-change -d "changevolume" canberra-gtk-play -i audio-volume-change -d "changevolume"
} }
@ -12,7 +12,7 @@ up() {
pamixer -i 2 pamixer -i 2
volume=$(pamixer --get-volume) volume=$(pamixer --get-volume)
[ $volume -lt 1000 ] && volume=`expr $volume` [ $volume -lt 1000 ] && volume=`expr $volume`
dunstify -a "Volume" "Increasing to $volume%" -h int:value:"$volume" -i ~/icons/high-volume.png -r 2593 -u normal notify-send -a "Volume" "Increasing to $volume%" -h int:value:"$volume" -i ~/icons/high-volume.png -r 2593 -u normal
canberra-gtk-play -i audio-volume-change -d "changevolume" canberra-gtk-play -i audio-volume-change -d "changevolume"
} }
@ -20,10 +20,10 @@ mute() {
muted="$(pamixer --get-mute)" muted="$(pamixer --get-mute)"
if $muted; then if $muted; then
pamixer -u pamixer -u
dunstify -a "VOLUME" "UNMUTED" -i ~/.config/dunst/assets/ui/volume_high.svg -r 2593 -u normal notify-send -a "VOLUME" "UNMUTED" -i ~/.config/dunst/assets/ui/volume_high.svg -r 2593 -u normal
else else
pamixer -m pamixer -m
dunstify -a "VOLUME" "MUTED" -i ~/.config/dunst/assets/ui/volume_muted.svg -r 2593 -u normal notify-send -a "VOLUME" "MUTED" -i ~/.config/dunst/assets/ui/volume_muted.svg -r 2593 -u normal
fi fi
} }

View file

@ -9,9 +9,9 @@ handshake=$(ip a show "$interface" | grep 'link')
if [[ -n "$handshake" ]]; then if [[ -n "$handshake" ]]; then
# If it's up, bring it down # If it's up, bring it down
pkexec wg-quick down "$interface" pkexec wg-quick down "$interface"
dunstify -a "WireGuard" "Disconnected from $interface" notify-send -a "WireGuard" "Disconnected from $interface"
else else
# Otherwise, bring it up # Otherwise, bring it up
pkexec wg-quick up "$interface" pkexec wg-quick up "$interface"
dunstify -a "WireGuard" "Connected to $interface" notify-send -a "WireGuard" "Connected to $interface"
fi fi

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
dunstify -a "🔍 Wireless" "Scanning for networks" -t 3000 notify-send -a "🔍 Wireless" "Scanning for networks" -t 3000
# Define the GTK theme as a variable for easy changes # Define the GTK theme as a variable for easy changes
GTK_THEME_NAME="Nightfox-Dark" GTK_THEME_NAME="Nightfox-Dark"