Tech Stack
Displays the current song playing on cmus (if running) in the format: "Artist - Song Title |" as shown in the screenshots.
static const char unknown_str[] = "";
in config.h to remove slstatus' 'n/a' thing, so that nothing is displayed if cmus isn't running{ 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"},
Default commented-out reference examples removed.
By default .zshrc is located at ~/.zshrc along with other zsh configuration files, this command will set ~/.config/zsh as the default directory for zsh configuration: export ZDOTDIR=$HOME/.config/zsh