I added wireplumber but the audio volume still wont work with scroll. Audio works just can’t raise and lower it without going into the pulse audio control in the menu.
Edit: Maybe i didn’t add it to the right location?
Edit2: It already has this?
},
“wireplumber”: {
“format”: “ {volume}%”,
“format-muted”: “ muted”,
“on-click-right”: “pavucontrol”,
“on-click”: “wpctl set-mute @DEFAULT_SINK @ toggle”,
“on-scroll-up”: “wpctl set-volume -l 1.0 @DEFAULT_SINK @ 5%+”,
“on-scroll-down”: “wpctl set-volume -l 1.0 @DEFAULT_SINK @ 5%-”,
“tooltip”: true
},
Make sure to add #wireplumber , to your style.css file as well.
Which line do i add it to is the question?
Here:
“modules-right”: [“mpd”, “idle_inhibitor”, “pulseaudio”, “network”, “cpu”, “memory”, “temperature”, “backlight”, “keyboard-state”, “sway/language”, “battery”, “battery#bat2”, “clock”, “tray”],
EDit: Scrolling is working on the mic volume but not on the speaker output volume.
Brtza
February 22, 2024, 9:45am
247
How clean and safe is to have hyprland installed over gnome/kde ?
I mean is there some conflict, especially during system update etc ?
Point of that is to have options for logging, kde or hyprland.
Home folder is the same for both.
But apps are also shared ( what is installed in KDE will be visible on hyprland also )
Every other Hyprland script i have used volume scrolling works.
It works fine for me. My waybar config for pulseaudio:
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": "",
"on-click": "~/.config/waybar/scripts/volume --toggle",
"on-click-right": "pavucontrol",
"on-scroll-up": "~/.config/waybar/scripts/volume --inc",
"on-scroll-down": "~/.config/waybar/scripts/volume --dec",
"scroll-step": 1,
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
}
And here is the script it is referring to:
#!/bin/bash
iDIR="$HOME/.config/HyprV/mako/icons"
# Get Volume
get_volume() {
volume=$(pamixer --get-volume)
echo "$volume"
}
# Get icons
get_icon() {
current=$(get_volume)
if [[ "$current" -eq "0" ]]; then
echo "$iDIR/volume-mute.png"
elif [[ ("$current" -ge "0") && ("$current" -le "30") ]]; then
echo "$iDIR/volume-low.png"
elif [[ ("$current" -ge "30") && ("$current" -le "60") ]]; then
echo "$iDIR/volume-mid.png"
elif [[ ("$current" -ge "60") && ("$current" -le "100") ]]; then
echo "$iDIR/volume-high.png"
fi
}
# Notify
notify_user() {
notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$(get_icon)" "Volume : $(get_volume) %"
}
# Increase Volume
inc_volume() {
pamixer -i 1 && notify_user
}
# Decrease Volume
dec_volume() {
pamixer -d 1 && 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"
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"
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"
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"
fi
}
# Get icons
get_mic_icon() {
current=$(pamixer --default-source --get-volume)
if [[ "$current" -eq "0" ]]; then
echo "$iDIR/microphone.png"
elif [[ ("$current" -ge "0") && ("$current" -le "30") ]]; then
echo "$iDIR/microphone.png"
elif [[ ("$current" -ge "30") && ("$current" -le "60") ]]; then
echo "$iDIR/microphone.png"
elif [[ ("$current" -ge "60") && ("$current" -le "100") ]]; then
echo "$iDIR/microphone.png"
fi
}
# Notify
notify_mic_user() {
notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$(get_mic_icon)" "Mic-Level : $(pamixer --default-source --get-volume) %"
}
# Increase MIC Volume
inc_mic_volume() {
pamixer --default-source -i 1 && notify_mic_user
}
# Decrease MIC Volume
dec_mic_volume() {
pamixer --default-source -d 1 && notify_mic_user
}
# 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
Adjust the paths the waybar config for pulseaudio and script refer to to your liking.
I can’t get the audio to scroll. I have tried all that i know which isn’t much! It just doesn’t work. Any other Hyprland script i have installed they work. If i right click on the waybar speaker icon i get this.
Failed to launch child: pulsemixer
With error: No such file or directory
So you have a volume script and your waybar pulseaudio config points to that script in case of scrolling up or down?
I don’t know if it has a volume script? I am using the redblizzard script installer for hyprland. So pamixer isn’t installed. If i install that then scrolling works on the mic only. Not on the speaker volume. I don’t know enough about it.
I haven’t used redblizzard’s script. Show us the pulseaudio config part in your waybar config.
It’s the same as you showed me and i actually copied yours just to make sure.
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": "",
"on-click": "~/.config/waybar/scripts/volume --toggle",
"on-click-right": "pavucontrol",
"on-scroll-up": "~/.config/waybar/scripts/volume --inc",
"on-scroll-down": "~/.config/waybar/scripts/volume --dec",
"scroll-step": 1,
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pavucontrol"
},
In that case copy the volume script I posted in the earlier post and paste it in your .config/waybar/scripts folder
What am i supposed to name it?
Yes but make it executable