all repos — dotfiles @ 9e412faa90f871b9fc36c22e01967bb92e516bb4

linux dotfiles

i3blocks/taskwarrior (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
#!/bin/sh
incount=$(task +PENDING +in count)
todocount=$(task +PENDING -in count)
inbox_icon=$(echo -en "<b><span font='Font Awesome 5 Free'>\uf01c</span></b>")
todo_icon=$(echo -en "<b><span font='Font Awesome 5 Free'>\uf071</span></b>")

if [ $incount -gt 0 ]
then
    inbox_out=$(echo -en "$inbox_icon  <b>$incount</b>")
fi

if [ $todocount -gt 0 ]
then
    todo_out=$(echo -en "<span color='#d8c61e'>$todo_icon  <b>$todocount</b></span>")
fi

[ "$todo_out" ] && [ "$inbox_out" ] && separator=$(echo "<span color='#666666'>  ╱  </span>")

if [ "$todo_out" ] || [ "$inbox_out" ]
then
    echo -e "$todo_out$separator$inbox_out"
fi