dotfiles

configurations and scripts
git clone https://riazj.com/git/dotfiles
Log | Files | Refs | LICENSE

todo (293B)


      1 #!/bin/sh -e
      2 
      3 TODO="$HOME/todo"
      4 height="$(wc -l "$TODO")"
      5 height="${height% *}"
      6 
      7 while sel="$(dmenu -i -l "$height" < "$TODO")"; do
      8   if grep -q "^$sel$" "$TODO"; then
      9     sed -i "/^$sel$/d" "$TODO"
     10     height=$((height-1))
     11   else
     12     echo "$sel" >> "$TODO"
     13     height=$((height+1))
     14   fi
     15 done