aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/Volume.sh
diff options
context:
space:
mode:
authorJa.KooLit <ejhay.games@gmail.com>2023-12-17 16:08:13 +0900
committerJa.KooLit <ejhay.games@gmail.com>2023-12-17 16:13:47 +0900
commitc4c2716c25936f632aa5bb8fd589a57b53714be8 (patch)
tree650e29a07cb52ff7973361f92968ece49ea19066 /config/hypr/scripts/Volume.sh
parent1ddbdc34f9544d9d54c1a9c1717955573484eac2 (diff)
1.) Added ChangeBlur keybinds (Super Shift B), same added in Keyhints.sh (Super H)
2.) Increased Blur Settings 3.) Tweaked and Cleaned up scripts, some small tweak only like adding a bell icon - > Gamemode toggle (Super Shift G) will now reload previous wallpaper once back to normal modified - > The pywalSwww.sh is integrated in Refresh.sh to update rofi background
Diffstat (limited to 'config/hypr/scripts/Volume.sh')
-rwxr-xr-xconfig/hypr/scripts/Volume.sh28
1 files changed, 20 insertions, 8 deletions
diff --git a/config/hypr/scripts/Volume.sh b/config/hypr/scripts/Volume.sh
index a51999df..6a50cb77 100755
--- a/config/hypr/scripts/Volume.sh
+++ b/config/hypr/scripts/Volume.sh
@@ -30,29 +30,35 @@ notify_user() {
# Increase Volume
inc_volume() {
- pamixer -i 5 && notify_user
+ if [ "$(pamixer --get-mute)" == "true" ]; then
+ pamixer -u && notify_user
+ fi
+ pamixer -i 5 && notify_user
}
# Decrease Volume
dec_volume() {
- pamixer -d 5 && notify_user
+ if [ "$(pamixer --get-mute)" == "true" ]; then
+ pamixer -u && notify_user
+ fi
+ pamixer -d 5 && notify_user
}
# Toggle Mute
toggle_mute() {
if [ "$(pamixer --get-mute)" == "false" ]; then
- pamixer -m && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$iDIR/volume-mute.png" "Volume Switched OFF"
+ pamixer -m && dunstify -u low -i "$iDIR/volume-mute.png" "Volume Switched OFF"
elif [ "$(pamixer --get-mute)" == "true" ]; then
- pamixer -u && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$(get_icon)" "Volume Switched ON"
+ pamixer -u && dunstify -u low -i "$(get_icon)" "Volume Switched ON"
fi
}
# Toggle Mic
toggle_mic() {
if [ "$(pamixer --default-source --get-mute)" == "false" ]; then
- pamixer --default-source -m && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$iDIR/microphone-mute.png" "Microphone Switched OFF"
+ pamixer --default-source -m && dunstify -u low -i "$iDIR/microphone-mute.png" "Microphone Switched OFF"
elif [ "$(pamixer --default-source --get-mute)" == "true" ]; then
- pamixer -u --default-source u && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$iDIR/microphone.png" "Microphone Switched ON"
+ pamixer -u --default-source u && dunstify -u low -i "$iDIR/microphone.png" "Microphone Switched ON"
fi
}
# Get icons
@@ -75,12 +81,18 @@ notify_mic_user() {
# Increase MIC Volume
inc_mic_volume() {
- pamixer --default-source -i 5 && notify_mic_user
+ if [ "$(pamixer --default-source --get-mute)" == "true" ]; then
+ pamixer --default-source -u && notify_mic_user
+ fi
+ pamixer --default-source -i 5 && notify_mic_user
}
# Decrease MIC Volume
dec_mic_volume() {
- pamixer --default-source -d 5 && notify_mic_user
+ if [ "$(pamixer --default-source --get-mute)" == "true" ]; then
+ pamixer --default-source -u && notify_mic_user
+ fi
+ pamixer --default-source -d 5 && notify_mic_user
}
# Execute accordingly
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage