lf additions
This commit is contained in:
parent
f47ab40c5f
commit
51b8dda985
1 changed files with 7 additions and 7 deletions
|
@ -5,7 +5,6 @@ set shell bash
|
|||
set shellopts '-eu'
|
||||
set ifs "\n"
|
||||
set scrolloff 10
|
||||
set color256
|
||||
set icons
|
||||
set period 1
|
||||
set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
|
||||
|
@ -18,8 +17,9 @@ cmd open ${{
|
|||
case $(file --mime-type $f -b) in
|
||||
image/vnd.djvu|application/pdf|application/octet-stream) setsid -f zathura $fx >/dev/null 2>&1 ;;
|
||||
text/*) $EDITOR $fx;;
|
||||
image/x-xcf|image/svg+xml) setsid -f gimp $f >/dev/null 2>&1 ;;
|
||||
image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\)\(_large\)*$" | sxiv -aio 2>/dev/null | lf-select ;;
|
||||
image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
|
||||
image/svg+xml) display -- $f ;;
|
||||
image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" | sxiv -aio 2>/dev/null | lf-select ;;
|
||||
audio/*) mpv --audio-display=no $f ;;
|
||||
video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;;
|
||||
application/pdf|application/vnd*|application/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;;
|
||||
|
@ -35,14 +35,14 @@ cmd delete ${{
|
|||
printf "%s\n\t" "$fx"
|
||||
printf "delete?[y/N]"
|
||||
read ans
|
||||
[ $ans = "y" ] && rm -rf $fx
|
||||
[ $ans = "y" ] && rm -rf -- $fx
|
||||
}}
|
||||
|
||||
cmd moveto ${{
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
clear; echo "Move to where?"
|
||||
dest="$(cut -d' ' -f2- ${XDG_CONFIG_HOME:-$HOME/.config}/directories | fzf | sed 's|~|$HOME|' )" &&
|
||||
dest="$(cut -d' ' -f2- ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|' )" &&
|
||||
for x in $fx; do
|
||||
eval mv -iv \"$x\" \"$dest\"
|
||||
done &&
|
||||
|
@ -53,7 +53,7 @@ cmd copyto ${{
|
|||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
clear; echo "Copy to where?"
|
||||
dest="$(cut -d' ' -f2- ${XDG_CONFIG_HOME:-$HOME/.config}/directories | fzf | sed 's|~|$HOME|' )" &&
|
||||
dest="$(cut -d' ' -f2- ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|' )" &&
|
||||
for x in $fx; do
|
||||
eval cp -ivr \"$x\" \"$dest\"
|
||||
done &&
|
||||
|
@ -65,7 +65,7 @@ cmd bulkrename $vidir
|
|||
|
||||
# Bindings
|
||||
map <c-f> $lf -remote "send $id select '$(fzf)'"
|
||||
map J $lf -remote "send $id cd $(cut -d' ' -f2 ${XDG_CONFIG_HOME:-$HOME/.config}/directories | fzf)"
|
||||
map J $lf -remote "send $id cd $(cut -d' ' -f2 ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf)"
|
||||
map gh
|
||||
map g top
|
||||
map D delete
|
||||
|
|
Loading…
Reference in a new issue