From 89798aa204b9ccf1efe28c096633dce9d3adc2e7 Mon Sep 17 00:00:00 2001 From: Breizh Date: Mon, 22 Feb 2021 01:28:33 +0100 Subject: [PATCH] Fix notifs MPD for webradios --- .config/i3/config | 1 + .i3blocks/toggle-sink | 4 ++-- .local/bin/mpd-notif | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.config/i3/config b/.config/i3/config index f0d25d6..d278d50 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -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 diff --git a/.i3blocks/toggle-sink b/.i3blocks/toggle-sink index e719b66..8b1d021 100755 --- a/.i3blocks/toggle-sink +++ b/.i3blocks/toggle-sink @@ -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 diff --git a/.local/bin/mpd-notif b/.local/bin/mpd-notif index 4fe2191..77c9c0b 100755 --- a/.local/bin/mpd-notif +++ b/.local/bin/mpd-notif @@ -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="Arrêt"