From f9f087f055dcca066b74da159a448ed227f26e7e Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Thu, 7 Sep 2023 23:50:02 -0400 Subject: added music info to waybar --- home-config/waybar/modules/spotify.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'home-config/waybar/modules/spotify.sh') diff --git a/home-config/waybar/modules/spotify.sh b/home-config/waybar/modules/spotify.sh index a75136c..3368d88 100755 --- a/home-config/waybar/modules/spotify.sh +++ b/home-config/waybar/modules/spotify.sh @@ -1,12 +1,12 @@ #!/bin/sh -class=$(playerctl metadata --player=spotifyd --format '{{lc(status)}}') -icon="" +class=$(playerctl metadata --format '{{lc(status)}}') +icon="󰽴" if [[ $class == "playing" ]]; then - info=$(playerctl metadata --player=spotifyd --format '{{artist}} - {{title}}') + info=$(playerctl metadata --format '{{artist}} - {{title}}') if [[ ${#info} > 40 ]]; then - info=$(echo $info | cut -c1-40)"..." + info=$(playerctl metadata --format '{{title}}' | cut -c1-40)"..." fi text=$info" "$icon elif [[ $class == "paused" ]]; then -- cgit v1.2.3