From 77a8ef9166497eb43ddfabc1b47c5652361bc973 Mon Sep 17 00:00:00 2001 From: Greg Hurrell Date: Fri, 29 May 2020 17:11:05 +0200 Subject: [PATCH] feat(lf): add skim-based "goto" shortcut Because as pretty as "broot" is, it doesn't cut it for very big hierarchies (too slow). So I am going to make "gt" (the "default", because it is easier to type) invoke skim, and "gT" (the "special" mode) invoke broot. --- aspects/dotfiles/files/.config/lf/lfrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/aspects/dotfiles/files/.config/lf/lfrc b/aspects/dotfiles/files/.config/lf/lfrc index 4b7960afb..56122cdf7 100644 --- a/aspects/dotfiles/files/.config/lf/lfrc +++ b/aspects/dotfiles/files/.config/lf/lfrc @@ -31,7 +31,8 @@ map gf $test -d $f && $OPENER $f || $OPENER -R $f map gd cd ~/Downloads map gp cd ~/Pictures map gr cd / -map gt broot +map gT broot +map gt skim # Muscle memory (from mutt): u = [u]pdir map u updir @@ -83,3 +84,8 @@ cmd open ${{ *) for f in $fx; do open $f & done;; esac }} + +cmd skim ${{ + DIR=$(bfs -type d 2> /dev/null | sk --no-multi) + lf -remote "send $id cd \"$DIR\"" +}}