Fix notifs MPD for webradios
This commit is contained in:
parent
513434de7f
commit
89798aa204
3 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>"
|
||||
|
|
Loading…
Reference in a new issue