Actually, this key binding is easier to memorize
(looked at the forge logs : nobody pulled it so it's okay to break the standard a little :)
This commit is contained in:
parent
ad3c048b51
commit
c84f971ed1
2 changed files with 8 additions and 4 deletions
10
README.md
10
README.md
|
@ -5,11 +5,15 @@ This is a small script for the media player [mpv](https://github.com/mpv-player/
|
||||||
```
|
```
|
||||||
git clone https://code.bugness.org/chl/mpv_delayed_quit ~/.config/mpv/scripts/delayed_quit
|
git clone https://code.bugness.org/chl/mpv_delayed_quit ~/.config/mpv/scripts/delayed_quit
|
||||||
```
|
```
|
||||||
|
|
||||||
Or download the Lua file and put it in the directory `~/.config/mpv/scripts/delayed_quit/`.
|
Or download the Lua file and put it in the directory `~/.config/mpv/scripts/delayed_quit/`.
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
* `alt+q` : make mpv quit at the end of the current file (or the counter-th file) in the playlist, press again to forgo,
|
* `alt+q` : make mpv quit at the end of the current file (or the counter-th file) in the playlist. Press again to forgo.
|
||||||
* `alt+shift+q` : increment the counter, so mpv will quit one file later,
|
|
||||||
* `alt+a` : decrement the counter, so mpv will quit one file sooner.
|
You can also make it quit at the end of the next n-th file, using those key bindings:
|
||||||
|
|
||||||
|
* `alt+a` : decrement the counter, so mpv will quit one file sooner,
|
||||||
|
* `alt+shift+a` : increment the counter, so mpv will quit one file later.
|
||||||
|
|
2
main.lua
2
main.lua
|
@ -65,5 +65,5 @@ mp.add_hook("on_after_end_file", 50, hook_should_we_quit)
|
||||||
-- We add a name so a user can remap it in its input.conf like this :
|
-- We add a name so a user can remap it in its input.conf like this :
|
||||||
-- y script-binding delayed_quit_switch
|
-- y script-binding delayed_quit_switch
|
||||||
mp.add_key_binding("alt+q", "delayed_quit_switch", delayed_quit_switch)
|
mp.add_key_binding("alt+q", "delayed_quit_switch", delayed_quit_switch)
|
||||||
mp.add_key_binding("alt+shift+q", "delayed_quit_increase", delayed_quit_increase)
|
|
||||||
mp.add_key_binding("alt+a", "delayed_quit_decrease", delayed_quit_decrease)
|
mp.add_key_binding("alt+a", "delayed_quit_decrease", delayed_quit_decrease)
|
||||||
|
mp.add_key_binding("alt+shift+a", "delayed_quit_increase", delayed_quit_increase)
|
||||||
|
|
Loading…
Reference in a new issue