Tech Stack
Displays the current song playing on cmus (if running) in the format: "Artist - Song Title |" as shown in the screenshots.
{ run_command, "%4s ", "pgrep -x cmus > /dev/null && (cmus-remote -C status | grep -q 'tag artist' && echo \"$(cmus-remote -C status | grep -oP '(?<=tag artist ).*') - $(cmus-remote -C status | grep -oP '(?<=tag title ).*') |\" || echo \"$(cmus-remote -C status | grep -oP '(?<=file ).*' | sed 's|.*/||; s|\\.[^.]*$||') |\")" },
Displays network status as:
{ run_command, "%4s ", "nmcli general status | grep -q -w \"connected\" && echo Online || (nmcli general status | grep -q \"connecting\" && echo ... || echo Offline)" },
Gets volume percentage from amixer
{ run_command, "Vol: %4s ", "amixer sget Master | awk -F\"[][]\" '/%/ { print $2 }' | head -n1" },
Gets package count from pacman
{ run_command, "Pkg:%4s " , "pacman -Qq | wc -l"},
Full config.h: