dots

Personal dotfiles
git clone git://git.gormless.xyz/dots.git
Log | Files | Refs

todmenu (571B)


      1 #!/bin/sh
      2 export TODO=$HOME/usr/notes/todo
      3 
      4 todo="$(nl -n rz -s " " "$HOME/usr/notes/todo" | cut -c "6-$*" | dmenu -i -l 10 -p "Todo what?")" || exit 1
      5 test="$(echo "$todo" | cut -f "2-$*" -d " ")"
      6 num=$(echo "$todo" | cut -f 1 -d " ")
      7 
      8 if test "$(grep "$test" "$HOME/usr/notes/todo")" = ""
      9 then
     10 	todo "$todo" & notify-send -i /usr/local/share/icons/ubo-icons-0.1alpha/128x128/apps/mousepad.png "Added \"$todo\" to todo list"
     11 else
     12 	todo -d "$num" & notify-send -i /usr/local/share/icons/ubo-icons-0.1alpha/128x128/apps/mousepad.png "Removed \"$test\" from todo list."
     13 fi