yazi update

This commit is contained in:
JMARyA 2024-03-14 09:56:03 +01:00
parent f02ef3f9ca
commit b70d88c06f
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
3 changed files with 42 additions and 42 deletions

View file

@ -52,7 +52,7 @@ function Header:host()
end end
function Header:render(area) function Header:render(area)
local chunks = self:layout(area) local chunks = self:render(area)
local left = ui.Line { self:host(), self:cwd() } local left = ui.Line { self:host(), self:cwd() }
local right = ui.Line { self:tabs() } local right = ui.Line { self:tabs() }

View file

@ -1,14 +1,14 @@
[[input.prepend_keymap]] [[input.prepend_keymap]]
on = [ "<Esc>" ] on = [ "<Esc>" ]
exec = "close" run = "close"
desc = "Cancel input" desc = "Cancel input"
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "l" ] on = [ "l" ]
exec = "plugin --sync smart-enter" run = "plugin --sync smart-enter"
desc = "Enter the child directory, or open the file" desc = "Enter the child directory, or open the file"
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "<Enter>" ] on = [ "<Enter>" ]
exec = "plugin --sync smart-enter" run = "plugin --sync smart-enter"
desc = "Enter the child directory, or open the file" desc = "Enter the child directory, or open the file"

View file

@ -14,23 +14,23 @@ show_symlink=true
[opener] [opener]
edit = [ edit = [
{ exec = '$EDITOR "$@"', block = true, desc="Edit", for = "unix" }, { run = '$EDITOR "$@"', block = true, desc="Edit", for = "unix" },
] ]
open = [ open = [
{ exec = 'xdg-open "$@"', desc = "Open", for = "linux" }, { run = 'xdg-open "$@"', desc = "Open", for = "linux" },
{ exec = 'open "$@"', desc = "Open", for = "macos" }, { run = 'open "$@"', desc = "Open", for = "macos" },
{ exec = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" } { run = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" }
] ]
extract = [ extract = [
{ exec = '7z x "$1"', desc = "Extract here", for = "unix" }, { run = '7z x "$1"', desc = "Extract here", for = "unix" },
] ]
play = [ play = [
{ exec = 'mpv "$@"', orphan = true, desc = "Play", for = "unix" }, { run = 'mpv "$@"', orphan = true, desc = "Play", for = "unix" },
{ exec = 'mpv "%1"', orphan = true, desc = "Play", for = "windows" }, { run = 'mpv "%1"', orphan = true, desc = "Play", for = "windows" },
] ]
info = [ info = [
{ exec = '''ffprobe -hide_banner "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show ffprobe info", for = "unix" }, { run = '''ffprobe -hide_banner "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show ffprobe info", for = "unix" },
{ exec = '''printf "'${1##*/}' Duration: ";ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show duration", for = "unix"} { run = '''printf "'${1##*/}' Duration: ";ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show duration", for = "unix"}
] ]
[open] [open]
@ -68,54 +68,54 @@ suppress_preload = false
[plugin] [plugin]
prepend_previewers = [ prepend_previewers = [
{ name = "*.md", exec = "glow" }, { name = "*.md", run = "glow" },
] ]
preloaders = [ preloaders = [
{ name = "*", cond = "!mime", exec = "mime", multi = true, prio = "high" }, { name = "*", cond = "!mime", run = "mime", multi = true, prio = "high" },
# Image # Image
{ mime = "image/vnd.djvu", exec = "noop" }, { mime = "image/vnd.djvu", run = "noop" },
{ mime = "image/*", exec = "image" }, { mime = "image/*", run = "image" },
# Video # Video
{ mime = "video/*", exec = "video" }, { mime = "video/*", run = "video" },
# PDF # PDF
{ mime = "application/pdf", exec = "pdf" }, { mime = "application/pdf", run = "pdf" },
] ]
previewers = [ previewers = [
{ name = "*/", exec = "folder", sync = true }, { name = "*/", run = "folder", sync = true },
# Code # Code
{ mime = "text/*", exec = "code" }, { mime = "text/*", run = "code" },
{ mime = "*/xml", exec = "code" }, { mime = "*/xml", run = "code" },
{ mime = "*/javascript", exec = "code" }, { mime = "*/javascript", run = "code" },
{ mime = "*/x-wine-extension-ini", exec = "code" }, { mime = "*/x-wine-extension-ini", run = "code" },
# JSON # JSON
{ mime = "application/json", exec = "json" }, { mime = "application/json", run = "json" },
# Image # Image
{ mime = "image/vnd.djvu", exec = "noop" }, { mime = "image/vnd.djvu", run = "noop" },
{ mime = "image/*", exec = "viu" }, { mime = "image/*", run = "viu" },
# Video # Video
{ mime = "video/*", exec = "video" }, { mime = "video/*", run = "video" },
# PDF # PDF
{ mime = "application/pdf", exec = "pdf2text" }, { mime = "application/pdf", run = "pdf2text" },
# Archive # Archive
{ mime = "application/zip", exec = "7z" }, { mime = "application/zip", run = "7z" },
{ mime = "application/gzip", exec = "7z" }, { mime = "application/gzip", run = "7z" },
{ mime = "application/x-tar", exec = "7z" }, { mime = "application/x-tar", run = "7z" },
{ mime = "application/x-bzip", exec = "7z" }, { mime = "application/x-bzip", run = "7z" },
{ mime = "application/x-bzip2", exec = "7z" }, { mime = "application/x-bzip2", run = "7z" },
{ mime = "application/x-7z-compressed", exec = "7z" }, { mime = "application/x-7z-compressed", run = "7z" },
{ mime = "application/x-rar", exec = "7z" }, { mime = "application/x-rar", run = "7z" },
{ mime = "application/xz", exec = "7z" }, { mime = "application/xz", run = "7z" },
{ mime = "application/x-bittorrent;", exec = "imdl" }, { mime = "application/x-bittorrent;", run = "imdl" },
{ name = "*.torrent", exec = "imdl" }, { name = "*.torrent", run = "imdl" },
# File Ext # File Ext
# Switch ROM # Switch ROM
{ name = "*.nsp", exec = "file" }, { name = "*.nsp", run = "file" },
# Fallback # Fallback
{ mime = "application/octet-stream", exec = "hexyl" }, { mime = "application/octet-stream", run = "hexyl" },
{ name = "*", exec = "file" }, { name = "*", run = "file" },
] ]
[select] [select]