aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/Volume.sh
diff options
context:
space:
mode:
authorDonald Williams <129223418+dwilliam62@users.noreply.github.com>2025-12-29 09:41:55 -0500
committerGitHub <noreply@github.com>2025-12-29 09:41:55 -0500
commit4e8cb959c0fbf0109dbb3d4342d8aaa2e4c1d470 (patch)
tree944daf4ad373740460ca66a76e58bae839f54905 /config/hypr/scripts/Volume.sh
parent59713a66e3dce8b2c006dc1ce7847b761d759147 (diff)
parentcafaa576cbe7018f4c3ef3301fde16b807e74190 (diff)
Merge branch 'development' into patch-3
Diffstat (limited to 'config/hypr/scripts/Volume.sh')
-rwxr-xr-xconfig/hypr/scripts/Volume.sh63
1 files changed, 40 insertions, 23 deletions
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