add: lf fzf script & eza tree fish alias
This commit is contained in:
parent
670bd22ca6
commit
6142f13a33
3 changed files with 29 additions and 4 deletions
|
|
@ -30,11 +30,11 @@ in
|
|||
|
||||
fe = mkIf hasHelix "cd $FLAKE; hx $FLAKE";
|
||||
|
||||
tree = mkIf hasEza "eza -aT --icons --group-directories-first";
|
||||
tree = mkIf hasEza "eza -T --icons --group-directories-first";
|
||||
ls = mkIf hasEza "eza -a --icons --group-directories-first";
|
||||
lsd = mkIf hasEza "eza -al --icons --group-directories-first";
|
||||
lst = mkIf hasEza "eza -aT -L 5 --icons --group-directories-first";
|
||||
lsta = mkIf hasEza "eza -aT --icons --group-directories-first";
|
||||
lst = mkIf hasEza "eza -T -L 5 --icons --group-directories-first";
|
||||
lsta = mkIf hasEza "eza -T --icons --group-directories-first";
|
||||
|
||||
cat = mkIf hasBat "bat";
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,32 @@ programs.lf = {
|
|||
keybinding = "i";
|
||||
source = "${pkgs.ctpv}/bin/ctpv";
|
||||
};
|
||||
commands = {
|
||||
fzf-lf = ''
|
||||
''${{
|
||||
res="$(find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune -o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m)"
|
||||
if [ -d "$res" ] ; then
|
||||
cmd="cd"
|
||||
elif [ -f "$res" ] ; then
|
||||
cmd="select"
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
lf -remote "send $id $cmd \"$res\""
|
||||
}}
|
||||
'';
|
||||
mkdir = ''
|
||||
''${{
|
||||
printf "Directory Name: "
|
||||
read DIR
|
||||
mkdir $DIR
|
||||
}}
|
||||
'';
|
||||
};
|
||||
keybindings = {
|
||||
c = "mkdir";
|
||||
"<a-f>" = "fzf-lf";
|
||||
};
|
||||
extraConfig = ''
|
||||
&${pkgs.ctpv}/bin/ctpv -s $id
|
||||
cmd on-quit %${pkgs.ctpv}/bin/ctpv -e $id
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
# fi - # FILE
|
||||
|
||||
# file types (with matching order)
|
||||
home # HOME
|
||||
ln # LINK
|
||||
or # ORPHAN
|
||||
tw t # STICKY_OTHER_WRITABLE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue