From 5487cbc071ffb9b8ad2660d5ea74cd0011addf0a Mon Sep 17 00:00:00 2001 From: sxyazi Date: Fri, 26 Jan 2024 11:10:07 +0800 Subject: [PATCH] docs: add wayland yank tip --- docs/tips.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/tips.md b/docs/tips.md index c79f6012..be2c7169 100644 --- a/docs/tips.md +++ b/docs/tips.md @@ -111,12 +111,17 @@ Please make sure that `` does not conflict with your other keys. Yazi allows multiple commands to be bound to a single key, so you can set `y` to not only do the `yank` but also execute a shell script: ```toml -{ - on = [ "y" ], - exec = [ "yank", ''' -shell --confirm 'echo "$@" | xclip -i -selection clipboard -t text/uri-list' -''' ] -} +{ on = [ "y" ], exec = [ "yank", ''' + shell --confirm 'echo "$@" | xclip -i -selection clipboard -t text/uri-list' +''' ] } +``` + +The above is available on X11, there is also a Wayland version (Thanks [@hurutparittya for sharing this](https://discord.com/channels/1136203602898194542/1136203604076802092/1188498323867455619) in Yazi's discord server): + +```toml +{ on = [ "y" ], exec = [ "yank", ''' + shell --confirm 'for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list' +''' ] } ``` ## No status bar