From f19f79b17b00786ba9af16f8ecc2a8c1683914f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pankowski?= Date: Thu, 1 Oct 2026 20:37:59 +0200 Subject: [PATCH] shell(ash): kak aliases using kff git repo: https://gitlab.com/Screwtapello/kakoune-fuzzy-find --- shell/.ashrc | 8 +++++--- shell/bin/kd | 11 +++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100755 shell/bin/kd diff --git a/shell/.ashrc b/shell/.ashrc index 23358ba..94ec41c 100644 --- a/shell/.ashrc +++ b/shell/.ashrc @@ -1,5 +1,7 @@ alias k=kak -alias kc='kak -c "$(kak -l | fzf)"' -alias kd='kak -s "$(printf %s $PWD | xargs basename)"' +alias kc='kak -c "$(kak -l | kff)"' +alias kf='fd -t f | kff | xargs kd' +alias kh='fd -H -t f | kff | xargs kd' alias lg=lazygit -alias z='cd $(fzf --walker dir --walker-root ~)' +alias ls='ls --color=auto' +alias z='cd $(fd -t d --one-file-system . ~ | kff)' diff --git a/shell/bin/kd b/shell/bin/kd new file mode 100755 index 0000000..7a1d2c8 --- /dev/null +++ b/shell/bin/kd @@ -0,0 +1,11 @@ +#!/bin/sh + +socket_name=$(basename `pwd`) +socket_file=$(kak -l | grep "^$socket_name\$") + +if [ -z "$socket_file" ]; then + setsid kak -d -s "$socket_name" & + sleep 0.5 +fi + +exec kak -c "$socket_name" $@