This repository has been archived on 2023-12-10. You can view files and clone it, but cannot push or open issues or pull requests.
2021-10-22 15:22:23 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
td_push(){
|
|
|
|
tpush $1
|
|
|
|
}
|
|
|
|
|
|
|
|
td_pop(){
|
|
|
|
notify-send "stackToDo" "Poped $(tpop)"
|
|
|
|
}
|
|
|
|
|
|
|
|
td_peek(){
|
|
|
|
notify-send "stackToDo" "Top of Stack: $(tpeek)"
|
|
|
|
}
|
|
|
|
|
|
|
|
#prompt user
|
|
|
|
result=$(printf "push\npop\npeek" | dmenu -p "todo >")
|
|
|
|
|
|
|
|
cmd=${result%% *}
|
|
|
|
|
|
|
|
case $cmd in
|
|
|
|
"push") td_push "$(echo $result | cut -d ' ' -f 2-)";;
|
|
|
|
"pop") td_pop ;;
|
|
|
|
"peek") td_peek ;;
|
2021-10-24 23:34:11 +00:00
|
|
|
#assume meant to push
|
|
|
|
*) td_push "$result" ;;
|
2021-10-22 15:22:23 +00:00
|
|
|
esac
|