diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh index c955a0c..34f1487 100755 --- a/.config/herbstluftwm/panel.sh +++ b/.config/herbstluftwm/panel.sh @@ -66,7 +66,10 @@ herbstclient pad $monitor $height gmail=`ls ~/documents/mail/gmail/INBOX/new/ | wc -l` archmail=`ls ~/documents/mail/arch/INBOX/new/ | wc -l` aethonmail=`ls ~/documents/mail/aethon/INBOX/new/ | wc -l` - right="$separator 9f: $nfmail $separator gmail: $gmail $separator arch: $archmail $separator aethon: $aethonmail $separator^bg($hintcolor) $date $separator" + todoline=`cat ~/.config/herbstluftwm/todo` + todoline_sha1=`echo $todoline | sha1sum` + todoline_color=${todoline_sha1:0:6} + right="^fg(#$todoline_color)$todoline^fg() $separator 9f: $nfmail $separator gmail: $gmail $separator arch: $archmail $separator aethon: $aethonmail $separator^bg($hintcolor) $date $separator" right_text_only=$(echo -n "$right"|sed 's.\^[^(]*([^)]*)..g') # get width of right aligned text.. and add some space.. width=$(textwidth "$font" "$right_text_only ")