File: context_menu.rst

package info (click to toggle)
mpv 0.41.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,404 kB
  • sloc: ansic: 155,875; python: 1,235; sh: 643; javascript: 612; cpp: 468; objc: 302; pascal: 49; xml: 29; makefile: 18
file content (98 lines) | stat: -rw-r--r-- 2,102 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
CONTEXT MENU SCRIPT
===================

This script provides a context menu for platforms without integration with a
native context menu. On these platforms, it can be disabled entirely using the
``--load-context-menu=no`` option. On platforms where the integration is
implemented, it is already disabled by default.

Script messages
---------------

``open``
    Show the context menu.

``select``
    Select the focused item when there is one.

Configuration
-------------

This script can be customized through a config file
``script-opts/context_menu.conf`` placed in mpv's user directory and through
the ``--script-opts`` command-line option. The configuration syntax is
described in `mp.options functions`_.

Configurable Options
~~~~~~~~~~~~~~~~~~~~

``font_size``
    Default: 14

    The font size.

``gap``
    Default: 0.2

    The gap between menu items, specified as a percentage the font size.

``padding_x``
    Default: 8

    The horizontal padding of the menu.

``padding_y``
    Default: 4

    The vertical padding of the menu.

``menu_outline_size``
    Default: 0

    The size of the menu's border.

``menu_outline_color``
    Default: ``#FFFFFF``

    The color of the menu's border.

``corner_radius``
    Default: 5

    The radius of the menu's corners.

``scale_with_window``
    Default: auto

    Whether to scale sizes with the window height. Can be ``yes``, ``no``, or
    ``auto``, which follows the value of ``--osd-scale-by-window``.

    When sizes aren't scaled with the window, they are scaled by
    ``display-hidpi-scale``.

``focused_color``
    Default: ``#222222``

    The color of the focused item.

``focused_back_color``
    Default: ``#FFFFFF``

    The background color of the focused item.

``disabled_color``
    Default: ``#555555``

    The color of disabled items.

``seconds_to_open_submenus``
    Default: 0.2

    The number of seconds to open submenus after the cursor enters items
    associated with one.

``seconds_to_close_submenus``
    Default: 0.2

    The number of seconds to close submenus after the cursor enters a parent
    menu.