mirror of
				https://github.com/Clortox/stackToDo.git
				synced 2025-07-17 13:42:11 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			427 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			427 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/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 ;;
 | |
|     #assume meant to push
 | |
|     *) td_push "$result" ;;
 | |
| esac
 | 
