Konfig Ghostty + Diverses

This commit is contained in:
2026-07-23 06:44:07 +02:00
parent b29f1d9a27
commit 76bb8dddde
11 changed files with 196 additions and 101 deletions
+22 -27
View File
@@ -1,9 +1,7 @@
# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config.
# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas.
"$schema" = "https://yazi-rs.github.io/schemas/yazi.json"
#:schema https://yazi-rs.github.io/schemas/yazi.json
[mgr]
ratio = [ 0, 8, 0 ]
ratio = [ 0, 6, 4 ]
sort_by = "alphabetical"
sort_sensitive = false
sort_reverse = false
@@ -19,7 +17,7 @@ title_format = "Yazi: {cwd}"
[preview]
wrap = "no"
tab_size = 2
max_width = 600
max_width = 800
max_height = 900
cache_dir = ""
image_delay = 30
@@ -31,40 +29,32 @@ ueberzug_offset = [ 0, 0, 0, 0 ]
[opener]
picture = [
{ run = 'sxiv -g 1650x946 "$@"', orphan = true, desc = "Open picture", for = "unix" },
{ run = 'imv "$@"', orphan = true, desc = "Open picture with imv", for = "unix" },
{ run = 'gimp "$@"', orphan = true, desc = "Open picture with gimp", for = "unix" },
{ run = 'satty --filename "$@"', orphan = true, desc = "Open picture with satty", for = "unix" },
]
edit = [
{ run = '${EDITOR:-vi} "$@"', desc = "$EDITOR", block = true, for = "unix" },
{ run = 'code %*', orphan = true, desc = "code", for = "windows" },
{ run = 'code -w %*', block = true, desc = "code (block)", for = "windows" },
{ run = 'vim "$@"', desc = "$EDITOR", block = true, for = "unix" },
]
open = [
{ run = 'xdg-open "$1"', desc = "Open", for = "linux" },
{ run = 'open "$@"', desc = "Open", for = "macos" },
{ run = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" },
{ run = 'termux-open "$1"', desc = "Open", for = "android" },
]
reveal = [
{ run = 'xdg-open "$(dirname "$1")"', desc = "Reveal", for = "linux" },
{ run = 'open -R "$1"', desc = "Reveal", for = "macos" },
{ run = 'explorer /select,"%1"', orphan = true, desc = "Reveal", for = "windows" },
{ run = 'termux-open "$(dirname "$1")"', desc = "Reveal", for = "android" },
{ run = '''exiftool "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show EXIF", for = "unix" },
]
extract = [
{ run = 'ya pub extract --list "$@"', desc = "Extract here", for = "unix" },
{ run = 'ya pub extract --list %*', desc = "Extract here", for = "windows" },
]
play = [
{ run = 'mpv --force-window "$@"', orphan = true, for = "unix" },
{ run = 'mpv --force-window %*', orphan = true, for = "windows" },
{ run = 'celluloid "$@"', orphan = true, for = "unix" },
{ run = '''mediainfo "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show media info", for = "unix" },
]
[open]
rules = [
# Folder
{ name = "*/", use = [ "edit", "open", "reveal" ] },
{ url = "*/", use = [ "edit", "open", "reveal" ] },
# Text
{ mime = "text/*", use = [ "edit", "reveal" ] },
# Image
@@ -80,7 +70,7 @@ rules = [
# Empty file
{ mime = "inode/empty", use = [ "edit", "reveal" ] },
# Fallback
{ name = "*", use = [ "open", "reveal" ] },
{ url = "*", use = [ "open", "reveal" ] },
]
[tasks]
@@ -95,10 +85,15 @@ suppress_preload = false
fetchers = [
# Mimetype
{ id = "mime", name = "*", run = "mime", prio = "high" },
# { id = "mime", url = "*", run = "mime.local", prio = "high" },
# { id = "mime", url = "*/", run = "mime.dir", prio = "high" },
# MIME-type
{ url = "*/", run = "mime.dir", prio = "high", group = "mime" },
{ url = "local://*", run = "mime.local", prio = "high", group = "mime" },
{ url = "remote://*", run = "mime.remote", prio = "high", group = "mime" },
]
spotters = [
{ name = "*/", run = "folder" },
{ url = "*/", run = "folder" },
# Code
{ mime = "text/*", run = "code" },
{ mime = "application/{mbox,javascript,wine-extension-ini}", run = "code" },
@@ -108,7 +103,7 @@ spotters = [
# Video
{ mime = "video/*", run = "video" },
# Fallback
{ name = "*", run = "file" },
{ url = "*", run = "file" },
]
preloaders = [
# Image
@@ -123,7 +118,7 @@ preloaders = [
{ mime = "application/ms-opentype", run = "font" },
]
previewers = [
{ name = "*/", run = "folder", sync = true },
{ url = "*/", run = "folder", sync = true },
# Code
{ mime = "text/*", run = "code" },
{ mime = "application/{mbox,javascript,wine-extension-ini}", run = "code" },
@@ -139,18 +134,18 @@ previewers = [
# 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,android.package-archive}", run = "archive" },
{ name = "*.{AppImage,appimage}", run = "archive" },
{ url = "*.{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" },
{ url = "*.{img,fat,ext,ext2,ext3,ext4,squashfs,ntfs,hfs,hfsx}", run = "archive" },
# Font
{ mime = "font/*", run = "font" },
{ mime = "application/ms-opentype", run = "font" },
# Empty file
{ mime = "inode/empty", run = "empty" },
# Fallback
{ name = "*", run = "file" },
{ url = "*", run = "file" },
]
[input]