forked from Shinonome/dots-hyprland
Added script and keybind to adjust volume
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
change=$1
|
||||
|
||||
current_volume=$(playerctl volume)
|
||||
|
||||
new_volume=$(echo "$current_volume + $change" | bc)
|
||||
|
||||
if (( $(echo "$new_volume > 1.0" | bc -l) )); then
|
||||
new_volume=1.0
|
||||
elif (( $(echo "$new_volume < 0.0" | bc -l) )); then
|
||||
new_volume=0.0
|
||||
fi
|
||||
|
||||
playerctl volume "$new_volume"
|
||||
@@ -177,9 +177,10 @@ bind = Super+Alt, f12, exec, notify-send 'Test notification' "Here's a really lo
|
||||
bind = Super+Alt, Equal, exec, notify-send "Urgent notification" "Ah hell no" -u critical -a 'Hyprland keybind' # [hidden]
|
||||
|
||||
##! Media
|
||||
bindl= Super+Shift, N, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"` # Next track
|
||||
bindl= ,XF86AudioNext, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"` # [hidden]
|
||||
bindl= ,XF86AudioPrev, exec, playerctl previous # [hidden]
|
||||
bindl = Super+Shift, Comma, exec, ~/.config/ags/scripts/music/adjust-volume.sh -0.03 # Raise music volume
|
||||
bindl = Super+Shift, Period, exec, ~/.config/ags/scripts/music/adjust-volume.sh 0.03 # Lower music volume
|
||||
bind = Super+Shift+Alt, mouse:275, exec, playerctl previous # [hidden]
|
||||
bind = Super+Shift+Alt, mouse:276, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"` # [hidden]
|
||||
bindl= Super+Shift, B, exec, playerctl previous # Previous track
|
||||
|
||||
Reference in New Issue
Block a user