Skip to content

Commit

Permalink
feat(lf): broot and . awesomeness
Browse files Browse the repository at this point in the history
  • Loading branch information
workflow committed Sep 14, 2023
1 parent 9c3d549 commit 732b4db
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions home/lf.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ in
enable = true;

commands = {
broot_jump = ''
''${{
f=$(mktemp)
res="$(broot --outcmd $f && cat $f | sed 's/cd //')"
rm -f "$f"
if [ -f "$res" ]; then
cmd="select"
elif [ -d "$res" ]; then
cmd="cd"
fi
lf -remote "send $id $cmd \"$res\""
}}
'';

chmod = ''
''${{
printf "Mode Bits: "
Expand Down Expand Up @@ -94,10 +108,12 @@ in
};

keybindings = {
"." = "set hidden!";
d = null;
dd = "trash";
dl = "dlfile";
dr = "dragon";
f = "broot_jump";
h = "chmod";
k = "down";
l = "up";
Expand Down

0 comments on commit 732b4db

Please sign in to comment.