URI:
       todotxt-dmenu improvements - dotfiles - 🍚 personal arsenal of "rice"
  HTML git clone https://git.drkhsh.at/dotfiles.git
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
   DIR commit 55bcf525ff99db74bf931f12fcecaa7fc2afd549
   DIR parent cbc44d9e2bc0cf027b3f52ad3f493fd689507758
  HTML Author: drkhsh <me@drkhsh.at>
       Date:   Mon, 16 Jun 2025 19:39:35 +0200
       
       todotxt-dmenu improvements
       
       Diffstat:
         M bin/.local/bin/todotxt-dmenu        |      13 +++++++------
       
       1 file changed, 7 insertions(+), 6 deletions(-)
       ---
   DIR diff --git a/bin/.local/bin/todotxt-dmenu b/bin/.local/bin/todotxt-dmenu
       @@ -3,23 +3,24 @@
        # forked from
        # https://git.sr.ht/~jboy/todotxt-dmenu/
        
       -height=$(todo.sh ls | tail -1 | awk '{print $4}')
       +height=$(todo.sh -p ls | tail -1 | awk '{print $4}')
       +[ $height -gt 50 ] && height=50
        prompt="➕✔️"
        
       -cmd=$(todo.sh ls |
       +cmd=$(todo.sh -p ls |
                head -"$height" |
                dmenu -i -l "$height" -p "$prompt")
        
        while [ -n "$cmd" ]; do
       -        if todo.sh ls | grep -q "^$cmd\$" -; then
       -                todo.sh "do" "$(echo "$cmd" | awk '{print $1}')"
       +        if todo.sh -p ls | grep -q "^$cmd\$" -; then
       +                todo.sh -p "do" "$(echo "$cmd" | awk '{print $1}')"
                        height=$(( height - 1 ))
                else
       -                todo.sh add "$cmd"
       +                todo.sh -p add "$cmd"
                        height=$(( height + 1 ))
                fi
        
       -        cmd=$(todo.sh ls |
       +        cmd=$(todo.sh -p ls |
                        head -"$height" |
                        dmenu -i -l "$height" -p "$prompt")
        done