Created
December 25, 2013 23:25
-
-
Save hauleth/8127857 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SEP= | |
SEPE= | |
CLOCK=⌚ | |
CALENDAR=☼ | |
MUSIC=♫ | |
WIDTH=${1} | |
SMALL=80 | |
MEDIUM=140 | |
if [ "$WIDTH" -gt "$MEDIUM" ]; then | |
if type mpc >/dev/null; then | |
MPD="#[fg=colour252,bg=default,nobold,noitalics,nounderscore]$SEP#[fg=colour16,bg=colour252,bold,noitalics,nounderscore] $MUSIC $(mpc current)" | |
date_colour='colour252' | |
fi | |
fi | |
if [ "$WIDTH" -ge "$SMALL" ]; then | |
UNAME="#[fg=colour252,bg=colour236,nobold,noitalics,nounderscore]$SEP#[fg=colour16,bg=colour252,bold,noitalics,nounderscore] $(uname -n)" | |
fi | |
DATE="#[fg=colour236,bg=${date_colour:-default},nobold,noitalics,nounderscore]$SEP#[fg=colour247,bg=colour236,nobold,noitalics,nounderscore] $CALENDAR $(date +'%D')" | |
TIME="#[fg=colour241,bg=colour236,nobold,noitalics,nounderscore]$SEPE#[fg=colour252,bg=colour236,bold,noitalics,nounderscore] $CLOCK $(date +'%H:%M')" | |
echo "$MPD $DATE $TIME $UNAME " | sed 's/ *$/ /g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This needs to be updated because it gives an error. Awesome work otherwise. Would like to have something highlighted when PREFIX key is pressed. But other then that, great work.