From e8219bd2a203ca0430d37e2eacf06ae86d63f311 Mon Sep 17 00:00:00 2001 From: krolyxon Date: Sun, 17 Jul 2022 22:42:44 +0530 Subject: added moveto function in lf --- .config/lf/lfrc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to '.config/lf/lfrc') diff --git a/.config/lf/lfrc b/.config/lf/lfrc index f170d9d..c103dec 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -52,15 +52,25 @@ cmd delete ${{ [ $ans = "y" ] && rm -rf -- $fx }} +cmd moveto ${{ + clear; tput cup $(($(tput lines)/3)); tput bold + set -f + clear; echo "Move to where?" + dest=$(cat ~/.config/lf/mvdirs | fzf ) + for x in $fx; do + eval mv -iv \"$x\" \"$dest\" + done && + notify-send "🚚 File(s) moved." "File(s) moved to $dest." +}} + cmd genwall "$1" -cmd bulkrename $vidir # Bindings map $lf -remote "send $id select \"$(fzf)\"" -map J $lf -remote "send $id cd $(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf)" map D delete map p paste map dd cut +map M moveto map yy copy map H top map E extract @@ -97,4 +107,5 @@ map gc cd ~/.config map gr cd ~/code/repos map gv cd ~/vids/ map gm cd ~/media/movies +map gM cd ~/media map gs cd ~/.local/bin -- cgit v1.2.3