From 3582bb47377a6776f35d4f88f87572a7174858de Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Tue, 2 Mar 2021 17:49:01 +0800 Subject: [PATCH] [feature] add icons --- cli/fish/functions/f.fish | 162 ++++++++++++++++++++++++++++++++++++++ cli/lf/lfrc | 1 + 2 files changed, 163 insertions(+) diff --git a/cli/fish/functions/f.fish b/cli/fish/functions/f.fish index 700966c..71fbf91 100644 --- a/cli/fish/functions/f.fish +++ b/cli/fish/functions/f.fish @@ -1,4 +1,166 @@ function f --description='sync lf pwd to shell when exit' + set -x LF_ICONS "\ +tw= :\ +st= :\ +ow= :\ +dt= :\ +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= :\ +*.nix= :\ +" set tempfile (mktemp -t tmp.XXXXXX) command lf -last-dir-path $tempfile $argv if test -s $tempfile diff --git a/cli/lf/lfrc b/cli/lf/lfrc index 59d08ed..0f68500 100644 --- a/cli/lf/lfrc +++ b/cli/lf/lfrc @@ -1,4 +1,5 @@ set drawbox +set icons cmd mkdir %mkdir "$@" cmd copyfilepath %echo "$f" | xsel -b