diff --git a/.config/kak/autoload/title.kak b/.config/kak/autoload/title.kak new file mode 100644 index 00000000..81551a19 --- /dev/null +++ b/.config/kak/autoload/title.kak @@ -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 diff --git a/.config/kak/kakrc b/.config/kak/kakrc index d5fbd66c..d3bf80f4 100644 --- a/.config/kak/kakrc +++ b/.config/kak/kakrc @@ -5,9 +5,9 @@ require-module fishr require-module peneira define-command fish-test %{ - fish %{ - notify-send $kak_buffile - } + fish %{ + notify-send $kak_buffile + } } set-option global ashen_dynamic_cursor true @@ -36,11 +36,10 @@ add-highlighter global/regex-escaped regex \\[\[\]\(\)\{\}fnrtv0\\dwshDWSH] 0:rg add-highlighter global/ show-whitespaces -lf "" -tab "" -only-trailing add-highlighter global/ show-matching - hook global WinCreate .* %{ ui-wrap-enable ui-scrolloff-toggle - add-highlighter window/number-lines number-lines -hlcursor -relative -separator " " + add-highlighter window/number-lines number-lines -hlcursor -relative -separator " " } map -docstring "quit" global user q ": q" @@ -52,7 +51,6 @@ map -docstring "save" global normal ": write!" # map -docstring "save" global normal ": write-all" # map -docstring "save" global normal ": write-all!" - map -docstring "close current buffer" global user x ": db" map -docstring "goto previous buffer" global user m ": bp" map -docstring "goto next buffer" global user i ": bn" @@ -97,37 +95,15 @@ map -docstring 'Select to file end' global user N "GjL" map -docstring 'Extend to file end' global user n "gjl" define-command -docstring %{ - Spawns a Zathura pdf preview and Typst watcher for the currently open Typst file + Spawns a Zathura pdf preview and Typst watcher for the currently open Typst file } typst %{ - nop %sh{ - { - "$kak_config/scripts/kak-typ-zathura.fish" -k -w "$kak_buffile" "$kak_client_pid" - } > /dev/null 2>&1 < /dev/null & - } + nop %sh{ + { + "$kak_config/scripts/kak-typ-zathura.fish" -k -w "$kak_buffile" "$kak_client_pid" + } > /dev/null 2>&1 < /dev/null & + } } define-command -docstring "Create a scratch buffer" scratch %{ - edit -scratch + edit -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 diff --git a/.config/yazi/theme.toml b/.config/yazi/theme.toml index 14e2e8b5..f814a78d 100644 --- a/.config/yazi/theme.toml +++ b/.config/yazi/theme.toml @@ -1,2 +1,11 @@ [flavor] dark = "ashen" + +[icon] +prepend_exts = [ + { name = "kak", text = "󰔆" } +] +prepend_files = [ + { name = "kakrc", text = "󰔆" }, + { name = ".kakrc.local", text = "󰔆" }, +]