bemenu -> wmenu
This commit is contained in:
		
							
								
								
									
										19
									
								
								arch-user/bin/menu/run-calc.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										19
									
								
								arch-user/bin/menu/run-calc.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| shift | ||||
| query="$1" | ||||
| if [ -z "$query" ]; then | ||||
| 	query="$(echo "tui" | bemenu --prompt "qalc")" | ||||
| fi | ||||
| if [ "$query" = "tui" ]; then | ||||
| 	exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "qalc" | ||||
| elif [ -n "$query" ]; then | ||||
| 	qalc_res="$(qalc --terse "$query")" | ||||
| 	menu_res="$(echo -e "$qalc_res\ntui" | bemenu --prompt "qalc")" | ||||
| 	if [ "$qalc_res" = "$menu_res" ]; then | ||||
| 		wl-copy "$qalc_res" | ||||
| 		notify-send "$qalc_res" -a calc "Result copied to clipboard" | ||||
| 	elif [ -n "$menu_res" ]; then | ||||
| 		"$0" _ "$menu_res" | ||||
| 	fi | ||||
| fi | ||||
		Reference in New Issue
	
	Block a user