pinwheel: Update spotify-status output in waybar

When no player is active then make sure the `waybar` module takes up no
space
This commit is contained in:
Alexander Heldt
2023-10-26 10:31:27 +02:00
parent f40d0951ad
commit 653f0ae5e2

View File

@@ -6,7 +6,7 @@ let
STATUS=$(${pkgs.playerctl}/bin/playerctl -p spotify status 2>&1)
if [ "$STATUS" = "No players found" ]; then
echo " "
echo ""
else
FORMAT="{{markup_escape(xesam:title)}} - {{markup_escape(xesam:artist)}}"
OUTPUT=$(${pkgs.playerctl}/bin/playerctl -p spotify metadata --format "$FORMAT")
@@ -18,7 +18,7 @@ let
echo "<span font='14' rise='-3000'></span> $OUTPUT"
;;
*)
echo " "
echo "Unknown status: $STATUS"
;;
esac
fi