diff options
Diffstat (limited to 'home-config/waybar/modules/spotify.sh')
-rwxr-xr-x | home-config/waybar/modules/spotify.sh | 8 |
1 files changed, 4 insertions, 4 deletions
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 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | class=$(playerctl metadata --player=spotifyd --format '{{lc(status)}}') | 3 | class=$(playerctl metadata --format '{{lc(status)}}') |
4 | icon="" | 4 | icon="" |
5 | 5 | ||
6 | if [[ $class == "playing" ]]; then | 6 | if [[ $class == "playing" ]]; then |
7 | info=$(playerctl metadata --player=spotifyd --format '{{artist}} - {{title}}') | 7 | info=$(playerctl metadata --format '{{artist}} - {{title}}') |
8 | if [[ ${#info} > 40 ]]; then | 8 | if [[ ${#info} > 40 ]]; then |
9 | info=$(echo $info | cut -c1-40)"..." | 9 | info=$(playerctl metadata --format '{{title}}' | cut -c1-40)"..." |
10 | fi | 10 | fi |
11 | text=$info" "$icon | 11 | text=$info" "$icon |
12 | elif [[ $class == "paused" ]]; then | 12 | elif [[ $class == "paused" ]]; then |