Skip to content
Shuanglei Tao edited this page Apr 6, 2024 · 12 revisions

Tip

  • Want a usable full config example? Check this gist.
  • You may define custom keywords and update menu with message.

input.conf

The menu syntax is similar to mpv.net, with some enhancements:

  • define menu title after #menu:
    • define separator with -
    • split title with > to define submenus
    • use #@keyword to display selection menu for:
      • #@tracks: track list (video/audio/subtitle)
        • #@tracks/video: video track list
        • #@tracks/audio: audio track list
        • #@tracks/sub: subtitle list
        • #@tracks/sub-secondary: subtitle list (secondary)
      • #@chapters: chapter list
      • #@editions: edition list
      • #@audio-devices: audio device list
      • #@playlist: playlist
      • #@profiles: profile list
    • use #@state=<expr> to update menu state:
      • <expr> is like the profile-cond option in Conditional auto profiles
      • the result of <expr> should be comma seprated state string
      • supported states: checked / disabled / hidden
  • use _ if no keybinding
  • use ignore if no command
Ctrl+a  show-text foobar    #menu: Foo > Bar
_       ignore              #menu: -
_       ignore              #menu: Tracks #@tracks
_       ignore              #menu: Chapters #@chapters
_       ignore              #menu: Editions #@editions
_       ignore              #menu: -
_       cycle mute          #menu: Audio > Mute #@state=(mute and 'checked')
_       ignore              #menu: Audio > Devices #@audio-devices

NOTE: You don't need to add a keybinding in input.conf to trigger menu since 2.4.0 version, see also FAQ.

~~/script-opts/dyn_menu.conf

  • use_mpv_impl=no: do not use mpv's menu implementation.
  • uosc_syntax=yes: enable uosc menu syntax support.
  • escape_title=no: disable escaping of & to && in title (this will enable Keyboard Accelerators).
  • max_title_length=80: Limits the title length in dynamic submenu, set to 0 to disable.
  • max_playlist_items=20: Limit the playlist items in submenu, set to 0 to disable.
Clone this wiki locally