diff options
author | Kevin Mitchell <kevmitch@gmail.com> | 2014-10-03 02:18:48 -0700 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-04 01:29:12 +0200 |
commit | d4d37245a6e694d7723dc74f4fb01f312bf5be91 (patch) | |
tree | b071083b7ca31a4eb778e7cbf7649308e9cabe40 /DOCS/man/lua.rst | |
parent | cc9973f4e0268bc17cf95ec39af194d0136e0c0d (diff) | |
download | mpv-d4d37245a6e694d7723dc74f4fb01f312bf5be91.tar.bz2 mpv-d4d37245a6e694d7723dc74f4fb01f312bf5be91.tar.xz |
manpage: improve consistency with new ~/.config/mpv default
Signed-off-by: wm4 <wm4@nowhere>
Diffstat (limited to 'DOCS/man/lua.rst')
-rw-r--r-- | DOCS/man/lua.rst | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst index 3b11085503..1c4605eacd 100644 --- a/DOCS/man/lua.rst +++ b/DOCS/man/lua.rst @@ -1,11 +1,12 @@ LUA SCRIPTING ============= -mpv can load Lua scripts. Scripts in ``~/.mpv/lua/`` will be loaded on program -start, or if passed to ``--lua``. mpv appends ``~/.mpv/lua`` to the end of -lua's path so you can import them too. Since it's added to the end, don't name -scripts you want to import the same as lua libraries because they will be -overshadowed by them. +mpv can load Lua scripts. Scripts passed to the ``--lua`` option, or found in +the ``lua`` subdirectory of the mpv configuration directory (usually +``~/.config/mpv/lua/``) will be loaded on program start. mpv also appends the +``lua`` subdirectory to the end of Lua's path so you can import scripts from +there too. Since it's added to the end, don't name scripts you want to import +the same as Lua libraries because they will be overshadowed by them. mpv provides the built-in module ``mp``, which provides functions to send commands to the mpv core and to retrieve information about playback state, user @@ -32,12 +33,13 @@ allow users implement features which are not going to be added to the mpv core. Mode of operation ----------------- -Your script will be loaded by the player at program start from ``~/.mpv/lua/``, -or ``--lua``, or in some cases, internally (like ``--osc``). Each script runs -in its own thread. Your script is first run "as is", and once that is done, -the event loop is entered. This event loop will dispatch events received by mpv -and call your own event handlers which you have registered with -``mp.register_event``, or timers added with ``mp.add_timeout`` or similar. +Your script will be loaded by the player at program start from the ``lua`` +configuration subdirectory, from a path specified with the ``--lua`` option, or +in some cases, internally (like ``--osc``). Each script runs in its own +thread. Your script is first run "as is", and once that is done, the event loop +is entered. This event loop will dispatch events received by mpv and call your +own event handlers which you have registered with ``mp.register_event``, or +timers added with ``mp.add_timeout`` or similar. When the player quits, all scripts will be asked to terminate. This happens via a ``shutdown`` event, which by default will make the event loop return. If your |