From 27a6285cc0740cdc93a85ed9246565b66a0c17d6 Mon Sep 17 00:00:00 2001 From: Andre Ramnitz Date: Mon, 12 May 2025 23:36:46 +0200 Subject: [PATCH] kak: clean-up config, adjust popup size, reenable kks --- kakrc | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/kakrc b/kakrc index 91b68ba..b25d417 100644 --- a/kakrc +++ b/kakrc @@ -51,19 +51,19 @@ hook global WinCreate [^*].* %{ # session manager integration (kkga/kks) # ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── -# evaluate-commands %sh{ kks init } -# define-command -override kks-connect -params 1.. -command-completion %{ -# %arg{1} sh -c %{ -# export EDITOR='kks edit' -# export KKS_SESSION=$1 -# export KKS_CLIENT=$2 -# shift 3 - -# [ $# = 0 ] && set "$SHELL" - -# "$@" -# } -- %val{session} %val{client} %arg{@} -# } +evaluate-commands %sh{ kks init } +define-command -override kks-connect -params 1.. -command-completion %{ + %arg{1} sh -c %{ + export EDITOR='kks edit' + export KKS_SESSION=$1 + export KKS_CLIENT=$2 + shift 3 + + [ $# = 0 ] && set "$SHELL" + + "$@" + } -- %val{session} %val{client} %arg{@} +} # Enable PLUGin manager # ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── @@ -204,7 +204,7 @@ set-face global StatusLineValue green,default,default add-highlighter global/trailing-whitespace regex '\h+$' 0:Error # highlight comment tags -add-highlighter global/todos regex '(//|#|/\*)\h*(TODO|WARNING|FIXME|MAYBE)[:]?[^\n]*' 1:default+bu@comment +add-highlighter global/todos regex \b(TODO|WARNING|FIXME|MAYBE|NOTE)\b 1:default+bi@comment # show matching brackets add-highlighter global/ show-matching @@ -306,10 +306,12 @@ map global normal -docstring 'terminal' ': map global normal -docstring 'files' ': kks-connect popup kks-files' map global normal -docstring 'buffers' ': kks-connect popup kks-buffers' map global normal -docstring 'live grep' ': kks-connect popup kks-grep' +map global normal -docstring 'file browser' ': kks-connect popup kks-lf' map global normal -docstring 'lines in buffer' ': kks-connect popup kks-lines' map global normal -docstring 'recent files' ': kks-connect popup kks-mru' +map global normal -docstring 'session selector' ': kks-connect popup kks-select' +map global normal -docstring 'filetypes' ': kks-connect popup kks-filetypes' map global normal -docstring 'vcs client' ': kks-connect popup lazygit' -map global normal -docstring 'file browser' ': kks-connect popup kks-lf' # normal mode additional mappings # ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── @@ -320,6 +322,7 @@ map global normal -docstring 'comment line' '#' ': map global normal -docstring 'comment block' ': comment-block' map global normal -docstring 'Next buffer ' ': buffer-next' map global normal -docstring 'Previous buffer' ': buffer-previous' +map global normal -docstring 'Debug buffer' ': buffer *debug*' map global normal -docstring 'Delete buffer' ': delete-buffer' map global normal -docstring 'add 1 int' '^' ': inc %val{count} +' map global normal -docstring 'substract 1 int' ': inc %val{count} -' @@ -376,10 +379,8 @@ map global buffermode -docstring 'list buffers' l ': k map global buffermode -docstring 'Lint buffer' L ': buffer *lint-output*' map global buffermode -docstring 'next buffer' n ': buffer-next' map global buffermode -docstring 'previous buffer' p ': buffer-previous' -map global buffermode -docstring 'wrap enable' w ': add-highlighter buffer/bw wrap' -map global buffermode -docstring 'Wrap disable' W ': remove-highlighter buffer/bw' -map global buffermode -docstring 'Word-wrap enable' ': add-highlighter buffer/wordwrap wrap -word -indent' -map global buffermode -docstring 'Word-wrap disable' ': remove-highlighter buffer/wordwrap' +map global buffermode -docstring 'Word-wrap enable' w ': add-highlighter buffer/wordwrap wrap -word -indent' +map global buffermode -docstring 'Word-wrap disable' W ': remove-highlighter buffer/wordwrap' # selection user mode # ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── @@ -411,7 +412,7 @@ set-option global foot_normal_cmd 'foot' set-option global foot_popup_cmd 'foot' set-option global foot_panel_cmd 'foot' set-option global foot_normal_flags '' -set-option global foot_popup_flags '--app-id=kakpopup' '--window-size-chars=240x40' +set-option global foot_popup_flags '--app-id=kakpopup' '--window-size-chars=160x40' # set-option global foot_popup_flags '--app-id=kakpopup' -set-option global foot_panel_flags '--app-id=kakpanel' '--window-size-chars=240x1' +set-option global foot_panel_flags '--app-id=kakpanel' '--window-size-chars=200x1' -- 2.51.2