notify-send grouping
This commit is contained in:
parent
e55574c842
commit
f6a47b4eb3
3 changed files with 8 additions and 8 deletions
|
@ -3,13 +3,13 @@
|
|||
down() {
|
||||
brightnessctl set 5%-
|
||||
brightnessctl=$(brightnessctl | grep -oP "(\d+(\.\d+)?(?=%))")
|
||||
notify-send -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 -h string:x-canonical-private-synchronous:brightness
|
||||
}
|
||||
|
||||
up() {
|
||||
brightnessctl set 5%+
|
||||
brightnessctl=$(brightnessctl | grep -oP "(\d+(\.\d+)?(?=%))")
|
||||
notify-send -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 -h string:x-canonical-private-synchronous:brightness
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
|
|
@ -4,7 +4,7 @@ down() {
|
|||
pamixer -d 2
|
||||
volume=$(pamixer --get-volume)
|
||||
[$volume -gt 0 ] && volume=`expr $volume`
|
||||
notify-send -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 -h string:x-canonical-private-synchronous:volume
|
||||
canberra-gtk-play -i audio-volume-change -d "changevolume"
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ up() {
|
|||
pamixer -i 2
|
||||
volume=$(pamixer --get-volume)
|
||||
[ $volume -lt 1000 ] && volume=`expr $volume`
|
||||
notify-send -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 -h string:x-canonical-private-synchronous:volume
|
||||
canberra-gtk-play -i audio-volume-change -d "changevolume"
|
||||
}
|
||||
|
||||
|
@ -20,10 +20,10 @@ mute() {
|
|||
muted="$(pamixer --get-mute)"
|
||||
if $muted; then
|
||||
pamixer -u
|
||||
notify-send -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 -h string:x-canonical-private-synchronous:volume
|
||||
else
|
||||
pamixer -m
|
||||
notify-send -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 -h string:x-canonical-private-synchronous:volume
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ handshake=$(ip a show "$interface" | grep 'link')
|
|||
if [[ -n "$handshake" ]]; then
|
||||
# If it's up, bring it down
|
||||
pkexec wg-quick down "$interface"
|
||||
notify-send -a "WireGuard" "Disconnected from $interface"
|
||||
notify-send -a "WireGuard" "Disconnected from $interface" -h string:x-canonical-private-synchronous:vpn
|
||||
else
|
||||
# Otherwise, bring it up
|
||||
pkexec wg-quick up "$interface"
|
||||
notify-send -a "WireGuard" "Connected to $interface"
|
||||
notify-send -a "WireGuard" "Connected to $interface" -h string:x-canonical-private-synchronous:vpn
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue