lf icons and other tweaks
This commit is contained in:
parent
50cd5939c8
commit
fd839179bb
2 changed files with 9 additions and 3 deletions
|
@ -6,6 +6,8 @@ set previewer ~/.config/lf/scope
|
||||||
set shellopts '-eu'
|
set shellopts '-eu'
|
||||||
set ifs "\n"
|
set ifs "\n"
|
||||||
set scrolloff 10
|
set scrolloff 10
|
||||||
|
set color256
|
||||||
|
set icons # Enable icons. Requires nerd fonts and LF_ICONS variable.
|
||||||
|
|
||||||
# cmds/functions
|
# cmds/functions
|
||||||
cmd open ${{
|
cmd open ${{
|
||||||
|
@ -13,7 +15,7 @@ cmd open ${{
|
||||||
text/troff) man ./ $f;;
|
text/troff) man ./ $f;;
|
||||||
text/*) $EDITOR $fx;;
|
text/*) $EDITOR $fx;;
|
||||||
image/x-xcf|image/svg+xml) setsid gimp $f >/dev/null 2>&1 & ;;
|
image/x-xcf|image/svg+xml) setsid gimp $f >/dev/null 2>&1 & ;;
|
||||||
image/*) rotdir $f | setsid sxiv -ai >/dev/null 2>&1 & ;;
|
image/*) rotdir $f | setsid sxiv -aio 2>&1 | lf-select & ;;
|
||||||
audio/*) mpv --input-ipc-server=/tmp/mpvsoc$(date +%%s) $f ;;
|
audio/*) mpv --input-ipc-server=/tmp/mpvsoc$(date +%%s) $f ;;
|
||||||
video/*) setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%%s) $f -quiet >/dev/null 2>&1 & ;;
|
video/*) setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%%s) $f -quiet >/dev/null 2>&1 & ;;
|
||||||
application/pdf) setsid zathura $fx >/dev/null 2>&1 & ;;
|
application/pdf) setsid zathura $fx >/dev/null 2>&1 & ;;
|
||||||
|
@ -26,7 +28,7 @@ cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1
|
||||||
cmd delete ${{
|
cmd delete ${{
|
||||||
set -f
|
set -f
|
||||||
printf "%s\n\t" "$fx"
|
printf "%s\n\t" "$fx"
|
||||||
printf "delete?[y/n]"
|
printf "delete?[y/N]"
|
||||||
read ans
|
read ans
|
||||||
[ $ans = "y" ] && rm -rf $fx
|
[ $ans = "y" ] && rm -rf $fx
|
||||||
}}
|
}}
|
||||||
|
@ -49,6 +51,7 @@ cmd copyto ${{
|
||||||
|
|
||||||
# Bindings
|
# Bindings
|
||||||
map c $lf -remote "send $id cd $(cut -d' ' -f2 ~/.config/directories | fzf)"
|
map c $lf -remote "send $id cd $(cut -d' ' -f2 ~/.config/directories | fzf)"
|
||||||
|
map <c-f> $lf -remote "send $id select '$(fzf)'"
|
||||||
map J $lf -remote "send $id cd $(cut -d' ' -f2 ~/.config/directories | fzf)"
|
map J $lf -remote "send $id cd $(cut -d' ' -f2 ~/.config/directories | fzf)"
|
||||||
map gh
|
map gh
|
||||||
map g top
|
map g top
|
||||||
|
@ -57,8 +60,9 @@ map C copyto
|
||||||
map M moveto
|
map M moveto
|
||||||
map a push %mkdir<space>
|
map a push %mkdir<space>
|
||||||
map r push :rename<space>
|
map r push :rename<space>
|
||||||
|
map R $lf -remote "send $id push :rename<space>$f"
|
||||||
|
map <c-r> reload
|
||||||
map <enter> shell
|
map <enter> shell
|
||||||
map R reload
|
|
||||||
map x $$f
|
map x $$f
|
||||||
map X !$f
|
map X !$f
|
||||||
map o &mimeopen $f
|
map o &mimeopen $f
|
||||||
|
|
|
@ -43,3 +43,5 @@ export LESS_TERMCAP_ue="$(printf '%b' '[0m')"
|
||||||
|
|
||||||
# Switch escape and caps if tty:
|
# Switch escape and caps if tty:
|
||||||
sudo -n loadkeys ~/.local/share/larbs/ttymaps.kmap 2>/dev/null
|
sudo -n loadkeys ~/.local/share/larbs/ttymaps.kmap 2>/dev/null
|
||||||
|
|
||||||
|
export LF_ICONS="di=:fi=:ln=:or=:ex=:*.c=:*.cc=:*.clj=:*.coffee=:*.cpp=:*.css=:*.d=:*.dart=:*.erl=:*.exs=:*.fs=:*.go=:*.h=:*.hh=:*.hpp=:*.hs=:*.html=:*.java=:*.jl=:*.js=:*.json=:*.lua=:*.md=:*.php=:*.pl=:*.pro=:*.py=:*.rb=:*.rs=:*.scala=:*.ts=:*.vim=:*.cmd=:*.ps1=:*.sh=:*.bash=:*.zsh=:*.fish=:*.tar=:*.tgz=:*.arc=:*.arj=:*.taz=:*.lha=:*.lz4=:*.lzh=:*.lzma=:*.tlz=:*.txz=:*.tzo=:*.t7z=:*.zip=:*.z=:*.dz=:*.gz=:*.lrz=:*.lz=:*.lzo=:*.xz=:*.zst=:*.tzst=:*.bz2=:*.bz=:*.tbz=:*.tbz2=:*.tz=:*.deb=:*.rpm=:*.jar=:*.war=:*.ear=:*.sar=:*.rar=:*.alz=:*.ace=:*.zoo=:*.cpio=:*.7z=:*.rz=:*.cab=:*.wim=:*.swm=:*.dwm=:*.esd=:*.jpg=:*.jpeg=:*.mjpg=:*.mjpeg=:*.gif=:*.bmp=:*.pbm=:*.pgm=:*.ppm=:*.tga=:*.xbm=:*.xpm=:*.tif=:*.tiff=:*.png=:*.svg=:*.svgz=:*.mng=:*.pcx=:*.mov=:*.mpg=:*.mpeg=:*.m2v=:*.mkv=:*.webm=:*.ogm=:*.mp4=:*.m4v=:*.mp4v=:*.vob=:*.qt=:*.nuv=:*.wmv=:*.asf=:*.rm=:*.rmvb=:*.flc=:*.avi=:*.fli=:*.flv=:*.gl=:*.dl=:*.xcf=:*.xwd=:*.yuv=:*.cgm=:*.emf=:*.ogv=:*.ogx=:*.aac=:*.au=:*.flac=:*.m4a=:*.mid=:*.midi=:*.mka=:*.mp3=:*.mpc=:*.ogg=:*.ra=:*.wav=:*.oga=:*.opus=:*.spx=:*.xspf=:*.pdf="
|
||||||
|
|
Loading…
Reference in a new issue