[audio] feat: use pipewire instead of pulseaudio

This commit is contained in:
David JULIEN 2022-10-14 22:49:58 +02:00
parent 9b8ac913ce
commit f387c75ce3
4 changed files with 14 additions and 14 deletions

View File

@ -17,13 +17,13 @@ pid_file "~/.config/mpd/pid"
sticker_file "~/.config/mpd/sticker.sql"
audio_output {
type "pulse"
name "pulse audio"
type "pipewire"
name "PipeWire Sound Server"
}
audio_output {
type "fifo"
name "my_fifo"
name "Visualizer feed"
path "/tmp/mpd.fifo"
format "44100:16:2"
}

View File

@ -3,10 +3,10 @@
# System stuff
XF86AudioMute
pulsemixer --toggle-mute; audio-notify
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; audio-notify
{XF86AudioLowerVolume, XF86AudioRaiseVolume}
pulsemixer --change-volume {-5, +5}; audio-notify
wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%{-,+}; audio-notify
super + u
dmenumount

View File

@ -10,10 +10,10 @@
######################################################################
level="$(pulsemixer --get-volume | awk -F " " '{ printf "%d", $1 }')"
muted="$(pulsemixer --get-mute)"
level="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk -F" " '{print $2*100}')"
muted="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk -F" " '{print $3}')"
if [ "1" = "$muted" ]; then
if [ "[MUTED]" = "$muted" ]; then
dunstify -r 100002 "Sound muted" "$level%"
else
case "$level" in

View File

@ -9,17 +9,17 @@
# @description : volume block for dwmblocks
######################################################################
[ "1" = $(pulsemixer --get-mute) ] && echo " 婢 --- " && exit
level="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk -F" " '{print $2*100}')"
muted="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk -F" " '{print $3}')"
vol="$(pulsemixer --get-volume | awk -F " " '{ printf "%d", $1 }')"
[ "[MUTED]" = "$muted" ] && echo " 婢 --- " && exit
if [ "$vol" -gt "70" ]; then
if [ "$level" -gt "70" ]; then
icon="墳"
elif [ "$vol" -lt "30" ]; then
elif [ "$level" -lt "30" ]; then
icon="奄"
else
icon="奔"
fi
printf " %s %3d%% " $icon $vol
printf " %s %3d%% " $icon $level