From c5a93f2de6d0c68cf530374a82703657295bd165 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Wed, 28 Dec 2011 15:35:24 +0100 Subject: PANEL: Show random todo item with color in panel --- .config/herbstluftwm/panel.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '.config/herbstluftwm/panel.sh') 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 ") -- cgit v1.2.3-54-g00ecf