Skip to content

Commit

Permalink
docs: add subtitle to the running MPV
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi committed Nov 20, 2024
1 parent 3685340 commit e82975c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,27 @@ run = '''

Credits to [@aidanzhai for sharing it](https://t.me/yazi_rs/3325/15373) in Yazi's telegram group.

## Add subtitle to the running MPV {#mpv-subtitle}

```toml
# ~/.config/yazi/yazi.toml
[[opener.add-sub]]
run = ''' echo sub-add "'$0'" | socat - /tmp/mpv.sock '''
desc = "Add sub to MPV"

[[open.prepend_rules]]
name = "*.{ass,srt,ssa,sty,sup,vtt}"
use = [ "add-sub", "edit" ]
```

Make sure you've enabled and configured the ipc socket to `/tmp/mpv.sock`, that is, include:

```
input-ipc-server=/tmp/mpv.sock
```

in your `~/.config/mpv/mpv.conf`.

## Maximize preview pane {#max-preview}

Moved to https://github.com/yazi-rs/plugins/tree/main/max-preview.yazi
Expand Down

0 comments on commit e82975c

Please sign in to comment.