From 29609cab38ea7b77c859c166f0ec71c42fa1ddd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Thu, 5 Oct 2023 13:07:04 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(yazi):=20config=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/yazi/yazi.toml | 69 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .config/yazi/yazi.toml diff --git a/.config/yazi/yazi.toml b/.config/yazi/yazi.toml new file mode 100644 index 00000000..4bffea2c --- /dev/null +++ b/.config/yazi/yazi.toml @@ -0,0 +1,69 @@ +[manager] +layout = [1, 4, 3] +sort_by = "modified" +sort_reverse = true +sort_dir_first = true +show_hidden = false +show_symlink = true + +[preview] +tab_size = 2 +max_width = 600 +max_height = 900 +cache_dir = "" + +[opener] +folder = [ + { exec = 'open -R "$@"', display_name = "Reveal in Finder" }, + { exec = '$EDITOR "$@"' }, +] +archive = [{ exec = 'unar "$1"', display_name = "Extract here" }] +text = [{ exec = '$EDITOR "$@"', block = true }] +image = [ + { exec = 'open "$@"', display_name = "Open" }, + { exec = '''exiftool "$1"; echo "Press enter to exit"; read''', block = true, display_name = "Show EXIF" }, +] +video = [ + { exec = 'mpv "$@"' }, + { exec = '''mediainfo "$1"; echo "Press enter to exit"; read''', block = true, display_name = "Show media info" }, +] +audio = [ + { exec = 'mpv "$@"' }, + { exec = '''mediainfo "$1"; echo "Press enter to exit"; read''', block = true, display_name = "Show media info" }, +] +fallback = [ + { exec = 'open "$@"', display_name = "Open" }, + { exec = 'open -R "$@"', display_name = "Reveal in Finder" }, +] + +[open] +rules = [ + { name = "*/", use = "folder" }, + + { mime = "text/*", use = "text" }, + { mime = "image/*", use = "image" }, + { mime = "video/*", use = "video" }, + { mime = "audio/*", use = "audio" }, + { mime = "inode/x-empty", use = "text" }, + + { mime = "application/json", use = "text" }, + { mime = "*/javascript", use = "text" }, + + { mime = "application/zip", use = "archive" }, + { mime = "application/gzip", use = "archive" }, + { mime = "application/x-bzip", use = "archive" }, + { mime = "application/x-bzip2", use = "archive" }, + { mime = "application/x-tar", use = "archive" }, + { mime = "application/x-7z-compressed", use = "archive" }, + { mime = "application/x-rar", use = "archive" }, + + { mime = "*", use = "fallback" }, +] + +[tasks] +micro_workers = 5 +macro_workers = 10 +bizarre_retry = 5 + +[log] +enabled = false