From 5032239a236595451f22ea948c42281f8aa04645 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Thu, 23 Jul 2026 18:30:05 +0530 Subject: feat: migrate from lf to yazi as default file manager - Replace lf module with yazi module including base16 theme - Remove file-preview and file-preview-clean scripts (no longer needed) - Add yazi-file-chooser script for XDG Desktop Portal integration - Update i3 keybinding to use yazi - Add GTK_USE_PORTAL and TERMCMD session variables - Add extraLinks support to mkScriptModule --- modules/file-management/lf/default.nix | 69 ------- modules/file-management/lf/icons | 342 --------------------------------- modules/file-management/lf/lfrc | 168 ---------------- 3 files changed, 579 deletions(-) delete mode 100644 modules/file-management/lf/default.nix delete mode 100644 modules/file-management/lf/icons delete mode 100644 modules/file-management/lf/lfrc (limited to 'modules/file-management/lf') diff --git a/modules/file-management/lf/default.nix b/modules/file-management/lf/default.nix deleted file mode 100644 index 15d34ae..0000000 --- a/modules/file-management/lf/default.nix +++ /dev/null @@ -1,69 +0,0 @@ -# lf - terminal file manager -{ - pkgs, - lib, - config, - ... -}: -{ - options.file-management.lf = { - enable = lib.mkEnableOption "Enables lf."; - package = lib.mkOption { - type = lib.types.package; - default = pkgs.lf.overrideAttrs (old: { - dontWrapQtApps = true; - dontPatchShebangs = true; - }); - description = "The lf package to use."; - }; - }; - - config = lib.mkIf config.file-management.lf.enable { - assertions = [ - { - assertion = config.scripts.file-preview.enable; - message = "file-management.lf.enable requires scripts.file-preview.enable for file previews."; - } - { - assertion = config.scripts.file-preview-clean.enable; - message = "file-management.lf.enable requires scripts.file-preview-clean.enable to clear kitty previews."; - } - ]; - - xdg.mimeApps.defaultApplications = { - "inode/directory" = "lf.desktop"; - }; - - programs.lf = { - enable = true; - package = config.file-management.lf.package; - settings = { - number = true; - icons = true; - drawbox = true; - hidden = true; - preview = true; - - shell = config.home.sessionVariables.SHELL; - ifs = "\n"; - scrolloff = "4"; - period = "1"; - incsearch = true; - smartcase = true; - info = "size"; - sortby = "natural"; - dirfirst = true; - - cleaner = lib.getExe config.scripts.file-preview-clean.package; - }; - - previewer = { - source = lib.getExe config.scripts.file-preview.package; - }; - - extraConfig = builtins.readFile ./lfrc; - }; - - home.file.".config/lf/icons".source = ./icons; - }; -} diff --git a/modules/file-management/lf/icons b/modules/file-management/lf/icons deleted file mode 100644 index 8697cf2..0000000 --- a/modules/file-management/lf/icons +++ /dev/null @@ -1,342 +0,0 @@ -# vim:ft=conf - -# 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 - -# 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  diff --git a/modules/file-management/lf/lfrc b/modules/file-management/lf/lfrc deleted file mode 100644 index 7ae847c..0000000 --- a/modules/file-management/lf/lfrc +++ /dev/null @@ -1,168 +0,0 @@ -# ========================= -# BASIC MOVEMENT (nvim-like) -# ========================= - -map j down -map k up -map h updir -map l open - -map gg top -map G bottom - -map half-up -map half-down - -map page-up -map page-down - -# ========================= -# SELECTION -# ========================= - -map toggle -map v invert -map V select - -# ========================= -# OPENING -# ========================= - -map o open -map open -map L open - -# ========================= -# DIRECTORY NAVIGATION -# ========================= - -map H cd .. -map gh cd ~ -map ge cd / - -# ========================= -# FILE OPERATIONS -# ========================= - -map y copy -map x cut -map p paste - -map d delete - -map a :push %mkdir -map A :push %touch - -map r rename - -# ========================= -# SEARCH -# ========================= - -map / search -map n search-next -map N search-prev - -map f find -map F find-back - -# ========================= -# FILTER -# ========================= - -map zf filter -map zc clear - -# ========================= -# MARKS (vim-style) -# ========================= - -map m mark-save -map ' mark-load - -# ========================= -# HISTORY -# ========================= - -map history-prev -map history-next - -# ========================= -# RELOAD -# ========================= - -map R reload - -# ========================= -# SHELL / COMMANDS -# ========================= - -map ! shell -map : read - -map & shell-async - -# ========================= -# VISUAL MODES / TAGGING -# ========================= - -map t tag -map T tag-toggle - -# ========================= -# SORTING -# ========================= - -map sn set sortby name -map ss set sortby size -map st set sortby time -map se set sortby ext - -# ========================= -# TOGGLES -# ========================= - -map zh set hidden! -map zr set reverse! - -# ========================= -# VIEW -# ========================= - -map zi set info -map zs set preview - -# ========================= -# JUMPS -# ========================= - -map [ jump-prev -map ] jump-next - -# ========================= -# CLIPBOARD-LIKE -# ========================= - -map c clear -map u unselect - -# ========================= -# MULTI-SELECTION NAV -# ========================= - -map J down-select -map K up-select - -# ========================= -# COMMAND MODE SHORTCUTS -# ========================= - -map w :write -map q quit -map Q quit! - -# ========================= -# FILE INFO -# ========================= - -map i info -- cgit v1.2.3