dotfiles

My dotfiles and configs
git clone https://git.dasho.dev/dotfiles.git
Log | Files | Refs | README

yazi.toml (7418B)


      1 # A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config.
      2 # If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas.
      3 "$schema" = "https://yazi-rs.github.io/schemas/yazi.json"
      4 
      5 [mgr]
      6 ratio          = [ 1, 4, 3 ]
      7 sort_by        = "alphabetical"
      8 sort_sensitive = false
      9 sort_reverse 	 = false
     10 sort_dir_first = true
     11 sort_translit  = false
     12 linemode       = "none"
     13 show_hidden    = true
     14 show_symlink   = true
     15 scrolloff      = 5
     16 mouse_events   = [ "click", "scroll" ]
     17 title_format   = "Yazi: {cwd}"
     18 
     19 [preview]
     20 wrap            = "no"
     21 tab_size        = 2
     22 max_width       = 600
     23 max_height      = 900
     24 cache_dir       = ""
     25 image_delay     = 30
     26 image_filter    = "triangle"
     27 image_quality   = 75
     28 ueberzug_scale  = 1
     29 ueberzug_offset = [ 0, 0, 0, 0 ]
     30 
     31 [opener]
     32 edit = [
     33 { run = "${EDITOR:-vi} %s", desc = "$EDITOR",      for = "unix", block = true },
     34 { run = "code %s",          desc = "code",         for = "windows", orphan = true },
     35 { run = "code -w %s",       desc = "code (block)", for = "windows", block = true },
     36 ]
     37 play = [
     38 { run = "xdg-open %s1",    desc = "Play", for = "linux", orphan = true },
     39 { run = "open %s",         desc = "Play", for = "macos" },
     40 { run = 'start "" %s1',    desc = "Play", for = "windows", orphan = true },
     41 { run = "termux-open %s1", desc = "Play", for = "android" },
     42 { run = "mediainfo %s1; echo 'Press enter to exit'; read _", block = true, desc = "Show media info", for = "unix" },
     43 { run = "mediainfo %s1 & pause", block = true, desc = "Show media info", for = "windows" },
     44 ]
     45 open = [
     46 { run = "xdg-open %s1",    desc = "Open", for = "linux" },
     47 { run = "open %s",         desc = "Open", for = "macos" },
     48 { run = 'start "" %s1',    desc = "Open", for = "windows", orphan = true },
     49 { run = "termux-open %s1", desc = "Open", for = "android" },
     50 ]
     51 reveal = [
     52 { run = "xdg-open %d1",         desc = "Reveal", for = "linux" },
     53 { run = "open -R %s1",          desc = "Reveal", for = "macos" },
     54 { run = "explorer /select,%s1", desc = "Reveal", for = "windows", orphan = true },
     55 { run = "termux-open %d1",      desc = "Reveal", for = "android" },
     56 { run = "clear; exiftool %s1; echo 'Press enter to exit'; read _", desc = "Show EXIF", for = "unix", block = true },
     57 ]
     58 extract = [
     59 { run = "ya pub extract --list %s", desc = "Extract here" },
     60 ]
     61 download = [
     62 { run = "ya emit download --open %S", desc = "Download and open" },
     63 { run = "ya emit download %S",        desc = "Download" },
     64 ]
     65 
     66 [open]
     67 rules = [
     68 # Folder
     69 { url = "*/", use = [ "edit", "open", "reveal" ] },
     70 # Text
     71 { mime = "text/*", use = [ "edit", "reveal" ] },
     72 # Image
     73 { mime = "image/*", use = [ "open", "reveal" ] },
     74 # Media
     75 { mime = "{audio,video}/*", use = [ "play", "reveal" ] },
     76 # Archive
     77 { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", use = [ "extract", "reveal" ] },
     78 # JSON
     79 { mime = "application/{json,ndjson}", use = [ "edit", "reveal" ] },
     80 { mime = "*/javascript", use = [ "edit", "reveal" ] },
     81 # Empty file
     82 { mime = "inode/empty", use = [ "edit", "reveal" ] },
     83 # Virtual file system
     84 { mime = "vfs/{absent,stale}", use = "download" },
     85 # Fallback
     86 { url = "*", use = [ "open", "reveal" ] },
     87 ]
     88 
     89 [tasks]
     90 micro_workers    = 10
     91 macro_workers    = 10
     92 bizarre_retry    = 3
     93 image_alloc      = 536870912  # 512MB
     94 image_bound      = [ 10000, 10000 ]
     95 suppress_preload = false
     96 
     97 [plugin]
     98 fetchers = [
     99 # Mimetype
    100 { id = "mime", url = "*/",         run = "mime.dir", prio = "high" },
    101 { id = "mime", url = "local://*",  run = "mime.local", prio = "high" },
    102 { id = "mime", url = "remote://*", run = "mime.remote", prio = "high" },
    103 ]
    104 spotters = [
    105 { url = "*/", run = "folder" },
    106 # Code
    107 { mime = "text/*", run = "code" },
    108 { mime = "application/{mbox,javascript,wine-extension-ini}", run = "code" },
    109 # Image
    110 { mime = "image/{avif,hei?,jxl}", run = "magick" },
    111 { mime = "image/svg+xml", run = "svg" },
    112 { mime = "image/*", run = "image" },
    113 # Video
    114 { mime = "video/*", run = "video" },
    115 # Virtual file system
    116 { mime = "vfs/*", run = "vfs" },
    117 # Error
    118 { mime = "null/*", run = "null" },
    119 # Fallback
    120 { url = "*", run = "file" },
    121 ]
    122 preloaders = [
    123 # Image
    124 { mime = "image/{avif,hei?,jxl}", run = "magick" },
    125 { mime = "image/svg+xml", run = "svg" },
    126 { mime = "image/*", run = "image" },
    127 # Video
    128 { mime = "video/*", run = "video" },
    129 # PDF
    130 { mime = "application/pdf", run = "pdf" },
    131 # Font
    132 { mime = "font/*", run = "font" },
    133 { mime = "application/ms-opentype", run = "font" },
    134 ]
    135 previewers = [
    136 { url = "*/", run = "folder" },
    137 # Code
    138 { mime = "text/*", run = "code" },
    139 { mime = "application/{mbox,javascript,wine-extension-ini}", run = "code" },
    140 # JSON
    141 { mime = "application/{json,ndjson}", run = "json" },
    142 # Image
    143 { mime = "image/{avif,hei?,jxl}", run = "magick" },
    144 { mime = "image/svg+xml", run = "svg" },
    145 { mime = "image/*", run = "image" },
    146 # Video
    147 { mime = "video/*", run = "video" },
    148 # PDF
    149 { mime = "application/pdf", run = "pdf" },
    150 # Archive
    151 { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", run = "archive" },
    152 { mime = "application/{debian*-package,redhat-package-manager,rpm,android.package-archive}", run = "archive" },
    153 { url = "*.{AppImage,appimage}", run = "archive" },
    154 # Virtual Disk / Disk Image
    155 { mime = "application/{iso9660-image,qemu-disk,ms-wim,apple-diskimage}", run = "archive" },
    156 { mime = "application/virtualbox-{vhd,vhdx}", run = "archive" },
    157 { url = "*.{img,fat,ext,ext2,ext3,ext4,squashfs,ntfs,hfs,hfsx}", run = "archive" },
    158 # Font
    159 { mime = "font/*", run = "font" },
    160 { mime = "application/ms-opentype", run = "font" },
    161 # Empty file
    162 { mime = "inode/empty", run = "empty" },
    163 # Virtual file system
    164 { mime = "vfs/*", run = "vfs" },
    165 # Error
    166 { mime = "null/*", run = "null" },
    167 # Fallback
    168 { url = "*", run = "file" },
    169 ]
    170 
    171 [input]
    172 cursor_blink = false
    173 
    174 # cd
    175 cd_title  = "Change directory:"
    176 cd_origin = "top-center"
    177 cd_offset = [ 0, 2, 50, 3 ]
    178 
    179 # create
    180 create_title  = [ "Create:", "Create (dir):" ]
    181 create_origin = "top-center"
    182 create_offset = [ 0, 2, 50, 3 ]
    183 
    184 # rename
    185 rename_title  = "Rename:"
    186 rename_origin = "hovered"
    187 rename_offset = [ 0, 1, 50, 3 ]
    188 
    189 # filter
    190 filter_title  = "Filter:"
    191 filter_origin = "top-center"
    192 filter_offset = [ 0, 2, 50, 3 ]
    193 
    194 # find
    195 find_title  = [ "Find next:", "Find previous:" ]
    196 find_origin = "top-center"
    197 find_offset = [ 0, 2, 50, 3 ]
    198 
    199 # search
    200 search_title  = "Search via {n}:"
    201 search_origin = "top-center"
    202 search_offset = [ 0, 2, 50, 3 ]
    203 
    204 # shell
    205 shell_title  = [ "Shell:", "Shell (block):" ]
    206 shell_origin = "top-center"
    207 shell_offset = [ 0, 2, 50, 3 ]
    208 
    209 [confirm]
    210 # trash
    211 trash_title 	= "Trash {n} selected file{s}?"
    212 trash_origin	= "center"
    213 trash_offset	= [ 0, 0, 70, 20 ]
    214 
    215 # delete
    216 delete_title 	= "Permanently delete {n} selected file{s}?"
    217 delete_origin	= "center"
    218 delete_offset	= [ 0, 0, 70, 20 ]
    219 
    220 # overwrite
    221 overwrite_title  = "Overwrite file?"
    222 overwrite_body   = "Will overwrite the following file:"
    223 overwrite_origin = "center"
    224 overwrite_offset = [ 0, 0, 50, 15 ]
    225 
    226 # quit
    227 quit_title  = "Quit?"
    228 quit_body   = "There are unfinished tasks, quit anyway?\n(Open task manager with default key 'w')"
    229 quit_origin = "center"
    230 quit_offset = [ 0, 0, 50, 15 ]
    231 
    232 [pick]
    233 open_title  = "Open with:"
    234 open_origin = "hovered"
    235 open_offset = [ 0, 1, 50, 7 ]
    236 
    237 [which]
    238 sort_by      	 = "none"
    239 sort_sensitive = false
    240 sort_reverse 	 = false
    241 sort_translit  = false