void/scripts/todo
2024-02-28 22:45:58 -05:00

17 lines
430 B
Bash
Executable File

#!/bin/sh
# dmenu todo script - developed by acidvegas (https://git.acid.vegas/void)
db=$HOME/.todo
touch $db
while :
do
cmd=$(dmenu -l 10 -m 0 -fn "Misc Ohsnap.Icons:style=Regular:size=11" -nb "#000000" -nf "#FFFFFF" -sb "#000000" -sf "#00D787" "$@" < "$db")
if [ -z "$cmd" ]; then
break
elif grep -q "^$cmd\$" "$db"; then
grep -v "^$cmd\$" "$db" > "$db.$$"
mv "$db.$$" "$db"
else
echo "$cmd" >> "$db"
fi
done
exit 0