This commit is contained in:
Liam Waldron 2024-04-26 15:09:23 -04:00
parent 2ca5c136da
commit 1dd4472634
3 changed files with 29 additions and 25 deletions

44
config
View File

@ -11,12 +11,12 @@ SCRIPT_DIR=/home/arco/.config/i3blocks/scripts
separator=true
separator_block_width=30
#[mediaplayer2]
#command=$SCRIPT_DIR/mediaplayer2
#label=[ ♪ ]
#CONCISE=false
#interval=1
#color=#ebdbb2
[mediaplayer2]
command=$SCRIPT_DIR/mediaplayer2
label=[ ♪ ]
CONCISE=false
interval=1
color=#ECEFF4
#[mediaplayer]
#command=$SCRIPT_DIR/mediaplayer
@ -27,7 +27,7 @@ separator_block_width=30
[check-security-key]
command=$SCRIPT_DIR/check_security_key
interval=1
color=#ebdbb2
color=#ECEFF4
#[rofi-wttr]
#command=$SCRIPT_DIR/rofi-wttr
@ -59,7 +59,7 @@ STEP=5%
MIXER=pulse
#SCONTROL=[determined automatically]
NATURAL_MAPPING=0
color=#ebdbb2
color=#ECEFF4
[dunst]
command=$SCRIPT_DIR/dunst
@ -74,7 +74,7 @@ command=$SCRIPT_DIR/disk
DIR=/
LABEL=[ 🖴 ]
interval=30
color=#ebdbb2
color=#ECEFF4
[batterybar]
command=$SCRIPT_DIR/batterybar
@ -83,24 +83,24 @@ interval=5
markup=pango
min_width=bat: ■■■■■
# Discharging colors low to high
C1=#cc241d
C2=#d65d0e
C3=#d79921
C4=#fabd2f
C5=#8ec07c
C6=#689d6a
C7=#b8bb26
C8=#98971a
CHARGING_COLOR=#458588
FULL_COLOR=#ebdbb2
AC_COLOR=#535353
color=#ebdbb2
C1=#BF616A
C2=#BF616A
C3=#D08770
C4=#D08770
C5=#EBCB8B
C6=#EBCB8B
C7=#A3BE8C
C8=#A3BE8C
CHARGING_COLOR=#88C0D0
FULL_COLOR=#ECEFF4
AC_COLOR=#88C0D0
color=#ECEFF4
[time]
label=[ 🕰 ]
command=date '+%m/%d/%Y %H:%M'
interval=15
color=#ebdbb2
color=#ECEFF4
#[laptop_mode]
#full_text= ↺ Laptop Mode

View File

@ -6,7 +6,11 @@ ALBUM=$(playerctl metadata album) # Command to get album
MAXCHAR="128" # Maximum characters allowed in string
if [ ${CONCISE} == "false" ]; then
playerctl metadata title > /dev/null
if [ "$?" != 0 ]; then
printf "No players found"
elif [ ${CONCISE} == "false" ]; then
printf "%.${MAXCHAR}s\n" "${TRACK} - by ${ARTIST} - on ${ALBUM}"
elif [ ${CONCISE} == "true" ]; then
printf "%.${MAXCHAR}s\n" "${ARTIST} - ${TRACK}"