[audio] feat: use pipewire instead of pulseaudio
This commit is contained in:
parent
9b8ac913ce
commit
f387c75ce3
@ -17,13 +17,13 @@ pid_file "~/.config/mpd/pid"
|
|||||||
sticker_file "~/.config/mpd/sticker.sql"
|
sticker_file "~/.config/mpd/sticker.sql"
|
||||||
|
|
||||||
audio_output {
|
audio_output {
|
||||||
type "pulse"
|
type "pipewire"
|
||||||
name "pulse audio"
|
name "PipeWire Sound Server"
|
||||||
}
|
}
|
||||||
|
|
||||||
audio_output {
|
audio_output {
|
||||||
type "fifo"
|
type "fifo"
|
||||||
name "my_fifo"
|
name "Visualizer feed"
|
||||||
path "/tmp/mpd.fifo"
|
path "/tmp/mpd.fifo"
|
||||||
format "44100:16:2"
|
format "44100:16:2"
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
# System stuff
|
# System stuff
|
||||||
|
|
||||||
XF86AudioMute
|
XF86AudioMute
|
||||||
pulsemixer --toggle-mute; audio-notify
|
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; audio-notify
|
||||||
|
|
||||||
{XF86AudioLowerVolume, XF86AudioRaiseVolume}
|
{XF86AudioLowerVolume, XF86AudioRaiseVolume}
|
||||||
pulsemixer --change-volume {-5, +5}; audio-notify
|
wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%{-,+}; audio-notify
|
||||||
|
|
||||||
super + u
|
super + u
|
||||||
dmenumount
|
dmenumount
|
||||||
|
@ -10,10 +10,10 @@
|
|||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|
||||||
level="$(pulsemixer --get-volume | awk -F " " '{ printf "%d", $1 }')"
|
level="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk -F" " '{print $2*100}')"
|
||||||
muted="$(pulsemixer --get-mute)"
|
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%"
|
dunstify -r 100002 "Sound muted" "$level%"
|
||||||
else
|
else
|
||||||
case "$level" in
|
case "$level" in
|
||||||
|
@ -9,17 +9,17 @@
|
|||||||
# @description : volume block for dwmblocks
|
# @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="墳"
|
icon="墳"
|
||||||
elif [ "$vol" -lt "30" ]; then
|
elif [ "$level" -lt "30" ]; then
|
||||||
icon="奄"
|
icon="奄"
|
||||||
else
|
else
|
||||||
icon="奔"
|
icon="奔"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf " %s %3d%% " $icon $vol
|
printf " %s %3d%% " $icon $level
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user