diff --git a/docs/dds.md b/docs/dds.md index 85f7e2a7..e06fe41a 100644 --- a/docs/dds.md +++ b/docs/dds.md @@ -6,7 +6,7 @@ description: Data Distribution Service # DDS :::warning -This is a new feature that will be released in Yazi 0.2.5 and currently requires the latest main branch. +This is a new feature that will be released in Yazi 0.2.5 and currently requires the latest code. Document is still being written... ::: @@ -60,7 +60,7 @@ This provides the ability to report Yazi's internal events in real-time, which i ## Builtin kinds {#builtin} -### `cd` +### `cd` - change directory {#cd} `sub()` callback body: @@ -91,7 +91,7 @@ cd,1711957542289249,1711957542289249,{"tab":0,"url":"/root/Downloads"} cd,0,100,{"tab":0,"url":"/root/Downloads"} ``` -### `hover` +### `hover` - hover on a file {#hover} `sub()` callback body: @@ -122,7 +122,7 @@ hover,1711957283332834,1711957283332834,{"tab":0,"url":"/root/foo.txt"} hover,0,200,{"tab":0,"url":"/root/foo.txt"} ``` -### `rename` +### `rename` - rename a file {#rename} `sub()` callback body: @@ -156,11 +156,11 @@ rename,1711957878076791,1711957878076791,{"tab":0,"from":"/root/foo.txt","to":"/ rename,0,1711957878076791,{"tab":0,"from":"/root/foo.txt","to":"/root/bar.txt"} ``` -### `bulk` +### `bulk` - bulk rename files {#bulk} TODO -### `yank` +### `yank` - yank files {#yank} `sub()` callback body: @@ -196,10 +196,118 @@ yank,1711960311454247,1711960311454247,{"cut":false,"urls":["/root/foo.txt","/ro yank,0,300,{"cut":false,"urls":["/root/foo.txt","/root/bar.txt"]} ``` -### `hi` +### `move` - move files {#move} + +`sub()` callback body: + +```lua +{ + items = { + { from = Url("/root/foo.txt"), to = Url("/root/bar.txt") }, + -- ... + } +} +``` + +`sub_remote()` callback body: + +```lua +{ + items = { + { from = Url("/root/foo.txt"), to = Url("/root/bar.txt") }, + -- ... + } +} +``` + +`--local-events` stdout payload: + +```sh +move,1711957542289249,1711957542289249,{"items":[{"from":"/root/foo.txt","to":"/root/bar.txt"}]} +``` + +`--remote-events` stdout payload: + +```sh +move,0,1711957542289249,{"items":[{"from":"/root/foo.txt","to":"/root/bar.txt"}]} +``` + +### `trash` - trash files {#trash} + +`sub()` callback body: + +```lua +{ + urls = { + Url("/root/foo.txt"), + -- ... + } +} +``` + +`sub_remote()` callback body: + +```lua +{ + urls = { + Url("/root/foo.txt"), + -- ... + } +} +``` + +`--local-events` stdout payload: + +```sh +trash,1711957542289249,1711957542289249,{"urls":["/root/foo.txt"]} +``` + +`--remote-events` stdout payload: + +```sh +trash,0,1711957542289249,{"urls":["/root/foo.txt"]} +``` + +### `delete` - delete files {#delete} + +`sub()` callback body: + +```lua +{ + urls = { + Url("/root/foo.txt"), + -- ... + } +} +``` + +`sub_remote()` callback body: + +```lua +{ + urls = { + Url("/root/foo.txt"), + -- ... + } +} +``` + +`--local-events` stdout payload: + +```sh +delete,1711957542289249,1711957542289249,{"urls":["/root/foo.txt"]} +``` + +`--remote-events` stdout payload: + +```sh +delete,0,1711957542289249,{"urls":["/root/foo.txt"]} +``` + +### `hi` - client handshake {#hi} System reserves kind. -### `hey` +### `hey` - server handshake {#hey} System reserves kind. diff --git a/docs/image-preview.md b/docs/image-preview.md index ad16146f..740dbb50 100644 --- a/docs/image-preview.md +++ b/docs/image-preview.md @@ -31,7 +31,7 @@ That's relying on the `$TERM`, `$TERM_PROGRAM`, and `$XDG_SESSION_TYPE` variable For instance, if your terminal is Alacritty, which doesn't support displaying images itself, but you are running on an X11/Wayland environment, it will automatically use the "Window system protocol" to display images - this requires you to have [Überzug++](https://github.com/jstkdng/ueberzugpp) installed. -## tmux users +## tmux users {#tmux} To enable Yazi's image preview to work correctly in tmux, add the following 3 options to your `tmux.conf`: @@ -50,18 +50,18 @@ tmux kill-server && tmux || tmux Now you should be able to enjoy with the image preview. -## Zellij users +## Zellij users {#zellij} Zellij currently only supports the Sixel graphics format, so you will need a terminal that also supports Sixel. -## Windows users +## Windows users {#windows} Currently, only the following two terminals support displaying images on Windows: - WezTerm - Mintty (Git Bash, which comes with Git for Windows) -## Windows with WSL users +## Windows with WSL users {#wsl} Limited by ConPTY, the Windows edition has had to implement many workarounds, which are not perfect. @@ -83,7 +83,7 @@ wezterm ssh 127.0.0.1 That's it! you can now get Yazi's image preview working properly. -## Why can't I preview images via Überzug++? +## Why can't I preview images via Überzug++? {#debug-ueberzug} This may be an issue with Überzug++, please try running `ueberzugpp layer` directly in the terminal without Yazi, and paste: @@ -95,7 +95,7 @@ into it, then press `Enter`, and to see if any image is shown, without exiting t If the image shows properly when using Überzug++ independently, but not when used with Yazi, please create a bug report. -## Why won't my images adapt to terminal size? +## Why won't my images adapt to terminal size? {#size} The size of the image depends on two factors: diff --git a/docs/resources.md b/docs/resources.md index f4991efe..34baa07e 100644 --- a/docs/resources.md +++ b/docs/resources.md @@ -6,7 +6,7 @@ description: Some awesome plugins for Yazi. # Resources :::warning -The plugin system is still in the early stage, and most of the plugins below only guarantee compatibility with the latest main branch of Yazi! +The plugin system is still in the early stage, and most of the plugins below only guarantee compatibility with the latest code of Yazi! Please make sure that both your Yazi and plugins are on the `HEAD` to ensure proper functionality! :::