Fix notifs MPD for webradios

This commit is contained in:
Breizh 2021-02-22 01:28:33 +01:00
parent c20fbf8e93
commit a4a073a0ed
3 changed files with 5 additions and 4 deletions

View file

@ -188,6 +188,7 @@ bindsym $mod+q split toggle
# toggle fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
bindsym $mod+Shift+f fullscreen toggle global
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking

View file

@ -7,10 +7,10 @@ if [[ -n "$button" ]]
then
if [[ "$currentport" == "Active Port: analog-output-lineout" ]]
then
pactl set-sink-port "alsa_output.pci-0000:0b:00.3.analog-stereo" "analog-output-headphones"
pactl set-sink-port "alsa_output.pci-0000_0b_00.3.analog-stereo" "analog-output-headphones"
echo "casque"
else
pactl set-sink-port "alsa_output.pci-0000:0b:00.3.analog-stereo" "analog-output-lineout"
pactl set-sink-port "alsa_output.pci-0000_0b_00.3.analog-stereo" "analog-output-lineout"
echo "front "
fi
pkill -RTMIN+10 i3blocks

View file

@ -10,12 +10,12 @@ while true
do
systemctl --user is-active mpd.service &>/dev/null || exit 1
timeout 5 mpc -w current
onelineinfos="$(mpc -f '[%artist%§]%title%|[%file%]' current)"
onelineinfos="$(mpc -f '[%artist%|%name%§]%title%|[%file%]' current)"
if [[ "$onelineinfos" != "$(<${runtime}/mpd)" ]]
then
echo "$onelineinfos" > ${runtime}/mpd
echo "$(<${runtime}/mpd) " > ${runtime}/mpd-scroll
infos=$(mpc -f '[[%artist%\n]%title%[\n%album%]]|[%file%]' current)
infos=$(mpc -f '[[%artist%|%name%\n]%title%[\n%album%]]|[%file%]' current)
if [[ -z "$infos" ]]
then
infos="<i>Arrêt</i>"