Skip to content

Commit

Permalink
dynamic menu support
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Dec 17, 2023
1 parent 46a0928 commit 0203c63
Show file tree
Hide file tree
Showing 6 changed files with 540 additions and 77 deletions.
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,39 @@ Place `menu.dll` in your mpv `scripts` folder.
### input.conf

The menu syntax is similar to [mpv.net](https://github.com/mpvnet-player/mpv.net):
The menu syntax is similar to [mpv.net](https://github.com/mpvnet-player/mpv.net), with some enhancements:

- define menu title after `#menu:`
- define separator with `-`
- split title with `>` to define submenus
- everything after a `#` is considered a comment
- use `#@keyword` to display selection menu for:
- `#@tracks/video`: video tracks
- `#@tracks/audio`: audio tracks
- `#@tracks/sub`: subtitles
- `#@tracks/sub-secondary`: secondary subtitle
- `#@chapters`: chapters
- `#@editions`: editions
- `#@audio-devices`: audio devices
- use `_` if no keybinding
- use `ignore` if no command

```
Ctrl+a show-text foobar #menu: Foo > Bar
_ ignore #menu: -
_ ignore #menu: Tracks > Video #@tracks/video
_ ignore #menu: Tracks > Audio #@tracks/audio
_ ignore #menu: -
_ ignore #menu: Subtitle #@tracks/sub
_ ignore #menu: Second Subtitle #@tracks/sub-secondary
_ ignore #menu: -
_ ignore #menu: Chapters #@chapters
_ ignore #menu: Editions #@editions
_ ignore #menu: -
_ ignore #menu: Audio Devices #@audio-devices
```

Add a keybinding that trigger the menu:
Add a keybinding to trigger the menu (required):

```
MBTN_RIGHT script-message-to menu show
Expand Down
Loading

0 comments on commit 0203c63

Please sign in to comment.