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" role="$1"
shift shift
@ -6,5 +6,9 @@ shift
if [ -n "$1" ]; then if [ -n "$1" ]; then
aichat --role "$role" "$@" aichat --role "$role" "$@"
else 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 fi

View File

@ -6,7 +6,7 @@ if [ -z "$query" ]; then
query="$(echo "tui" | bemenu --prompt "qalc")" query="$(echo "tui" | bemenu --prompt "qalc")"
fi fi
if [ "$query" = "tui" ]; then 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 elif [ -n "$query" ]; then
qalc_res="$(qalc --terse "$query")" qalc_res="$(qalc --terse "$query")"
menu_res="$(echo -e "$qalc_res\ntui" | bemenu --prompt "qalc")" 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' sed ' s/\s\+\-.*//;s/ //g'
)" )"
fi 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")" pw="$(echo "$pws" | bemenu --prompt "pass")"
case "$2" in 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";; 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";; *) pass -c "$pw" && notify-send "$pw" -a pass "Password copied to clipboard, clears in 45s";;
esac esac

View File

@ -4,7 +4,9 @@ rl_full="$(cat "$HOME/.config/bemenu/"*.runlist)"
rl="$(echo "$rl_full" | cut -d' ' -f2-)" rl="$(echo "$rl_full" | cut -d' ' -f2-)"
inp="$(echo "$rl" | bemenu --prompt ">")" inp="$(echo "$rl" | bemenu --prompt ">")"
[ -z "$inp" ] && exit 0
eval "inp_arr=($inp)" eval "inp_arr=($inp)"
exectr=float-sh-keep exectr=float-sh-keep
while IFS= read -r line; do while IFS= read -r line; do
if [[ "$inp" == "$line"* ]]; then if [[ "$inp" == "$line"* ]]; then
@ -14,7 +16,7 @@ done <<< "$rl"
case "$exectr" in case "$exectr" in
exec) exec $inp;; exec) exec $inp;;
float-sh) exec footclient --app-id="footclient_float" -D ~/ "$SHELL" -c "($inp)";; float-sh) exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "$SHELL" -c "($inp)";;
float-sh-keep) exec footclient --app-id="footclient_float" -D ~/ "$SHELL" -c "($inp); read -n1";; 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[@]}";; *) exec bash "$HOME/.local/bin/bemenu/run-$exectr.sh" "${inp_arr[@]}"
esac esac

View File

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

View File

@ -1,6 +1,5 @@
exec qutebrowser exec qutebrowser
exec gimp exec gimp
exec sqlitebrowser
exec telegram-desktop exec telegram-desktop
man man man man
calc calc calc calc
@ -15,4 +14,3 @@ pass pass info
capture screenshot selection capture screenshot selection
capture screenshot output capture screenshot output
capture pick-color 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 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" }} background-color=#{{ .theme.color.bg_accent_dark }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }}
border-size=2 border-size=2
border-radius=4 border-radius=4

View File

@ -63,3 +63,9 @@ set keymap vi-insert
"\C-h":operate-and-get-next "\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 " i -> k
noremap i k noremap i k
noremap I K noremap I K
noremap! <C-i> <C-k> "noremap! <C-i> <C-k> " breaks tab
" o -> l " o -> l
noremap o l noremap o l
noremap O L noremap O L
@ -145,7 +145,7 @@ noremap! <C-е> <C-ж>
" i -> k " i -> k
noremap и к noremap и к
noremap И К noremap И К
noremap! <C-и> <C-к> "noremap! <C-и> <C-к> " breaks tab
" o -> l " o -> l
noremap о л noremap о л
noremap О Л noremap О Л