This commit is contained in:
Yuri Zamyatin 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

View File

@ -67,28 +67,28 @@ mods = "Alt"
action = "ToggleViMode"
[[keyboard.bindings]]
key = "N"
key = "n"
mode = "Vi"
action = "Left"
[[keyboard.bindings]]
key = "E"
key = "e"
mode = "Vi"
action = "Down"
[[keyboard.bindings]]
key = "I"
key = "i"
mode = "Vi"
action = "Up"
[[keyboard.bindings]]
key = "O"
key = "o"
mode = "Vi"
action = "Right"
[[keyboard.bindings]]
key = "H"
key = "h"
mode = "Vi"
action = "ToggleViMode"
@ -103,12 +103,12 @@ mode = "Vi"
action = "SearchPrevious"
[[keyboard.bindings]]
key = "J"
key = "j"
mode = "Vi"
action = "SemanticRightEnd"
[[keyboard.bindings]]
key = "i"
key = "l"
mode = "Vi"
action = "ToggleViMode"

View File

@ -1,6 +1,5 @@
exec qutebrowser
exec gimp
exec sqlitebrowser
exec telegram-desktop
man man
calc calc
@ -15,4 +14,3 @@ pass pass info
capture screenshot selection
capture screenshot output
capture pick-color
float-sh nmtui

View File

@ -1,5 +1,5 @@
format=<span size="{{ .theme.font.size_base_pt }}pt" weight="bold">%s - %a</span>\n%b
font={{ .theme.font.name_regular }} {{ math.Sub .theme.font.size_base_pt .theme.font.size_step_pt }}
font={{ .theme.font.name_regular }} {{ .theme.font.size_base_pt }}
background-color=#{{ .theme.color.bg_accent_dark }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }}
border-size=2
border-radius=4

View File

@ -63,3 +63,9 @@ set keymap vi-insert
"\C-h":operate-and-get-next
#################################
########### custom ##############
$if qalc
set show-mode-in-prompt off
$endif
#################################

View File

@ -93,7 +93,7 @@ noremap! <C-e> <C-j>
" i -> k
noremap i k
noremap I K
noremap! <C-i> <C-k>
"noremap! <C-i> <C-k> " breaks tab
" o -> l
noremap o l
noremap O L
@ -145,7 +145,7 @@ noremap! <C-е> <C-ж>
" i -> k
noremap и к
noremap И К
noremap! <C-и> <C-к>
"noremap! <C-и> <C-к> " breaks tab
" o -> l
noremap о л
noremap О Л