lf movement binds

This commit is contained in:
krolyxon 2022-07-05 22:25:48 +05:30
parent e824a57bca
commit 7e0bb891ab
2 changed files with 13 additions and 28 deletions

View File

@ -53,40 +53,18 @@ 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="$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|')" &&
for x in $fx; do
eval mv -iv \"$x\" \"$dest\"
done &&
notify-send "🚚 File(s) moved." "File(s) moved to $dest."
}}
cmd copyto ${{
clear; tput cup $(($(tput lines)/3)); tput bold
set -f
clear; echo "Copy to where?"
dest="$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|')" &&
for x in $fx; do
eval cp -ivr \"$x\" \"$dest\"
done &&
notify-send "📋 File(s) copied." "File(s) copies to $dest."
}}
cmd genwall "$1"
cmd bulkrename $vidir
# Bindings
map <c-f> $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 gh
map g top
map D delete
map p paste
map dd cut
map yy copy
map H top
map E extract
map C copyto
map M moveto
map <c-n> push :mkdir<space>
map <c-r> reload
map <c-s> set hidden!
@ -112,5 +90,11 @@ map W $setsid -f $TERMINAL >/dev/null 2>&1
map Y $printf "%s" "$fx" | xclip -selection clipboard
# Source Bookmarks
#source "~/.config/lf/shortcutrc"
# movement
map gd cd ~/dox/
map gD cd ~/dl/
map gp cd ~/pix
map gc cd ~/.config
map gr cd ~/code/repos
map gv cd ~/vids/
map gs cd ~/.local/bin

View File

@ -13,6 +13,7 @@ alias \
cl='clear' \
dots='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' \
lf="lfub" \
nb="newsboat" \
hst='history 1 -1 | cut -c 8- | sort | uniq | fzf | tr -d '\n' | xclip -sel c'
# Verbosity and settings that you pretty much just always are going to want.