diff --git a/yazi-config/preset/theme.toml b/yazi-config/preset/theme.toml index d98bdad0e..a063e0401 100644 --- a/yazi-config/preset/theme.toml +++ b/yazi-config/preset/theme.toml @@ -190,8 +190,9 @@ rules = [ { mime = "{audio,video}/*", fg = "magenta" }, # Archives - { mime = "application/{,g}zip", fg = "red" }, - { mime = "application/{tar,bzip*,7z-compressed,xz,rar}", fg = "red" }, + { mime = "application/{zip,rar,tar,gzip,xz,zstd,bzip*,zlib,lzma,compress,compressed,archive,cpio,arj,deflate,xar}", fg = "red" }, + { mime = "application/{zip,rar,7z,gzip,arj}-compressed", fg = "red" }, + { mime = "application/vnd.ms-cab-compressed", fg = "red" }, # Documents { mime = "application/{pdf,doc,rtf,vnd.*}", fg = "cyan" }, diff --git a/yazi-config/preset/yazi.toml b/yazi-config/preset/yazi.toml index 863291cfd..306128c87 100644 --- a/yazi-config/preset/yazi.toml +++ b/yazi-config/preset/yazi.toml @@ -67,8 +67,13 @@ rules = [ # Media { mime = "{audio,video}/*", use = [ "play", "reveal" ] }, # Archive - { mime = "application/{,g}zip", use = [ "extract", "reveal" ] }, - { mime = "application/{tar,bzip*,7z-compressed,xz,rar}", use = [ "extract", "reveal" ] }, + { mime = "application/{zip,rar,tar,gzip,xz,zstd,bzip*,lzma,compress,compressed,archive,cpio,arj,deflate,xar}", use = [ "extract", "reveal" ] }, + { mime = "application/{zip,rar,7z,gzip,arj}-compressed", use = [ "extract", "reveal" ] }, + { mime = "application/{debian-package,redhat-package-manager,rpm}", use = [ "extract", "reveal" ] }, + { mime = "application/vnd.debian.binary-package", use = [ "extract", "reveal" ] }, + { mime = "application/vnd.android.package-archive", use = [ "extract", "reveal" ] }, + { mime = "application/vnd.ms-cab-compressed", use = [ "extract", "reveal" ] }, + { name = "*.{AppImage,appimage}", use = [ "extract", "reveal" ] }, # JSON { mime = "application/{json,ndjson}", use = [ "edit", "reveal" ] }, { mime = "*/javascript", use = [ "edit", "reveal" ] }, @@ -132,8 +137,20 @@ previewers = [ # PDF { mime = "application/pdf", run = "pdf" }, # Archive - { mime = "application/{,g}zip", run = "archive" }, - { mime = "application/{tar,bzip*,7z-compressed,xz,rar,iso9660-image}", run = "archive" }, + { mime = "application/{zip,rar,tar,gzip,xz,zstd,bzip*,lzma,compress,compressed,archive,cpio,arj,deflate,xar}", run = "archive" }, + { mime = "application/{zip,rar,7z,gzip,arj}-compressed", run = "archive" }, + { mime = "application/{debian-package,redhat-package-manager,rpm}", run = "archive" }, + { mime = "application/vnd.debian.binary-package", run = "archive" }, + { mime = "application/vnd.android.package-archive", run = "archive" }, + { mime = "application/vnd.ms-cab-compressed", run = "archive" }, + { name = "*.{AppImage,appimage}", run = "archive" }, + # Virtual Disk / Disk Image + { mime = "application/iso9660-image", run = "archive" }, + { mime = "application/{qemu,vhd,vhdx,vdi,vmdk}-disk", run = "archive" }, + { mime = "application/{vhd,vmdk}", run = "archive" }, + { mime = "application/virtualbox-{vdi,vhd,vhdx,vmdk}", run = "archive" }, + { mime = "application/{ms-wim,apple-diskimage}", run = "archive" }, + { name = "*.{dmg,DMG,img,fat,ext,ext2,ext3,ext4,squashfs,ntfs,hfs,hfsx}", run = "archive" }, # Font { mime = "font/*", run = "font" }, { mime = "application/vnd.ms-opentype", run = "font" },