add: lf icons & ls tree alias with eza; remove tre-commmand package
This commit is contained in:
		
							parent
							
								
									b8183d1627
								
							
						
					
					
						commit
						670bd22ca6
					
				
					 5 changed files with 393 additions and 15 deletions
				
			
		|  | @ -1,7 +1,7 @@ | ||||||
| { pkgs, ... }: { | { pkgs, ... }: { | ||||||
|   imports = [ |   imports = [ | ||||||
|     ./bat.nix |     ./bat.nix | ||||||
|     ./lf.nix |     ./lf | ||||||
|     ./nvim.nix |     ./nvim.nix | ||||||
|     ./fzf.nix |     ./fzf.nix | ||||||
|     ./git.nix |     ./git.nix | ||||||
|  | @ -26,7 +26,6 @@ | ||||||
|     btop # Resource manager |     btop # Resource manager | ||||||
|     tldr # Community maintained help pages |     tldr # Community maintained help pages | ||||||
|     tmux # Terminal multiplexer |     tmux # Terminal multiplexer | ||||||
|     tre-command # Better tree |  | ||||||
|     unzip |     unzip | ||||||
|     progress |     progress | ||||||
|     killall |     killall | ||||||
|  |  | ||||||
|  | @ -4,8 +4,6 @@ let | ||||||
|   hasPackage = pname: lib.any (p: p ? pname && p.pname == pname) config.home.packages; |   hasPackage = pname: lib.any (p: p ? pname && p.pname == pname) config.home.packages; | ||||||
|   hasEza = hasPackage "eza"; |   hasEza = hasPackage "eza"; | ||||||
|   hasNeovim = config.programs.neovim.enable; |   hasNeovim = config.programs.neovim.enable; | ||||||
|   hasKitty = config.programs.kitty.enable; |  | ||||||
|   hasTre = hasPackage "tre-command"; |  | ||||||
|   hasBat = hasPackage "bat"; |   hasBat = hasPackage "bat"; | ||||||
|   hasHelix = hasPackage "helix"; |   hasHelix = hasPackage "helix"; | ||||||
| in | in | ||||||
|  | @ -32,9 +30,11 @@ in | ||||||
| 
 | 
 | ||||||
|       fe = mkIf hasHelix "cd $FLAKE; hx $FLAKE"; |       fe = mkIf hasHelix "cd $FLAKE; hx $FLAKE"; | ||||||
| 
 | 
 | ||||||
|       tree = mkIf hasTre "tre"; |       tree = mkIf hasEza "eza -aT --icons --group-directories-first"; | ||||||
| 
 |       ls = mkIf hasEza "eza -a --icons --group-directories-first"; | ||||||
|       ls = mkIf hasEza "eza --icons"; |       lsd = mkIf hasEza "eza -al --icons --group-directories-first"; | ||||||
|  |       lst = mkIf hasEza "eza -aT -L 5 --icons --group-directories-first"; | ||||||
|  |       lsta = mkIf hasEza "eza -aT --icons --group-directories-first"; | ||||||
| 
 | 
 | ||||||
|       cat = mkIf hasBat "bat"; |       cat = mkIf hasBat "bat"; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,8 +0,0 @@ | ||||||
| { pkgs, config, ... }: |  | ||||||
| 
 |  | ||||||
| { |  | ||||||
|   programs.lf = { |  | ||||||
|     enable = true; |  | ||||||
|      |  | ||||||
|   };   |  | ||||||
| } |  | ||||||
							
								
								
									
										29
									
								
								home/ooks/base/shell/lf/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								home/ooks/base/shell/lf/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,29 @@ | ||||||
|  | { pkgs, config, ... }: | ||||||
|  | #TODO mkif wayland for previewer | ||||||
|  | { | ||||||
|  | 
 | ||||||
|  | xdg.configFile."lf/icons".source = ./icons; | ||||||
|  | 
 | ||||||
|  | programs.lf = { | ||||||
|  |   enable = true; | ||||||
|  |   settings = { | ||||||
|  |     hidden = true; | ||||||
|  |     ignorecase = true; | ||||||
|  |     drawbox = true; | ||||||
|  |     icons = true; | ||||||
|  |   }; | ||||||
|  |   previewer = { | ||||||
|  |     keybinding = "i"; | ||||||
|  |     source = "${pkgs.ctpv}/bin/ctpv"; | ||||||
|  |   }; | ||||||
|  |   extraConfig = '' | ||||||
|  |     &${pkgs.ctpv}/bin/ctpv -s $id | ||||||
|  |     cmd on-quit %${pkgs.ctpv}/bin/ctpv -e $id | ||||||
|  |     set cleaner ${pkgs.ctpv}/bin/ctpvclear | ||||||
|  |     set sixel true | ||||||
|  |   ''; | ||||||
|  | };     | ||||||
|  |    | ||||||
|  | 
 | ||||||
|  |   home.packages = with pkgs; [ chafa ctpv glow ]; | ||||||
|  | } | ||||||
							
								
								
									
										358
									
								
								home/ooks/base/shell/lf/icons
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										358
									
								
								home/ooks/base/shell/lf/icons
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,358 @@ | ||||||
|  | # 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) | ||||||
|  | home           # HOME | ||||||
|  | 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 | ||||||
|  | 
 | ||||||
|  | # 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      | ||||||
|  | *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      | ||||||
|  | *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    | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue