diff options
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/panel.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/herbstluftwm/.config/herbstluftwm/panel.sh b/herbstluftwm/.config/herbstluftwm/panel.sh index 002877e..33ef886 100755 --- a/herbstluftwm/.config/herbstluftwm/panel.sh +++ b/herbstluftwm/.config/herbstluftwm/panel.sh | |||
| @@ -66,7 +66,18 @@ fi | |||
| 66 | if [ $player_status = "Playing" ]; then | 66 | if [ $player_status = "Playing" ]; then |
| 67 | player_artist=$(playerctl metadata artist) | 67 | player_artist=$(playerctl metadata artist) |
| 68 | player_title=$(playerctl metadata title) | 68 | player_title=$(playerctl metadata title) |
| 69 | echo -e "music\tPlaying: $player_title - $player_artist" | 69 | playing="$player_title - $player_artist" |
| 70 | |||
| 71 | if [ "$current" != "$playing" ] ; then | ||
| 72 | current=$playing | ||
| 73 | scrolling=$current | ||
| 74 | elif [ ${#scrolling} -gt "24" ] ; then | ||
| 75 | scrolling=${scrolling:1} | ||
| 76 | else | ||
| 77 | scrolling=$current | ||
| 78 | fi | ||
| 79 | |||
| 80 | echo -e "music\tPlaying: ${scrolling:0:24}" | ||
| 70 | else | 81 | else |
| 71 | echo -e "music\toff" | 82 | echo -e "music\toff" |
| 72 | fi | 83 | fi |
