mirror of https://github.com/tiyn/dotfiles
Compare commits
6 Commits
60a947a8a2
...
34c63dd99f
Author | SHA1 | Date |
---|---|---|
tiyn | 34c63dd99f | 2 months ago |
tiyn | 3ce32917a1 | 2 months ago |
tiyn | d6fb696e77 | 2 months ago |
tiyn | 563b3bc5c6 | 2 months ago |
TiynGER | 174e2b76d9 | 2 months ago |
tiyn | f862b777ec | 2 months ago |
@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
|
||||
playerctlstatus=$(playerctl status 2> /dev/null)
|
||||
track="$(playerctl metadata "xesam:artist") - $(playerctl metadata "xesam:title")"
|
||||
track=$(echo "$track" | cut -c1-40)
|
||||
loop=$(playerctl loop)
|
||||
shuffle=$(playerctl shuffle)
|
||||
|
||||
if [ "$loop" = "Playlist" ]
|
||||
then
|
||||
loop_icon=""
|
||||
elif [ "$loop" = "Track" ]
|
||||
then
|
||||
loop_icon=""
|
||||
elif [ "$loop" = "None" ]
|
||||
then
|
||||
loop_icon=""
|
||||
fi
|
||||
|
||||
if [ "$shuffle" = "Off" ]
|
||||
then
|
||||
shuffle_icon=""
|
||||
elif [ "$shuffle" = "On" ]
|
||||
then
|
||||
shuffle_icon=""
|
||||
fi
|
||||
|
||||
|
||||
if [ "$playerctlstatus" = "" ]
|
||||
then
|
||||
echo ""
|
||||
elif [ "$playerctlstatus" = "Playing" ]
|
||||
then
|
||||
echo "$track ^b#282828^^c#dfdfdf^ ▶️ $loop_icon $shuffle_icon ^d^"
|
||||
elif [ "$playerctlstatus" = "Paused" ]
|
||||
then
|
||||
echo "^b#282828^^c#dfdfdf^ $loop_icon $shuffle_icon ^d^"
|
||||
fi
|
Loading…
Reference in new issue