Modules/Yazi: Update to new selected files syntax

This commit is contained in:
2026-09-13 17:41:05 +02:00
parent f2b1bedcf0
commit bf5778476e
+18 -15
View File
@@ -65,9 +65,10 @@ in {
''; '';
# https://yazi-rs.github.io/docs/configuration/yazi # https://yazi-rs.github.io/docs/configuration/yazi
# "$n": The n-th selected file (1...n) # %sN: The N-th selected file (1...n)
# "$@": All selected files # %s: All selected files
# "$0": The hovered file # %h: The hovered file (shell keybindings)
# File placeholders are shell-escaped by Yazi; do not quote them.
settings = { settings = {
mgr = { mgr = {
show_hidden = false; show_hidden = false;
@@ -80,41 +81,43 @@ in {
opener = { opener = {
play = [ play = [
{ {
run = ''mpv "$@"''; run = ''mpv %s'';
orphan = true; orphan = true;
desc = "Play selection with mpv"; desc = "Play selection with mpv";
} }
{ {
run = ''vlc "$@"''; run = ''vlc %s'';
orphan = true; orphan = true;
desc = "Play selection with vlc"; desc = "Play selection with vlc";
} }
]; ];
edit = [ edit = [
{ {
run = ''$EDITOR "$@"''; run = ''$EDITOR %s'';
block = true; block = true;
desc = "Edit selection"; desc = "Edit selection";
} }
]; ];
open = [ open = [
{ {
run = ''xdg-open "$@"''; run = ''xdg-open %s1'';
desc = "Open selection with xdg-open"; orphan = true;
desc = "Open first selected file with xdg-open";
} }
{ {
run = ''imv "$@"''; run = ''imv %s'';
orphan = true;
desc = "Open selection with imv"; desc = "Open selection with imv";
} }
{ {
# TODO: For some reason, junction does not exit after choosing an application... run = ''junction %s'';
run = ''junction "$@"''; orphan = true;
desc = "Open selection with junction"; desc = "Open selection with junction";
} }
]; ];
extract = [ extract = [
{ {
run = ''ouch decompress -y "$@"''; run = ''ouch decompress -y %s'';
desc = "Extract selection"; desc = "Extract selection";
} }
]; ];
@@ -219,7 +222,7 @@ in {
"<C-p>" "<C-p>"
"d" "d"
]; ];
run = ''shell -- ripdrag -a -n "$@"''; run = ''shell --orphan -- ripdrag -a -n %s'';
desc = "Drag & drop selection"; desc = "Drag & drop selection";
} }
{ {
@@ -243,7 +246,7 @@ in {
"<C-p>" "<C-p>"
"w" "w"
]; ];
run = ''wl-copy < "$0"''; run = ''shell -- wl-copy < %h'';
desc = "Copy hovered file contents using wl-copy"; desc = "Copy hovered file contents using wl-copy";
} }
@@ -255,7 +258,7 @@ in {
{ {
on = "y"; on = "y";
run = [ run = [
''shell -- for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list'' ''shell -- for path in %s; do echo "file://$path"; done | wl-copy -t text/uri-list''
"yank" "yank"
]; ];
desc = "Copy files to system clipboard on yank"; desc = "Copy files to system clipboard on yank";