chezmoi: convert key files to templates
Minimal Spotify controller block on main display.
This commit is contained in:
@@ -25,6 +25,12 @@ interval=once
|
||||
signal=1
|
||||
interval=60
|
||||
|
||||
[spotify]
|
||||
label=
|
||||
LONG_NAME=
|
||||
SHORT_NAME=
|
||||
interval=5
|
||||
|
||||
[calendar]
|
||||
interval=30
|
||||
label=
|
||||
|
||||
@@ -30,6 +30,7 @@ interval=30
|
||||
label=
|
||||
DATEFMT=+%H:%M.%a-%m-%d
|
||||
# SHORTFMT=+%H:%M:%S
|
||||
SHORTFMT=+%H:%M.%a-%m-%d
|
||||
HEIGHT=180
|
||||
WIDTH=220
|
||||
|
||||
|
||||
@@ -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 {{{ #
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ abbr ff "cd $fish_fxn_dir"
|
||||
for fxn in (find $fish_fxn_dir -name '*.fish')
|
||||
source $fxn
|
||||
end
|
||||
abbr rf "source ~/.config/fish/config.fish"
|
||||
abbr rfs "sync-shortcuts && source ~/.config/fish/config.fish"
|
||||
abbr rf "chezmoi apply && source ~/.config/fish/config.fish"
|
||||
abbr rfs "sync-shortcuts && chezmoi apply && source ~/.config/fish/config.fish"
|
||||
abbr xf "fish_config"
|
||||
abbr f. "cd .."
|
||||
abbr f.. "cd ../.."
|
||||
|
||||
Reference in New Issue
Block a user