From d4d37245a6e694d7723dc74f4fb01f312bf5be91 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Fri, 3 Oct 2014 02:18:48 -0700 Subject: manpage: improve consistency with new ~/.config/mpv default Signed-off-by: wm4 --- DOCS/man/lua.rst | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'DOCS/man/lua.rst') 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 -- cgit v1.2.3