]> Freerunner's - dotfiles.git/commitdiff
kak/bash/fish: back to kks shell integration
authorAndre Ramnitz <tux.rising@gmail.com>
Thu, 28 Dec 2023 14:56:30 +0000 (15:56 +0100)
committerAndre Ramnitz <tux.rising@gmail.com>
Sun, 18 Aug 2024 16:18:52 +0000 (18:18 +0200)
12 files changed:
config/fish/fish_variables
config/fish/functions/:cat.fish [deleted file]
config/fish/functions/K.fish [deleted file]
config/fish/functions/a.fish [deleted file]
config/fish/functions/k.fish
config/fish/functions/ka.fish [new file with mode: 0644]
config/fish/functions/kcd.fish [new file with mode: 0644]
config/fish/functions/kkd.fish [new file with mode: 0644]
config/fish/functions/kl.fish [deleted file]
config/fish/functions/ks.fish
config/kak/kakrc
home/.bashrc

index d5b57ecc0260d92690f04117089ba027d1fcc99c..10efd7b39038dc6db3795ebe31aee6a9a193fbf9 100644 (file)
@@ -1,6 +1,6 @@
 # This file contains fish universal variable definitions.
 # VERSION: 3.0
-SETUVAR --export EDITOR:kcr\x20edit
+SETUVAR --export EDITOR:kks\x20edit
 SETUVAR --export FZF_DEFAULT_OPTS:--multi\x20--layout=reverse\x20--preview-window=down:60%
 SETUVAR --export KCR_DEFAULT_SESSION:default
 SETUVAR --export VDPAU_DRIVER:radeonsi
@@ -37,4 +37,4 @@ SETUVAR fish_pager_color_description:B3A06D\x1eyellow
 SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
 SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
 SETUVAR fish_pager_color_selected_background:\x2d\x2dbackground\x3dbrblack
-SETUVAR fish_user_paths:/home/andy/Applications\x1e/opt/android\x2dsdk/platform\x2dtools\x1e/home/andy/\x2ecargo/bin\x1e/home/andy/\x2elocal/bin
+SETUVAR fish_user_paths:/home/andy/go/bin\x1e/home/andy/Applications\x1e/opt/android\x2dsdk/platform\x2dtools\x1e/home/andy/\x2ecargo/bin\x1e/home/andy/\x2elocal/bin
diff --git a/config/fish/functions/:cat.fish b/config/fish/functions/:cat.fish
deleted file mode 100644 (file)
index c82ad68..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-function :cat --wraps='kcr cat --raw' --description 'alias :cat=kcr cat --raw'
-  kcr cat --raw $argv; 
-end
diff --git a/config/fish/functions/K.fish b/config/fish/functions/K.fish
deleted file mode 100644 (file)
index bf4cb13..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-function K --wraps=kcr-fzf-shell --description 'alias K=kcr-fzf-shell'
-  kcr-fzf-shell $argv; 
-end
diff --git a/config/fish/functions/a.fish b/config/fish/functions/a.fish
deleted file mode 100644 (file)
index 1e2c651..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-function a --wraps='kcr attach' --description 'alias a=kcr attach'
-  kcr attach $argv; 
-end
index ad41f0dd220f85320c43da51d2eecc2865b29c26..fd78e07ff0de64229bd55acf74f874fb321706b5 100644 (file)
@@ -1,3 +1,3 @@
-function k --wraps='kks edit' --wraps='kcr attach' --wraps='kcr edit' --description 'alias k=kcr edit'
-  kcr edit $argv; 
+function k --wraps='kks edit' --description 'alias k=kks edit'
+  kks edit $argv; 
 end
diff --git a/config/fish/functions/ka.fish b/config/fish/functions/ka.fish
new file mode 100644 (file)
index 0000000..acb3ce4
--- /dev/null
@@ -0,0 +1,3 @@
+function ka --wraps='kks attach' --description 'alias ka=kks attach'
+  kks attach $argv; 
+end
diff --git a/config/fish/functions/kcd.fish b/config/fish/functions/kcd.fish
new file mode 100644 (file)
index 0000000..eaf3ee6
--- /dev/null
@@ -0,0 +1,3 @@
+function kcd --wraps='cd $(kks get %sh{pwd})' --description 'alias kcd=cd $(kks get %sh{pwd})'
+  cd $(kks get %sh{pwd}) $argv; 
+end
diff --git a/config/fish/functions/kkd.fish b/config/fish/functions/kkd.fish
new file mode 100644 (file)
index 0000000..58e7dbc
--- /dev/null
@@ -0,0 +1,3 @@
+function kkd --wraps='kks kill; unset KKS_SESSION KKS_CLIENT' --description 'alias kkd=kks kill; unset KKS_SESSION KKS_CLIENT'
+  kks kill; unset KKS_SESSION KKS_CLIENT $argv; 
+end
diff --git a/config/fish/functions/kl.fish b/config/fish/functions/kl.fish
deleted file mode 100644 (file)
index a9dda47..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-function kl --wraps='kcr list' --description 'alias kl=kcr list'
-  kcr list $argv; 
-end
index 63d3f45de48b6367d75b90990e5c0073f82ddaca..a6205821539e4f1bc0c3e9fe59f282059f3eec74 100644 (file)
@@ -1,3 +1,3 @@
-function ks --wraps='kcr shell --session' --description 'alias ks=kcr shell --session'
-  kcr shell --session $argv; 
+function ks --wraps='eval $(kks-select)' --description 'alias ks=eval $(kks-select)'
+  eval $(kks-select) $argv; 
 end
