From 698c504795a454a33f6edc5c9d41017e7ad4189f Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 10 Jun 2025 14:38:57 +0200 Subject: [PATCH] Extend LF config --- fish/.config/fish/config.fish | 3 + fish/.config/fish/functions/lf.fish | 18 ++ lf/.config/lf/icons | 377 ++++++++++++++++++++++++++++ lf/.config/lf/lfrc | 1 + 4 files changed, 399 insertions(+) create mode 100644 fish/.config/fish/functions/lf.fish create mode 100644 lf/.config/lf/icons diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish index 932dea0..aa58c0d 100644 --- a/fish/.config/fish/config.fish +++ b/fish/.config/fish/config.fish @@ -37,3 +37,6 @@ if test -d "$FNM_PATH" end fish_add_path /home/tim/.pixi/bin + +set -gx EDITOR nano +set -gx PAGER less diff --git a/fish/.config/fish/functions/lf.fish b/fish/.config/fish/functions/lf.fish new file mode 100644 index 0000000..8f5d5f0 --- /dev/null +++ b/fish/.config/fish/functions/lf.fish @@ -0,0 +1,18 @@ +# Change working dir in fish to last dir in lf on exit (adapted from ranger). +# +# You may put this file to a directory in $fish_function_path variable: +# +# mkdir -p ~/.config/fish/functions +# ln -s "/path/to/lfcd.fish" ~/.config/fish/functions +# +# You may also like to assign a key (Ctrl-O) to this command: +# +# bind \co 'set old_tty (stty -g); stty sane; lfcd; stty $old_tty; commandline -f repaint' +# +# You may put this in a function called fish_user_key_bindings. + +function lf --wraps="lf" --description="lf - Terminal file manager (changing directory on exit)" + # `command` is needed in case `lfcd` is aliased to `lf`. + # Quotes will cause `cd` to not change directory if `lf` prints nothing to stdout due to an error. + cd "$(command lf -print-last-dir $argv)" +end diff --git a/lf/.config/lf/icons b/lf/.config/lf/icons new file mode 100644 index 0000000..31d7206 --- /dev/null +++ b/lf/.config/lf/icons @@ -0,0 +1,377 @@ +# vim:ft=conf + +# These examples require Nerd Fonts or a compatible font to be used. +# See https://www.nerdfonts.com for more information. + +# default values from lf (with matching order) +# ln l # LINK +# or l # ORPHAN +# tw t # STICKY_OTHER_WRITABLE +# ow d # OTHER_WRITABLE +# st t # STICKY +# di d # DIR +# pi p # FIFO +# so s # SOCK +# bd b # BLK +# cd c # CHR +# su u # SETUID +# sg g # SETGID +# ex x # EXEC +# fi - # FILE + +# file types (with matching order) +ln  # LINK +or  # ORPHAN +tw t # STICKY_OTHER_WRITABLE +ow  # OTHER_WRITABLE +st t # STICKY +di  # DIR +pi p # FIFO +so s # SOCK +bd b # BLK +cd c # CHR +su u # SETUID +sg g # SETGID +ex  # EXEC +fi  # FILE + +# disable some default filetype icons, let them choose icon by filename +# ln  # LINK +# or  # ORPHAN +# tw # STICKY_OTHER_WRITABLE +# ow # OTHER_WRITABLE +# st # STICKY +# di  # DIR +# pi # FIFO +# so # SOCK +# bd # BLK +# cd # CHR +# su # SETUID +# sg # SETGID +# ex # EXEC +# fi  # FILE + +# file extensions (vim-devicons) +*.styl  +*.sass  +*.scss  +*.htm  +*.html  +*.slim  +*.haml  +*.ejs  +*.css  +*.less  +*.md  +*.mdx  +*.markdown  +*.rmd  +*.json  +*.webmanifest  +*.js  +*.mjs  +*.jsx  +*.rb  +*.gemspec  +*.rake  +*.php  +*.py  +*.pyc  +*.pyo  +*.pyd  +*.coffee  +*.mustache  +*.hbs  +*.conf  +*.ini  +*.yml  +*.yaml  +*.toml  +*.bat  +*.mk  +*.jpg  +*.jpeg  +*.bmp  +*.png  +*.webp  +*.gif  +*.ico  +*.twig  +*.cpp  +*.c++  +*.cxx  +*.cc  +*.cp  +*.c  +*.cs 󰌛 +*.h  +*.hh  +*.hpp  +*.hxx  +*.hs  +*.lhs  +*.nix  +*.lua  +*.java  +*.sh  +*.fish  +*.bash  +*.zsh  +*.ksh  +*.csh  +*.awk  +*.ps1  +*.ml λ +*.mli λ +*.diff  +*.db  +*.sql  +*.dump  +*.clj  +*.cljc  +*.cljs  +*.edn  +*.scala  +*.go  +*.dart  +*.xul  +*.sln  +*.suo  +*.pl  +*.pm  +*.t  +*.rss  +'*.f#'  +*.fsscript  +*.fsx  +*.fs  +*.fsi  +*.rs  +*.rlib  +*.d  +*.erl  +*.hrl  +*.ex  +*.exs  +*.eex  +*.leex  +*.heex  +*.vim  +*.ai  +*.psd  +*.psb  +*.ts  +*.tsx  +*.jl  +*.pp  +*.vue  +*.elm  +*.swift  +*.xcplayground  +*.tex 󰙩 +*.r 󰟔 +*.rproj 󰗆 +*.sol 󰡪 +*.pem  + +# file names (vim-devicons) (case-insensitive not supported in lf) +*gruntfile.coffee  +*gruntfile.js  +*gruntfile.ls  +*gulpfile.coffee  +*gulpfile.js  +*gulpfile.ls  +*mix.lock  +*dropbox  +*.ds_store  +*.gitconfig  +*.gitignore  +*.gitattributes  +*.gitlab-ci.yml  +*.bashrc  +*.zshrc  +*.zshenv  +*.zprofile  +*.vimrc  +*.gvimrc  +*_vimrc  +*_gvimrc  +*.bashprofile  +*favicon.ico  +*license  +*node_modules  +*react.jsx  +*procfile  +*dockerfile  +*docker-compose.yml  +*docker-compose.yaml  +*compose.yml  +*compose.yaml  +*rakefile  +*config.ru  +*gemfile  +*makefile  +*cmakelists.txt  +*robots.txt 󰚩 + +# file names (case-sensitive adaptations) +*Gruntfile.coffee  +*Gruntfile.js  +*Gruntfile.ls  +*Gulpfile.coffee  +*Gulpfile.js  +*Gulpfile.ls  +*Dropbox  +*.DS_Store  +*LICENSE  +*React.jsx  +*Procfile  +*Dockerfile  +*Docker-compose.yml  +*Docker-compose.yaml  +*Rakefile  +*Gemfile  +*Makefile  +*CMakeLists.txt  + +# file patterns (vim-devicons) (patterns not supported in lf) +# .*jquery.*\.js$  +# .*angular.*\.js$  +# .*backbone.*\.js$  +# .*require.*\.js$  +# .*materialize.*\.js$  +# .*materialize.*\.css$  +# .*mootools.*\.js$  +# .*vimrc.*  +# Vagrantfile$  + +# file patterns (file name adaptations) +*jquery.min.js  +*angular.min.js  +*backbone.min.js  +*require.min.js  +*materialize.min.js  +*materialize.min.css  +*mootools.min.js  +*vimrc  +Vagrantfile  + +# archives or compressed (extensions from dircolors defaults) +*.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  + +# image formats (extensions from dircolors defaults) +*.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  + +# audio formats (extensions from dircolors defaults) +*.aac  +*.au  +*.flac  +*.m4a  +*.mid  +*.midi  +*.mka  +*.mp3  +*.mpc  +*.ogg  +*.ra  +*.wav  +*.oga  +*.opus  +*.spx  +*.xspf  + +# other formats +*.pdf  \ No newline at end of file diff --git a/lf/.config/lf/lfrc b/lf/.config/lf/lfrc index a5e1cfd..ec7fb66 100644 --- a/lf/.config/lf/lfrc +++ b/lf/.config/lf/lfrc @@ -1 +1,2 @@ set hidden true +set icons true