From cb98b24161a71972c1f8614b65177007e266265b Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Thu, 25 May 2023 15:13:03 -0700 Subject: [PATCH] Convert lf from stow to chezmoi --- .chezmoiignore | 3 --- lf/.config/lf/lfrc => dot_config/lf/lfrc.tmpl | 6 ++++-- .../install-lf-home => dot_local/bin/executable_install-lf | 0 3 files changed, 4 insertions(+), 5 deletions(-) rename lf/.config/lf/lfrc => dot_config/lf/lfrc.tmpl (90%) rename lf/.local/bin/install-lf-home => dot_local/bin/executable_install-lf (100%) mode change 100755 => 100644 diff --git a/.chezmoiignore b/.chezmoiignore index d0aaa82..433cfa5 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -1,8 +1,5 @@ -/go/ /hellotech/ -/i3/ /install-scripts/ -/lf/ /node/ /old-scripts/ /ripgrep/ diff --git a/lf/.config/lf/lfrc b/dot_config/lf/lfrc.tmpl similarity index 90% rename from lf/.config/lf/lfrc rename to dot_config/lf/lfrc.tmpl index cfc84c1..a928c1c 100644 --- a/lf/.config/lf/lfrc +++ b/dot_config/lf/lfrc.tmpl @@ -1,3 +1,4 @@ +{{ if lookPath "lf" -}} set drawbox true set hidden true set icons true @@ -23,10 +24,11 @@ map , # find-prev (default ',') map o open -cmd open ${{ +cmd open ${{ "{{" }} case $(file --mime-type "$f" --brief --dereference) in text/*|application/json) $EDITOR "$f";; video/*|image/*|application/pdf) xdg-open "$f";; *) xdg-open "$f";; esac -}} +{{ "}}" }} +{{- end }} diff --git a/lf/.local/bin/install-lf-home b/dot_local/bin/executable_install-lf old mode 100755 new mode 100644 similarity index 100% rename from lf/.local/bin/install-lf-home rename to dot_local/bin/executable_install-lf