diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 63008f5ec..df258a7f7 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -9,7 +9,6 @@ set wrapscroll set period 1 set previewer ~/.config/lf/preview set cleaner ~/.config/lf/clean -# set drawbox set cursorpreviewfmt "\033[7;90m" set promptfmt "\033[34;1m%u\033[36m@\033[34m%h \033[35m[\033[0;1m%d\033[35m]\033[32m ยป \033[33m%f\033[0m" @@ -47,18 +46,10 @@ cmd delete ${{ }} cmd trash ${{ - clear; tput cup $(($(tput lines)/3)); tput bold - set -f - printf "%s\n\t" "$fx" - printf "trash?[y/N]" - read ans - clear - if [ $ans = "y" ]; then - for f in $fx; do - echo $f - trash-put $f & - done - fi + for f in $fx; do + echo $f + trash-put $f & + done }} cmd rsyncto ${{ @@ -93,7 +84,6 @@ cmd link %{{ lf -remote "send clear" }} -cmd setbg "$1" cmd bulkrename $vidir cmd on-cd &{{ @@ -113,7 +103,13 @@ cmd paste &{{ mode="$1" shift case "$mode" in - copy) cp -rn -- "$@" .;; + copy) + rsync -av --ignore-existing --progress -- "$@" . | + stdbuf -i0 -o0 -e0 tr '\r' '\n' | + while IFS= read -r line; do + lf -remote "send $id echo $line" + done + ;; move) mv -n -- "$@" .;; esac rm ~/.local/share/lf/files @@ -157,14 +153,10 @@ cmd fzfmarks ${{ [ -d $file ] && lf -remote "send $id cd $file" && return 0 [ -f $file ] && lf -remote "send $id select $file" }} -cmd fzfshortcutfiles ${{ - file="$(cat ${XDG_DATA_HOME:-$HOME/.local/share}/lf/shortcut-files | fzf)" - lf -remote "send $id select $file" -}} -cmd fzfshortcutdirs ${{ - file="$(cat ${XDG_DATA_HOME:-$HOME/.local/share}/lf/shortcut-dirs | fzf)" - [ -d $file ] && lf -remote "send $id cd $file" - lf -remote "send $id select $file" +cmd fzfshortcut ${{ + file="$(cat ${XDG_CONFIG_HOME:-$HOME/.config}/lf/shortcutrc | cut -d '"' -f2 | fzf)" + [ -d $file ] && lf -remote "send $id cd $file" && return 0 + [ -f $file ] && lf -remote "send $id select $file" }} cmd fzfgrep ${{ RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case " @@ -181,10 +173,8 @@ cmd fzfgrep ${{ map a fzfsearch map t fzftags map m fzfmarks -map f fzfshortcutfiles -map d fzfshortcutdirs +map f fzfshortcut map g fzfgrep -map J $dir=$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf) && lf -remote "send $id cd $(eval echo $dir)" map D trash map $trash-restore $PWD map T delete diff --git a/.local/bin/trash-put b/.local/bin/trash-put index 332b8a043..16182b660 100755 --- a/.local/bin/trash-put +++ b/.local/bin/trash-put @@ -23,6 +23,6 @@ find "$filedir" -regex ".*$filename.*" | grep -oP '(?<=.\.~)\d+(?=~$)' | sort -n cat <"$infodir/$(basename "$filedest")" [Trash Info] Path=$filepath -DeletionDate=$(date +%Y%m%dT%T) +DeletionDate=$(date -u +%Y%m%dUTC%T) EOF )