From a0c5536c3dcc2e36fe69f2c53ddccb9f779a3fea Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Wed, 20 Mar 2024 11:54:06 +0100 Subject: [PATCH] change lf shortcut file --- .config/lf/lfrc | 2 +- .local/bin/shortcuts | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 7f34dd738..9b714f3b8 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -249,7 +249,7 @@ map -m fzf 'Marks' 'cat $XDG_DATA_HOME/lf/marks 2>/dev/null' ':' '2' '85%' '^' map -f fzf 'Files' 'find -L $PWD' ':' '1' '50%' map -g find_word map "'" mark-load -map '"' mark-save +map '"' mark-remove map "$" shell map "!" shell-wait map "&" shell-async diff --git a/.local/bin/shortcuts b/.local/bin/shortcuts index fbe98dd57..a6dc6f73d 100755 --- a/.local/bin/shortcuts +++ b/.local/bin/shortcuts @@ -5,23 +5,23 @@ bmdirs="$XDG_CONFIG_HOME/directories" # Outputs zsh_named_dirs="$ZDOTDIR/configs/hashes" -lf_dirs="$XDG_DATA_HOME/lf/dirs" +lf_dirs="$XDG_DATA_HOME/lf/shortcuts" # TODO: Finish this function LOL -find_marker() { - file=$1 - for marker in \ - "# @SHORTCUTS@" \ - "-- @SHORTCUTS@" \ - "// @SHORTCUTS@" \ - "/* @SHORTCUTS@ */"; do - file=$(grep -xn "$marker" "$file") - if [ -n "$file" ]; then - echo "$file" - return - fi - done -} +# find_marker() { +# file=$1 +# for marker in \ +# "# @SHORTCUTS@" \ +# "-- @SHORTCUTS@" \ +# "// @SHORTCUTS@" \ +# "/* @SHORTCUTS@ */"; do +# file=$(grep -xn "$marker" "$file") +# if [ -n "$file" ]; then +# echo "$file" +# return +# fi +# done +# } zsh() { xargs printf "hash -d %s=%s\n" @@ -39,7 +39,7 @@ write_dirs_tmp() { path=$(eval "echo $path") printf "hash -d %s=%s\n" "$shortcut" "$path" >>"/tmp/shortcuts/zsh_named_dirs" - printf "%s\t%s\n" "$shortcut" "$path" >>"/tmp/shortcuts/lf_dirs" + printf "%s:%s\n" "$shortcut" "$path" >>"/tmp/shortcuts/lf_dirs" done }