aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/yazi/yazi.toml
blob: 6c53cfe3ea72b13e0a730a4c4203cc704bcff43e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[mgr]
show_hidden = true
scrolloff = 10
linemode = "mtime"
title_format = "Yazi: {cwd}"

# Override the default `open` opener so xdg-open is detached from yazi
# (otherwise yazi treats the viewer as an unfinished task and prompts on quit).
[opener]
open = [{ run = 'xdg-open "$@"', desc = "Open", orphan = true }]
view-md = [
  { run = 'glow -p -- "$@"', desc = "Render markdown (glow)", block = true },
]

# Render markdown with glow inside yazi instead of letting xdg-open hand it
# to a text editor.
[open]
prepend_rules = [
  { url = "*.md", use = "view-md" },
  { url = "*.markdown", use = "view-md" },
  { mime = "text/markdown", use = "view-md" },
]