Skip to content

Commit

Permalink
docs: add wayland yank tip
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi committed Jan 26, 2024
1 parent 9104398 commit 5487cbc
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions docs/tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,17 @@ Please make sure that `<C-n>` 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
Expand Down

0 comments on commit 5487cbc

Please sign in to comment.