index f73aa4494cf89404a98e10f27aee9e734f864079..8a0e19434facb38efe1673bfd1ef06cbe2fee232 100644 (file)
@@ -23,7 +23,7 @@ plug "andreyorst/plug.kak" noload
     plug "occivink/kakoune-sudo-write"
     plug "occivink/kakoune-find"
     plug "foot.kak"
-    plug "https://git.sr.ht/~nasmevka/dabruin.kak"
+    plug "https://git.sr.ht/~nasmevka/dabruin.kak" noload
     plug "andreyorst/powerline.kak" defer powerline_freerunner %{
         powerline-format global 'mode_info git bufname session client line_column position '
         powerline-theme freerunner
@@ -126,12 +126,22 @@ map global goto m '<esc>m;' -docstring 'matching char'
 map global normal <c-a> ': inc %val{count} +<ret>'
 map global normal <c-x> ': inc %val{count} -<ret>'
 
+# kks mappings
+# ──────────────────────────────────────────────────────────────────────────────
+map global normal -docstring 'terminal'         <c-t> ': kks-connect terminal<ret>'
+map global normal -docstring 'files'            <c-f> ': kks-connect terminal-popup kks-files<ret>'
+map global normal -docstring 'buffers'          <c-b> ': kks-connect terminal-popup kks-buffers<ret>'
+map global normal -docstring 'buffers'          <c-b> ': kks-connect terminal-popup kks-buffers<ret>'
+map global normal -docstring 'live grep'        <c-g> ': kks-connect terminal-popup kks-grep<ret>'
+map global normal -docstring 'lines in buffer'  <c-l> ': kks-connect terminal-popup kks-lines<ret>'
+map global normal -docstring 'recent files'     <c-r> ': kks-connect terminal-popup kks-mru<ret>'
+map global normal -docstring 'vcs client'       <c-v> ': kks-connect terminal-popup lazygit<ret>'
+map global normal -docstring 'file browser'     <c-h> ': kks-connect terminal-panel kks-lf<ret>'
+
 # default user mode
 # ──────────────────────────────────────────────────────────────────────────────
 map global user -docstring 'Buffer mode' b ':enter-user-mode buffermode<ret>'
 map global user -docstring 'Selection mode' s ':enter-user-mode selectionmode<ret>'
-#map global user -docstring 'bookMarks mode' m ':enter-user-mode bookmarks<ret>'
-
 map global user -docstring 'edit kakrc' e ': e ~/.config/kak/kakrc<ret>'
 
 # buffer user mode
@@ -147,6 +157,7 @@ map global buffermode -docstring 'clean tabs and trailing whitespace in the buff
 map global buffermode -docstring 'wrap enable' w ': add-highlighter buffer/bw wrap<ret>'
 map global buffermode -docstring 'wrap disable' W ': remove-highlighter buffer/bw<ret>'
 
+
 # selection user mode
 # ──────────────────────────────────────────────────────────────────────────────
 declare-user-mode selectionmode
@@ -176,22 +187,9 @@ hook global BufOpenFile .* %{
 # session manager
 # ──────────────────────────────────────────────────────────────────────────────
 evaluate-commands %sh{
-    kcr init kakoune
+    kks init
 }
 
-# kakoune.cr Mappings
-map -docstring 'new client' global normal <c-t> ': new<ret>'
-map -docstring 'terminal (popup)' global normal <c-ret> ': connect terminal-popup<ret>'
-map -docstring 'git (popup)' global normal <c-l> ': connect terminal-popup gitui<ret>'
-#map -docstring 'file explorer' global normal <c-e> ': connect terminal-panel sidetree --select %val{buffile}<ret>'
-map -docstring 'file picker' global normal <c-f> ': connect terminal-popup kcr fzf files<ret>'
-map -docstring 'buffer picker' global normal <c-b> ': connect terminal-popup kcr fzf buffers<ret>'
-map global normal <q> <Q>
-unmap global normal <q>
-map -docstring 'buffer picker' global normal <q> ': connect terminal-popup kcr fzf buffers<ret>'
-map -docstring 'grep picker' global normal <c-g> ': connect terminal-popup kcr fzf grep<ret>'
-#map -docstring 'grep picker (buffer)' global normal <c-r> ': connect terminal-popup kcr fzf grep %val{buflist}<ret>'
-
 
 # Reload kakrc and .kak when saving.
 # ──────────────────────────────────────────────────────────────────────────────
index 6603ba09db5bb7a940322301aa2ddd43f353ba79..eda3817e150504ab73848f0a93f5835f048929ae 100644 (file)
@@ -7,11 +7,13 @@
 # anything or bad things will happen !
 
 export PATH="$PATH:/opt/android-sdk/platform-tools/"
-export PATH="$PATH:~/.cargo/bin:~/.local/bin:~/Applications/"
+export PATH="$PATH:~/go/bin:~/.cargo/bin:~/.local/bin:~/Applications/"
 
 export BROWSER='qutebrowser "--untrusted-args %u"'
 export EDITOR="kks edit"
-export PAGER="less"
+export KKS_DEFAULT_SESSION='default'
+export KKS_USE_GITDIR_SESSIONS=1
+export PAGER="bat"
 export VDPAU_DRIVER="radeonsi"
 export XZ_OPT="--threads=16"