summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Vink <ivi@vinkies.net>2025-03-20 12:57:38 +0000
committerMike Vink <ivi@vinkies.net>2025-03-20 12:57:38 +0000
commit150bd89be6c01596d0dc6f5ba1fd87c908afd74e (patch)
treeac16266440369e885130d4ca0296ff5ee102a335
parentf97604691d2741e7c5ead501669070cbfbcf9885 (diff)
a lot of stuff
-rw-r--r--.config/kak/kakrc10
-rw-r--r--.config/ksh/ksh.kshrc1
-rw-r--r--.config/shell/aliasrc4
-rw-r--r--.config/shell/profile2
-rw-r--r--.editorconfig11
-rwxr-xr-x.local/bin/c3
-rwxr-xr-x.local/bin/cd-kak-buf2
-rwxr-xr-x.local/bin/kc3
-rwxr-xr-x.local/bin/pwd-short2
-rw-r--r--.profile2
10 files changed, 23 insertions, 17 deletions
diff --git a/.config/kak/kakrc b/.config/kak/kakrc
index 8ab64eb..c6b2a50 100644
--- a/.config/kak/kakrc
+++ b/.config/kak/kakrc
@@ -1,4 +1,6 @@
colorscheme gruber-darker
+add-highlighter global/ number-lines -relative
+
set-option global toolsclient t
set-option global jumpclient j
set-option global docsclient d
@@ -13,7 +15,13 @@ hook global RegisterModified '"' %{ nop %sh{
export kak_client_pid="$kak_client_pid"
printf %s "$kak_main_reg_dquote" | vis-clipboard --copy
}}
-hook global WinCreate ^[^*]+$ %{editorconfig-load}
+
+hook global WinCreate ^[^*]+$ %{
+ editorconfig-load
+ map global insert <tab> '<a-;><a-gt>'
+ map global insert <s-tab> '<a-;><a-lt>'
+}
+
hook global BufSetOption filetype=python %{
set-option buffer formatcmd 'ruff format -'
hook buffer -group format BufWritePost .* format
diff --git a/.config/ksh/ksh.kshrc b/.config/ksh/ksh.kshrc
index 22c0ed2..7214524 100644
--- a/.config/ksh/ksh.kshrc
+++ b/.config/ksh/ksh.kshrc
@@ -21,6 +21,7 @@ clear-screen-saving-contents-in-scrollback() {
bind -m ^L="^E ^A^K clear-screen-saving-contents-in-scrollback^J^Y^B^D"
bind -m ^O=' mcd^J'
bind -m ^X^F=' REPLY="$(vis-open .)"; [ -z "$REPLY" ] || cd "$REPLY"^J'
+bind -m ^Z='kb^J'
# Emacs mode clear chops off multline prompts.
export PS1="$(hostname):\$(pwd-short)\$(prompt-git)\$(prompt-tf)\n jobs(\j) # "
diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc
index 0d7ee65..db87e1c 100644
--- a/.config/shell/aliasrc
+++ b/.config/shell/aliasrc
@@ -6,6 +6,6 @@ alias ga="git add "
alias gc="git commit "
alias d="docker "
# alias k="kak "
-alias kd='echo cd $PWD | kak -p s '
-alias kb='cd $(cd-kak-buf)'
+alias d=' echo cd $PWD | kak -p s; eval "[ -n \"$(jobs)\" ] && fg" '
+alias b=' eval "$(cd-kak-buf)"'
alias e='$EDITOR '
diff --git a/.config/shell/profile b/.config/shell/profile
index 18bb130..46a9658 100644
--- a/.config/shell/profile
+++ b/.config/shell/profile
@@ -3,7 +3,7 @@ export XDG_CACHE_HOME=$HOME/.cache
export XDG_DATA_HOME=$HOME/.local/share
export XDG_STATE_HOME=$HOME/.local/state
-export EDITOR="kc s"
+export EDITOR="c s"
export GIT_EDITOR="kak "
export PATH="$PATH:$HOME/go/bin:/usr/local/go/bin"
diff --git a/.editorconfig b/.editorconfig
index 4c3c9ec..74690dd 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -8,18 +8,13 @@ root = true
insert_final_newline = true
trim_trailing_whitespace = true
-[*.{md}]
+[*.{yaml,yml,lua,md,tf,j2}]
indent_style = space
indent_size = 2
-[*.{yaml,yml}]
-indent_style = space
-indent_size = 2
+[*.go]
+indent_style = tab
# Tab indentation (no size specified)
[Makefile]
indent_style = tab
-
-[*.lua]
-indent_size = 2
-indent_style = spaces
diff --git a/.local/bin/c b/.local/bin/c
index 4aed5f6..5f74d14 100755
--- a/.local/bin/c
+++ b/.local/bin/c
@@ -1,3 +1,2 @@
#!/bin/sh
-ctx="$(nu --commands "open ${KUBECONFIG:-$HOME/.kube/config} | from yaml | get contexts.name | to text" | vis-menu)"
-[ -z "$ctx" ] || kubectl config use-context "$ctx"
+exec kak -c "$@"
diff --git a/.local/bin/cd-kak-buf b/.local/bin/cd-kak-buf
index 8dcf77a..f4ebc73 100755
--- a/.local/bin/cd-kak-buf
+++ b/.local/bin/cd-kak-buf
@@ -11,7 +11,7 @@ for c in $client_list; do
[ $ppid = $PPID ] && {
echo "evaluate-commands -client $c %{ echo -to-file ${output} %val{buffile} }" | kak -p s
result=$(cat "${output}")
- echo $(dirname $result)
+ echo "cd $(dirname $result)"
}
done
rm -r $(dirname ${output})
diff --git a/.local/bin/kc b/.local/bin/kc
index 5f74d14..4aed5f6 100755
--- a/.local/bin/kc
+++ b/.local/bin/kc
@@ -1,2 +1,3 @@
#!/bin/sh
-exec kak -c "$@"
+ctx="$(nu --commands "open ${KUBECONFIG:-$HOME/.kube/config} | from yaml | get contexts.name | to text" | vis-menu)"
+[ -z "$ctx" ] || kubectl config use-context "$ctx"
diff --git a/.local/bin/pwd-short b/.local/bin/pwd-short
index e791866..eae1830 100755
--- a/.local/bin/pwd-short
+++ b/.local/bin/pwd-short
@@ -1,4 +1,6 @@
#!/bin/sh
+pwd
+exit 0
parts="$(
for d in $(pwd); do
[ -z "$d" ] && continue
diff --git a/.profile b/.profile
index 5183e33..4cf4f83 100644
--- a/.profile
+++ b/.profile
@@ -10,6 +10,6 @@ if [ -d $HOME/.config/shell/profile.d ]; then
unset i
fi
-if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ]; then
+if [ -z "$DISPLAY" ] && [ "$(tty)" = /dev/tty1 ]; then
startx
fi