scripts
This commit is contained in:
commit
6e5095f3cf
35 changed files with 453 additions and 0 deletions
23
dwm/spotify.sh
Executable file
23
dwm/spotify.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
#play=$(dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus' | grep -o '".*"')
|
||||
#if [ $(pidof spotify | wc -c) -gt 0 ]
|
||||
#then
|
||||
# artist="$(sp metadata | sed -n 6p | sed -E 's/artist\|//')"
|
||||
# title="$(sp metadata | sed -n 9p | sed -E 's/title\|//')"
|
||||
# album="$(sp metadata | sed -n 4p | sed -E 's/album\|//')"
|
||||
# meta="${artist} - ${title} [${album}]"
|
||||
|
||||
# if [ $play == \"Paused\" ]; then
|
||||
# icon=" "
|
||||
# elif [ $play == \"Playing\" ]; then
|
||||
# icon=" "
|
||||
# else
|
||||
# icon=""
|
||||
# meta=""
|
||||
# fi
|
||||
#fi
|
||||
|
||||
# <200b> is the 0 width space. The trailing whitespace gets removed and idk how to prevent that, so I add a 0 width space
|
||||
#echo "^c#1ED750^${icon}${meta} "
|
||||
|
||||
echo "$(playerctl --player=spotify metadata --format '{{ status }}: {{ artist }} - {{ title }}') "
|
||||
Loading…
Add table
Add a link
Reference in a new issue