This commit is contained in:
2025-09-21 23:19:49 +00:00
parent 119632adfd
commit 5c078feab5
10 changed files with 30 additions and 20 deletions

View File

@@ -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

View File

@@ -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")"

View File

@@ -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"

View File

@@ -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

View File

@@ -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