17 lines
430 B
Plaintext
17 lines
430 B
Plaintext
|
#!/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
|