Dotfiles for my tiling window manager + terminal workflow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
775 B

6 years ago
6 years ago
  1. #!/bin/bash
  2. LONG_NAME=${LONG_NAME:-"%artist - %title"}
  3. SHORT_NAME=${SHORT_NAME:-"%title"}
  4. case "$BLOCK_BUTTON" in
  5. 1) dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause ;;
  6. 2) dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous ;;
  7. 3) dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next ;;
  8. esac
  9. . "/home/kevin/.cache/wal/colors.sh"
  10. long_title=$(spotify-now -i "$LONG_NAME" -p '' -e '' | sed 's/&/&/g')
  11. short_title=$(spotify-now -i "$SHORT_NAME" -p '' -e '' | sed 's/&/&/g')
  12. printf "$long_title\n$short_title\n%s\n" "$color7"