summaryrefslogtreecommitdiff
path: root/ar/.config/lf
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-02-06 14:43:39 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-02-06 14:43:39 +0900
commit6053dfba6fd1172c7180985cc61b068018768608 (patch)
tree997992953f6b3654b80de7ff769e587c81b6fa0d /ar/.config/lf
parente3f6bf06601cd5d633528eb403eb63617163e9fe (diff)
modified lf/lfrc, modified shell/profile
Diffstat (limited to 'ar/.config/lf')
-rw-r--r--ar/.config/lf/lfrc11
1 files changed, 11 insertions, 0 deletions
diff --git a/ar/.config/lf/lfrc b/ar/.config/lf/lfrc
index c11a06c..710ab41 100644
--- a/ar/.config/lf/lfrc
+++ b/ar/.config/lf/lfrc
@@ -179,6 +179,7 @@ cmd delete ${{
}}
cmd trash ${{
+ clear
files=$(printf "$fx" | tr '\n' ';')
while [ "$files" ]; do
file=${files%%;*}
@@ -223,6 +224,15 @@ cmd extract ${{
}}
# Git
+cmd git-root %{{
+ root=$(git rev-parse --show-toplevel 2>/dev/null)
+ if [ -n "$root" ]; then
+ lf -remote "send $id cd \"$root\""
+ else
+ lf -remote "send $id echo 'Not in a git repository'"
+ fi
+}}
+
cmd on-cd &{{
zoxide add "$PWD"
bash -c '
@@ -646,6 +656,7 @@ map fD zi
map fd $lf -remote "send $id select \"$(find . -type d | fzf)\""
map ff $lf -remote "send $id select \"$(find . -type f | fzf)\""
map gl follow_link
+map gc git-root
map <c-f> fzf_search
map <c-z> z