PANEL: Show random todo item with color in panel
This commit is contained in:
parent
702171d074
commit
c5a93f2de6
1 changed files with 4 additions and 1 deletions
|
@ -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 ")
|
||||
|
|
Loading…
Reference in a new issue