mirror of
https://github.com/Clortox/stackToDo.git
synced 2026-03-05 09:37:59 +00:00
Add todo dmenu wrapper script
This commit is contained in:
25
todo
Executable file
25
todo
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/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 ;;
|
||||
*) notify-send "stackToDo" "Invalid command" ;;
|
||||
esac
|
||||
Reference in New Issue
Block a user