summaryrefslogtreecommitdiff
path: root/mac/.config/yazi
diff options
context:
space:
mode:
Diffstat (limited to 'mac/.config/yazi')
-rw-r--r--mac/.config/yazi/keymap-default.toml4
-rw-r--r--mac/.config/yazi/plugins/confirm-quit.yazi/main.lua20
-rw-r--r--mac/.config/yazi/yazi.toml70
3 files changed, 69 insertions, 25 deletions
diff --git a/mac/.config/yazi/keymap-default.toml b/mac/.config/yazi/keymap-default.toml
index d0ca6f2..658b85d 100644
--- a/mac/.config/yazi/keymap-default.toml
+++ b/mac/.config/yazi/keymap-default.toml
@@ -235,10 +235,6 @@ on = "J"
run = "plugin parent-arrow 1"
[[mgr.prepend_keymap]]
-on = "q"
-run = "plugin confirm-quit"
-
-[[mgr.prepend_keymap]]
on = "<C-p>"
run = 'shell -- qlmanage -p "$@"'
diff --git a/mac/.config/yazi/plugins/confirm-quit.yazi/main.lua b/mac/.config/yazi/plugins/confirm-quit.yazi/main.lua
deleted file mode 100644
index f171bc0..0000000
--- a/mac/.config/yazi/plugins/confirm-quit.yazi/main.lua
+++ /dev/null
@@ -1,20 +0,0 @@
-local count = ya.sync(function()
- return #cx.tabs
-end)
-
-local function entry()
- if count() < 2 then
- return ya.emit("quit", {})
- end
-
- local yes = ya.confirm({
- pos = { "center", w = 60, h = 10 },
- title = "Quit?",
- content = ui.Text("There are multiple tabs open. Are you sure you want to quit?"):wrap(ui.Wrap.YES),
- })
- if yes then
- ya.emit("quit", {})
- end
-end
-
-return { entry = entry }
diff --git a/mac/.config/yazi/yazi.toml b/mac/.config/yazi/yazi.toml
index d1067fd..f752723 100644
--- a/mac/.config/yazi/yazi.toml
+++ b/mac/.config/yazi/yazi.toml
@@ -278,7 +278,75 @@ run = 'piper -- bat -p --color=always "$1"'
[[plugin.prepend_previewers]]
name = "*.md"
-run = 'piper -- CLICOLOR_FORCE=1 glow -w=$w -s=dark "$1"'
+run = 'piper -- env CLICOLOR_FORCE=1 glow -w=$w -s=dark "$1"'
+
+[[plugin.prepend_previewers]]
+mime = "text/html"
+run = 'piper -- lynx -width="$w" -display_charset=utf-8 -dump "$1"'
+
+[[plugin.prepend_previewers]]
+name = "*.{xls,xlsx}"
+run = 'piper -- in2csv "$1" | head -n 200'
+
+[[plugin.prepend_previewers]]
+mime = "text/troff"
+run = 'piper -- man ./ "$1" | col -b'
+
+[[plugin.prepend_previewers]]
+mime = "text/*"
+run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"'
+
+[[plugin.prepend_previewers]]
+mime = "*/xml"
+run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"'
+
+[[plugin.prepend_previewers]]
+mime = "application/json"
+run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"'
+
+[[plugin.prepend_previewers]]
+mime = "application/x-ndjson"
+run = 'piper -- bat -p --theme ansi --terminal-width "$w" -f "$1"'
+
+[[plugin.prepend_previewers]]
+mime = "audio/*"
+run = 'piper -- mediainfo "$1"'
+
+[[plugin.prepend_previewers]]
+mime = "video/*"
+run = 'piper -- mediainfo "$1"'
+
+[[plugin.prepend_previewers]]
+mime = "application/octet-stream"
+run = 'piper -- mediainfo "$1"'
+
+[[plugin.prepend_previewers]]
+mime = "application/vnd.rn-realmedia"
+run = 'piper -- mediainfo "$1"'
+
+[[plugin.prepend_previewers]]
+mime = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
+run = 'piper -- pandoc "$1" -t plain'
+
+[[plugin.prepend_previewers]]
+name = "*.{odt,ods,odp,odg,ott,ots,otp}"
+run = 'piper -- odt2txt "$1"'
+
+[[plugin.prepend_previewers]]
+mime = "application/pgp-encrypted"
+run = 'piper -- gpg -d -- "$1"'
+
+[[plugin.prepend_previewers]]
+mime = "application/epub+zip"
+run = 'piper -- pandoc "$1" -t plain'
+
+[[plugin.prepend_previewers]]
+mime = "application/x-mobipocket-ebook"
+run = 'piper -- pandoc "$1" -t plain'
+
+[[plugin.prepend_previewers]]
+mime = "application/*zip"
+run = 'piper -- atool --list -- "$1"'
[[plugin.prepend_previewers]]
name = "*/"