This commit is contained in:
2024-02-08 18:36:37 -05:00
parent 9ec09f9238
commit 2ca5c136da
9 changed files with 318 additions and 26 deletions

15
scripts/mediaplayer2 Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
TRACK=$(playerctl metadata title) # Command to get track
ARTIST=$(playerctl metadata artist) # Command to get artist
ALBUM=$(playerctl metadata album) # Command to get album
MAXCHAR="128" # Maximum characters allowed in string
if [ ${CONCISE} == "false" ]; then
printf "%.${MAXCHAR}s\n" "${TRACK} - by ${ARTIST} - on ${ALBUM}"
elif [ ${CONCISE} == "true" ]; then
printf "%.${MAXCHAR}s\n" "${ARTIST} - ${TRACK}"
else
printf "error: 'CONCISE' must be defined in i3blocks config\n"
fi