feat: add more supported archive formats to the preset config (#1926)

This commit is contained in:
Integral 2024-12-20 17:55:33 +08:00 committed by GitHub
parent 9e6a801073
commit 87bfd8e2aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 8 deletions

View file

@ -206,8 +206,7 @@ rules = [
{ mime = "{audio,video}/*", fg = "magenta" },
# Archives
{ mime = "application/{,g}zip", fg = "red" },
{ mime = "application/{tar,bzip*,7z*,xz,rar}", fg = "red" },
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "red" },
# Documents
{ mime = "application/{pdf,doc,rtf}", fg = "cyan" },

View file

@ -206,8 +206,7 @@ rules = [
{ mime = "{audio,video}/*", fg = "magenta" },
# Archives
{ mime = "application/{,g}zip", fg = "red" },
{ mime = "application/{tar,bzip*,7z*,xz,rar}", fg = "red" },
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "red" },
# Documents
{ mime = "application/{pdf,doc,rtf}", fg = "cyan" },

View file

@ -67,8 +67,7 @@ rules = [
# Media
{ mime = "{audio,video}/*", use = [ "play", "reveal" ] },
# Archive
{ mime = "application/{,g}zip", use = [ "extract", "reveal" ] },
{ mime = "application/{tar,bzip*,7z*,xz,rar}", use = [ "extract", "reveal" ] },
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", use = [ "extract", "reveal" ] },
# JSON
{ mime = "application/{json,ndjson}", use = [ "edit", "reveal" ] },
{ mime = "*/javascript", use = [ "edit", "reveal" ] },
@ -132,8 +131,15 @@ previewers = [
# PDF
{ mime = "application/pdf", run = "pdf" },
# Archive
{ mime = "application/{,g}zip", run = "archive" },
{ mime = "application/{tar,bzip*,7z*,xz,rar,iso9660-image}", run = "archive" },
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", run = "archive" },
{ mime = "application/{debian-package,redhat-package-manager,rpm}", run = "archive" },
{ mime = "application/debian.binary-package", run = "archive" },
{ mime = "application/android.package-archive", run = "archive" },
{ name = "*.{AppImage,appimage}", run = "archive" },
# Virtual Disk / Disk Image
{ mime = "application/{iso9660-image,qemu-disk,ms-wim,apple-diskimage}", run = "archive" },
{ mime = "application/virtualbox-{vhd,vhdx}", run = "archive" },
{ name = "*.{img,fat,ext,ext2,ext3,ext4,squashfs,ntfs,hfs,hfsx}", run = "archive" },
# Font
{ mime = "font/*", run = "font" },
{ mime = "application/ms-opentype", run = "font" },