From 653f0ae5e202b77cf40ee049531c23b5a758aeb3 Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Thu, 26 Oct 2023 10:31:27 +0200 Subject: [PATCH] pinwheel: Update `spotify-status` output in `waybar` When no player is active then make sure the `waybar` module takes up no space --- hosts/pinwheel/modules/waybar/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/pinwheel/modules/waybar/default.nix b/hosts/pinwheel/modules/waybar/default.nix index 14eea5e..c726319 100644 --- a/hosts/pinwheel/modules/waybar/default.nix +++ b/hosts/pinwheel/modules/waybar/default.nix @@ -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 " $OUTPUT" ;; *) - echo " " + echo "Unknown status: $STATUS" ;; esac fi