Choosing between multiple programs to open a file #3812
-
What system are you running Yazi on?Linux Wayland What terminal are you running Yazi in?kitty 0.44.0
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Yazi has a different key command to open with the ability to choose. You can see from the default keymap that [mgr]
keymap = [
# ...
# Operation
{ on = "o", run = "open", desc = "Open selected files" },
{ on = "O", run = "open --interactive", desc = "Open selected files interactively" },
# ...
]Here's a little section of my [opener]
# ...
chrome = [
{ run = 'cmd.exe /C start chrome "$(wslpath -w %s1)"', orphan = true, desc = "Open in Chrome", for = "linux" },
{ run = 'chrome "%s1"', orphan = true, desc = "Open in Chrome", for = "windows" },
]
reveal = [
{ run = 'explorer.exe /select,$(wslpath -w "%s1")', orphan = true, desc = "Reveal", for = "linux" },
{ run = "explorer /select,%s1", orphan = true, desc = "Reveal", for = "windows" },
]
# ...
[open]
prepend_rules = [
{ mime = "application/pdf", use = [ "chrome", "reveal" ] }, # PDF
]The order of openers in the
|
Beta Was this translation helpful? Give feedback.

Yazi has a different key command to open with the ability to choose. You can see from the default keymap that
Olets you choose what program opens it. The options presented in the interactive opener are determined by youryazi.tomlfile.Here's a little section of my
yazi.tomlfile that uses chrome to open PDFs. My linux is WSL, so not sure what you'll have to tweak for Wayland.