chezmoi: convert key files to templates
Minimal Spotify controller block on main display.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
LONG_NAME=${LONG_NAME:-"%artist - %title"}
|
||||
SHORT_NAME=${SHORT_NAME:-"%title"}
|
||||
case "$BLOCK_BUTTON" in
|
||||
1) dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause ;;
|
||||
2) dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous ;;
|
||||
@@ -7,6 +9,6 @@ case "$BLOCK_BUTTON" in
|
||||
esac
|
||||
|
||||
. "/home/kevin/.cache/wal/colors.sh"
|
||||
long_title=$(spotify-now -i '%artist - %title' -p '' -e '' | sed 's/&/&/g')
|
||||
short_title=$(spotify-now -i '%title' -p '' -e '' | sed 's/&/&/g')
|
||||
long_title=$(spotify-now -i "$LONG_NAME" -p '' -e '' | sed 's/&/&/g')
|
||||
short_title=$(spotify-now -i "$SHORT_NAME" -p '' -e '' | sed 's/&/&/g')
|
||||
printf "$long_title\n$short_title\n%s\n" "$color7"
|
||||
|
||||
@@ -37,7 +37,7 @@ AUDIO_DELTA=${AUDIO_DELTA:-5}
|
||||
# LONG_FORMAT=${LONG_FORMAT:-'${SYMB} ${VOL}% [${INDEX}:${NAME}]'}
|
||||
LONG_FORMAT=${SHORT_FORMAT:-'${SINK_SYMB} ${VOL}%'}
|
||||
# SHORT_FORMAT=${SHORT_FORMAT:-'${SYMB} ${VOL}%[${INDEX}]'}
|
||||
SHORT_FORMAT=${SHORT_FORMAT:-'${SINK_SYMB} ${VOL}%[${INDEX}]'}
|
||||
SHORT_FORMAT=${SHORT_FORMAT:-'${SINK_SYMB} ${VOL}%'}
|
||||
|
||||
# flags {{{ #
|
||||
|
||||
|
||||
Reference in New Issue
Block a user