aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Williams <129223418+dwilliam62@users.noreply.github.com>2025-12-22 21:39:03 -0500
committerGitHub <noreply@github.com>2025-12-22 21:39:03 -0500
commit2d04b9b25cde3b16b319b47a249bd7b4fb22d30e (patch)
tree5b501914f2a0f2f1c30f37edf5bbff97f91a5122
parent10a6c5250619c89542e39b4c8b4d1f468e72d41f (diff)
parent2d2f6198a92278a141c333926a94d8e82de0570d (diff)
Merge pull request #887 from rgarofano/development
feat: Add precise volume adjustment of 1 using alternate keybindings
-rw-r--r--config/hypr/configs/Keybinds.conf2
-rwxr-xr-xconfig/hypr/scripts/Volume.sh63
2 files changed, 42 insertions, 23 deletions
diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf
index 1ddbc81a..7d0e3fef 100644
--- a/config/hypr/configs/Keybinds.conf
+++ b/config/hypr/configs/Keybinds.conf
@@ -106,6 +106,8 @@ bindd = ALT, tab, bring active to top, bringactivetotop
# Special Keys / Hot Keys
bindeld = , xf86audioraisevolume, volume up, exec, $scriptsDir/Volume.sh --inc
bindeld = , xf86audiolowervolume, volume down, exec, $scriptsDir/Volume.sh --dec
+bindeld = ALT, xf86audioraisevolume, volume up precise, exec, $scriptsDir/Volume.sh --inc-precise
+bindeld = ALT, xf86audiolowervolume, volume down precise, exec, $scriptsDir/Volume.sh --dec-precise
bindld = , xf86AudioMicMute, toggle mic mute, exec, $scriptsDir/Volume.sh --toggle-mic
bindld = , xf86audiomute, toggle mute, exec, $scriptsDir/Volume.sh --toggle
bindld = , xf86Sleep, sleep, exec, systemctl suspend
diff --git a/config/hypr/scripts/Volume.sh b/config/hypr/scripts/Volume.sh
index 4c82f543..d870519c 100755
--- a/config/hypr/scripts/Volume.sh
+++ b/config/hypr/scripts/Volume.sh
@@ -44,7 +44,7 @@ inc_volume() {
if [ "$(pamixer --get-mute)" == "true" ]; then
toggle_mute
else
- pamixer -i 5 --allow-boost --set-limit 150 && notify_user
+ pamixer -i "$1" --allow-boost --set-limit 150 && notify_user
fi
}
@@ -53,7 +53,7 @@ dec_volume() {
if [ "$(pamixer --get-mute)" == "true" ]; then
toggle_mute
else
- pamixer -d 5 && notify_user
+ pamixer -d "$1" && notify_user
fi
}
@@ -120,24 +120,41 @@ dec_mic_volume() {
}
# Execute accordingly
-if [[ "$1" == "--get" ]]; then
- get_volume
-elif [[ "$1" == "--inc" ]]; then
- inc_volume
-elif [[ "$1" == "--dec" ]]; then
- dec_volume
-elif [[ "$1" == "--toggle" ]]; then
- toggle_mute
-elif [[ "$1" == "--toggle-mic" ]]; then
- toggle_mic
-elif [[ "$1" == "--get-icon" ]]; then
- get_icon
-elif [[ "$1" == "--get-mic-icon" ]]; then
- get_mic_icon
-elif [[ "$1" == "--mic-inc" ]]; then
- inc_mic_volume
-elif [[ "$1" == "--mic-dec" ]]; then
- dec_mic_volume
-else
- get_volume
-fi \ No newline at end of file
+case "$1" in
+"--get")
+ get_volume
+ ;;
+"--inc")
+ inc_volume 5
+ ;;
+"--inc-precise")
+ inc_volume 1
+ ;;
+"--dec")
+ dec_volume 5
+ ;;
+"--dec-precise")
+ dec_volume 1
+ ;;
+"--toggle")
+ toggle_mute
+ ;;
+"--toggle-mic")
+ toggle_mic
+ ;;
+"--get-icon")
+ get_icon
+ ;;
+"--get-mic-icon")
+ get_mic_icon
+ ;;
+"--mic-inc")
+ inc_mic_volume
+ ;;
+"--mic-dec")
+ dec_mic_volume
+ ;;
+*)
+ get_volume
+ ;;
+esac
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage