configs
This commit is contained in:
		| @@ -1,4 +1,4 @@ | ||||
| #!/bin/sh | ||||
| #!/bin/bash | ||||
|  | ||||
| role="$1" | ||||
| shift | ||||
| @@ -6,5 +6,9 @@ shift | ||||
| if [ -n "$1" ]; then | ||||
| 	aichat --role "$role" "$@" | ||||
| else  | ||||
| 	aichat --role "$role" --session | ||||
| 	session_ts="$(date +%s)" | ||||
| 	while true; do | ||||
| 		read -e -r -p "> " input | ||||
| 		aichat --save-session --session "$session_ts" --role "$role" "$input" | ||||
| 	done | ||||
| fi | ||||
|   | ||||
| @@ -6,7 +6,7 @@ if [ -z "$query" ]; then | ||||
| 	query="$(echo "tui" | bemenu --prompt "qalc")" | ||||
| fi | ||||
| if [ "$query" = "tui" ]; then | ||||
| 	exec footclient --app-id="footclient_float" -D ~/ "qalc" | ||||
| 	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")" | ||||
|   | ||||
| @@ -9,4 +9,4 @@ if [ -z "$page" ]; then | ||||
| 		sed ' s/\s\+\-.*//;s/ //g'  | ||||
| 	)"  | ||||
| fi | ||||
| exec footclient --app-id="footclient_float" "$SHELL" -c "man '$page' || read -n1" | ||||
| exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "man '$page' || read -n1" | ||||
|   | ||||
| @@ -6,7 +6,7 @@ pws="$(find -path "*/.*" -prune -o -path "*/cred/*" -name "*.gpg" -printf '%P\n' | ||||
| pw="$(echo "$pws" | bemenu --prompt "pass")" | ||||
|  | ||||
| case "$2" in | ||||
| 	info) exec footclient --app-id="footclient_float" -D ~/ "$SHELL" -c "pass $pw | vim -";; | ||||
| 	info) exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "pass $pw | vim -";; | ||||
| 	otp) pass otp -c "$pw" && notify-send "$pw" -a pass "OTP copied to clipboard, clears in 45s";; | ||||
| 	*) pass -c "$pw" && notify-send "$pw" -a pass "Password copied to clipboard, clears in 45s";; | ||||
| esac | ||||
|   | ||||
| @@ -4,7 +4,9 @@ rl_full="$(cat "$HOME/.config/bemenu/"*.runlist)" | ||||
| rl="$(echo "$rl_full" | cut -d' ' -f2-)" | ||||
|  | ||||
| inp="$(echo "$rl" | bemenu --prompt ">")" | ||||
| [ -z "$inp" ] && exit 0 | ||||
| eval "inp_arr=($inp)" | ||||
|  | ||||
| exectr=float-sh-keep | ||||
| while IFS= read -r line; do | ||||
|     if [[ "$inp" == "$line"* ]]; then | ||||
| @@ -14,7 +16,7 @@ done <<< "$rl" | ||||
|  | ||||
| case "$exectr" in | ||||
| 	exec) exec $inp;; | ||||
| 	float-sh) exec footclient --app-id="footclient_float" -D ~/ "$SHELL" -c "($inp)";; | ||||
| 	float-sh-keep) exec footclient --app-id="footclient_float" -D ~/ "$SHELL" -c "($inp); read -n1";; | ||||
| 	*) exec bash "$HOME/.local/bin/bemenu/run-$exectr.sh" "${inp_arr[@]}";; | ||||
| 	float-sh) exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "$SHELL" -c "($inp)";; | ||||
| 	float-sh-keep) exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "($inp); read -n1";; | ||||
| 	*) exec bash "$HOME/.local/bin/bemenu/run-$exectr.sh" "${inp_arr[@]}" | ||||
| esac | ||||
|   | ||||
		Reference in New Issue
	
	Block a user