AutoYADM commit: 2025-05-11 14:26:08

This commit is contained in:
Daniel Fichtinger 2025-05-11 14:26:08 -04:00
parent 4c16ef5e0c
commit bc29cf6381

View file

@ -65,30 +65,17 @@ define-command -override ui-wrap-toggle -docstring "toggle wrap" %{
map -docstring "Wrap UI" global ui w ": ui-wrap-toggle<ret>"
define-command ui-scrolloff-toggle -params 2 -docstring "toggle scrolloff" %{
echo %sh{
CUR="$kak_opt_scrolloff"
echo "$CUR"
TARG="$1"
# echo "$TARG"
HOR="$2"
# echo "$HOR"
if [ "$CUR" = "99,$HOR" ]; then
# echo "$TARG,$HOR"
# echo this runs
else
# echo "99,$HOR"
done
} #%arg{@}
# IFS=, set -- $kak_opt_scrolloff
# CUR="$1"
# ADD="$2"
# TARG="3"
# if [ "$CUR" = "99" ]; then
# echo "$TARG,$ADD"
# else
# echo "99,$ADD"
# fi
evaluate-commands %sh{
CUR="$kak_opt_scrolloff"
TARG="$1"
HOR="$2"
if [ "$CUR" != ${CUR#99} ]; then
final="$TARG,$HOR"
else
final="99,$HOR"
fi
echo "set-option window scrolloff $final"
}
}
map global ui z ": ui-scrolloff-toggle 1 2<ret>"
@ -118,11 +105,11 @@ map -docstring "goto next buffer" global user i ": bn<ret>"
map global normal <tab> _
map -docstring "commenct line" global normal <c-v> ":comment-line<ret>"
define-command open_yazi %{
edit %sh{
rm -f /tmp/yazi-path &>/dev/null
footclient -d error yazi $kak_buffile --chooser-file=/tmp/yazi-path &>/dev/null
cat /tmp/yazi-path
}
edit %sh{
rm -f /tmp/yazi-path &>/dev/null
footclient -d error yazi $kak_buffile --chooser-file=/tmp/yazi-path &>/dev/null
cat /tmp/yazi-path
}
}
map -docstring "open file in yazi" global user <space> ": open_yazi<ret>"