AutoYADM commit: 2025-05-19 23:44:44
This commit is contained in:
parent
5cb0a93e3a
commit
7fbf98e281
3 changed files with 41 additions and 35 deletions
21
.config/kak/autoload/title.kak
Normal file
21
.config/kak/autoload/title.kak
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
define-command -hidden bar-buflist %{
|
||||||
|
evaluate-commands %sh{
|
||||||
|
list=''
|
||||||
|
while read buf; do
|
||||||
|
if [ "$buf" = '*debug*' ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
index=$(($index + 1))
|
||||||
|
if [ "$buf" = "$kak_bufname" ]; then
|
||||||
|
cur=$(printf '[%s %s]' "$index" "$buf")
|
||||||
|
else
|
||||||
|
cur=$(printf '%s %s' "$index" "$buf")
|
||||||
|
fi
|
||||||
|
list="$list $cur"
|
||||||
|
done <<<$(printf '%s\n' "$kak_buflist" | tr ' ' '\n')
|
||||||
|
title="$list - $kak_client@[$kak_session]"
|
||||||
|
printf "set-option -add global ui_options %%{terminal_title=%s}" "$title"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hook global WinDisplay .* bar-buflist
|
|
@ -36,7 +36,6 @@ add-highlighter global/regex-escaped regex \\[\[\]\(\)\{\}fnrtv0\\dwshDWSH] 0:rg
|
||||||
add-highlighter global/ show-whitespaces -lf "" -tab "" -only-trailing
|
add-highlighter global/ show-whitespaces -lf "" -tab "" -only-trailing
|
||||||
add-highlighter global/ show-matching
|
add-highlighter global/ show-matching
|
||||||
|
|
||||||
|
|
||||||
hook global WinCreate .* %{
|
hook global WinCreate .* %{
|
||||||
ui-wrap-enable
|
ui-wrap-enable
|
||||||
ui-scrolloff-toggle
|
ui-scrolloff-toggle
|
||||||
|
@ -52,7 +51,6 @@ map -docstring "save" global normal <a-v> ": write!<ret>"
|
||||||
# map -docstring "save" global normal <a-v> ": write-all<ret>"
|
# map -docstring "save" global normal <a-v> ": write-all<ret>"
|
||||||
# map -docstring "save" global normal <a-V> ": write-all!<ret>"
|
# map -docstring "save" global normal <a-V> ": write-all!<ret>"
|
||||||
|
|
||||||
|
|
||||||
map -docstring "close current buffer" global user x ": db<ret>"
|
map -docstring "close current buffer" global user x ": db<ret>"
|
||||||
map -docstring "goto previous buffer" global user m ": bp<ret>"
|
map -docstring "goto previous buffer" global user m ": bp<ret>"
|
||||||
map -docstring "goto next buffer" global user i ": bn<ret>"
|
map -docstring "goto next buffer" global user i ": bn<ret>"
|
||||||
|
@ -109,25 +107,3 @@ define-command -docstring "Create a scratch buffer" scratch %{
|
||||||
edit -scratch
|
edit -scratch
|
||||||
}
|
}
|
||||||
alias global s scratch
|
alias global s scratch
|
||||||
|
|
||||||
define-command -hidden bar-buflist %{
|
|
||||||
evaluate-commands %sh{
|
|
||||||
list=''
|
|
||||||
while read buf; do
|
|
||||||
if [ "$buf" = '*debug*' ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
index=$(($index + 1))
|
|
||||||
if [ "$buf" = "$kak_bufname" ]; then
|
|
||||||
cur=$(printf '[%s %s]' "$index" "$buf")
|
|
||||||
else
|
|
||||||
cur=$(printf '%s %s' "$index" "$buf")
|
|
||||||
fi
|
|
||||||
list="$list $cur"
|
|
||||||
done <<< $(printf '%s\n' "$kak_buflist" | tr ' ' '\n')
|
|
||||||
title="$list - $kak_client@[$kak_session]"
|
|
||||||
printf "set-option -add global ui_options %%{terminal_title=%s}" "$title"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hook global WinDisplay .* bar-buflist
|
|
||||||
|
|
|
@ -1,2 +1,11 @@
|
||||||
[flavor]
|
[flavor]
|
||||||
dark = "ashen"
|
dark = "ashen"
|
||||||
|
|
||||||
|
[icon]
|
||||||
|
prepend_exts = [
|
||||||
|
{ name = "kak", text = "" }
|
||||||
|
]
|
||||||
|
prepend_files = [
|
||||||
|
{ name = "kakrc", text = "" },
|
||||||
|
{ name = ".kakrc.local", text = "" },
|
||||||
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue