From ad2d10af1993591e8b175b10cb83f91fa13e8fe8 Mon Sep 17 00:00:00 2001 From: "Avi Halachmi (:avih)" Date: Tue, 9 Feb 2016 14:07:00 +0200 Subject: osc: add always-on mode and unify visibility mode (always/never/auto) Adds always-on mode by internally utilizing hidetimeout as negative and forbidding the user to set negative values. This removes script-message to enable/disable the osc, and instead introduces a combined 'visibility' control with the values never/auto/always. It's available via script_opts and script_message as 'osc-visibility'. As message, it also supports a 'cycle' value. The del key is bound to cycling the visibility modes. --- DOCS/man/osc.rst | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'DOCS/man') diff --git a/DOCS/man/osc.rst b/DOCS/man/osc.rst index f4f8d66496..587b8104d2 100644 --- a/DOCS/man/osc.rst +++ b/DOCS/man/osc.rst @@ -130,7 +130,7 @@ these keys. In case of collision, the function needs to be bound to a different key. See the `Script Commands`_ section. ============= ================================================ -del Hide the OSC permanently until mpv is restarted. +del Cycles visibility between never / auto (mouse-move) / always ============= ================================================ Configuration @@ -206,8 +206,8 @@ Configurable Options ``hidetimeout`` | Default: 500 - | Duration in ms until the OSC hides if no mouse movement, negative value - disables auto-hide + | Duration in ms until the OSC hides if no mouse movement, must not be + negative ``fadeduration`` | Default: 200 @@ -243,28 +243,29 @@ Configurable Options | Default: no | Display timecodes with milliseconds +``visibility`` + | Default: auto (auto hide/show on mouse move) + | Also supports ``never`` and ``always`` + Script Commands ~~~~~~~~~~~~~~~ The OSC script listens to certain script commands. These commands can bound in ``input.conf``, or sent by other scripts. -``enable-osc`` - Undoes ``disable-osc`` or the effect of the ``del`` key. - -``disable-osc`` - Hide the OSC permanently. This is also what the ``del`` key does. - ``osc-message`` Show a message on screen using the OSC. First argument is the message, second the duration in seconds. +``osc-visibility`` + Controls visibility mode ``never`` / ``auto`` (on mouse move) / ``always`` + and also ``cycle`` to cycle between the modes Example You could put this into ``input.conf`` to hide the OSC with the ``a`` key and -to unhide it with ``b``:: +to set auto mode (the default) with ``b``:: - a script_message disable-osc - b script_message enable-osc + a script_message osc-visibility never + b script_message osc-visibility auto -- cgit v1.2.3