From dadf5d2b3eef94767c2a318fa0f942aa31a0be11 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Sun, 25 May 2025 23:24:17 -0400 Subject: [PATCH] AutoYADM commit: 2025-05-25 23:24:17 --- .config/kak/autoload/lsp.kak | 2 +- .config/kak/autoload/title.kak | 58 +++++++++++++++++--------------- .config/kak/autoload/ui-mode.kak | 41 ++++++++++++++++------ 3 files changed, 61 insertions(+), 40 deletions(-) diff --git a/.config/kak/autoload/lsp.kak b/.config/kak/autoload/lsp.kak index 8149935d..cf1beb91 100644 --- a/.config/kak/autoload/lsp.kak +++ b/.config/kak/autoload/lsp.kak @@ -24,7 +24,7 @@ define-command -hidden -override lsp-hide-code-actions %{ set-option global lsp_debug false # list of filetypes for which LSP will be activated in the window scope -declare-option str-list lsp_filetypes python go rust bash fish c cpp typst markdown yaml json jsonc +declare-option str-list lsp_filetypes python go rust bash fish c cpp typst markdown yaml json jsonc bash sh define-command -hidden lsp-filetype-hooks-update %{ try %{ remove-hooks global lsp-filetypes } diff --git a/.config/kak/autoload/title.kak b/.config/kak/autoload/title.kak index d5098049..0e690279 100644 --- a/.config/kak/autoload/title.kak +++ b/.config/kak/autoload/title.kak @@ -36,34 +36,36 @@ declare-option -docstring %{ } str bar_inactive_modified_fmt '%s %s+' define-command -hidden bar-buflist %{ evaluate-commands %sh{ - # starttime=$(date +%s.%N) - list='' - while read buf; do - if [ "$buf" = '*debug*' ]; then - continue - fi - index=$(($index + 1)) - if [ "$buf" = "$kak_bufname" ]; then - if [ "$kak_modified" = "true" ]; then - cur=$(printf "$kak_opt_bar_active_modified_fmt" "$index" "$buf") - else - cur=$(printf "$kak_opt_bar_active_fmt" "$index" "$buf") - fi - else - cur=$(printf "$kak_opt_bar_inactive_fmt" "$index" "$buf") - fi - list="$list $cur" - done <<<$(printf '%s\n' "$kak_buflist" | perl -nE 'say for /(\*[^*]+\*|\S+)/g') - title="$list - $kak_client@[$kak_session]" - # endtime=$(date +%s.%N) - printf "set-option -add global ui_options %%{terminal_title=%s}\n" "$title" - # printf "info 'time elapsed: %s ms'" "$(echo "$endtime - $starttime" | bc -l)" +#!/bin/sh +list='' +index=0 +while read buf; do + if [ "$buf" = '*debug*' ]; then + continue + fi + index=$((index + 1)) + if [ "$buf" = "$kak_bufname" ]; then + if [ "$kak_modified" = "true" ]; then + cur=$(printf "$kak_opt_bar_active_modified_fmt" "$index" "$buf") + else + cur=$(printf "$kak_opt_bar_active_fmt" "$index" "$buf") + fi + else + cur=$(printf "$kak_opt_bar_inactive_fmt" "$index" "$buf") + fi + list="$list $cur" +done <