AutoYADM commit: 2025-05-19 23:29:24
This commit is contained in:
parent
9fddc43a37
commit
5cb0a93e3a
1 changed files with 14 additions and 8 deletions
|
@ -110,18 +110,24 @@ define-command -docstring "Create a scratch buffer" scratch %{
|
||||||
}
|
}
|
||||||
alias global s scratch
|
alias global s scratch
|
||||||
|
|
||||||
# bar experimenting
|
define-command -hidden bar-buflist %{
|
||||||
define-command bar-buflist %{
|
evaluate-commands %sh{
|
||||||
eval %sh{
|
|
||||||
list=''
|
list=''
|
||||||
while read buf; do
|
while read buf; do
|
||||||
|
if [ "$buf" = '*debug*' ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
index=$(($index + 1))
|
index=$(($index + 1))
|
||||||
# if [ "$buf" = "$kak_bufname" ]; then
|
if [ "$buf" = "$kak_bufname" ]; then
|
||||||
cur=$(printf '[%s] %s' "$index" "$buf")
|
cur=$(printf '[%s %s]' "$index" "$buf")
|
||||||
|
else
|
||||||
|
cur=$(printf '%s %s' "$index" "$buf")
|
||||||
|
fi
|
||||||
list="$list $cur"
|
list="$list $cur"
|
||||||
done <<< $(printf '%s\n' "$kak_buflist" | tr ' ' '\n')
|
done <<< $(printf '%s\n' "$kak_buflist" | tr ' ' '\n')
|
||||||
quoted=$(printf '%q' "$list" | sed -e 's/\\\*/\*/g' -e 's/\\\[/\[/g' -e 's/\\\]/\]/g')
|
title="$list - $kak_client@[$kak_session]"
|
||||||
|
printf "set-option -add global ui_options %%{terminal_title=%s}" "$title"
|
||||||
printf "set-option -add global ui_options terminal_title=%s" "$quoted"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hook global WinDisplay .* bar-buflist
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue