From c84f971ed195bb487fa450a2553c3afdf5a1c83a Mon Sep 17 00:00:00 2001 From: Chl Date: Tue, 6 Feb 2024 22:25:27 +0100 Subject: [PATCH] Actually, this key binding is easier to memorize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (looked at the forge logs : nobody pulled it so it's okay to break the standard a littleĀ :) --- README.md | 10 +++++++--- main.lua | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4995bf3..a0b1820 100644 --- a/README.md +++ b/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 ``` + Or download the Lua file and put it in the directory `~/.config/mpv/scripts/delayed_quit/`. ## 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+shift+q` : increment the counter, so mpv will quit one file later, -* `alt+a` : decrement the counter, so mpv will quit one file sooner. +* `alt+q` : make mpv quit at the end of the current file (or the counter-th file) in the playlist. Press again to forgo. + +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. diff --git a/main.lua b/main.lua index 9e62451..cac2aac 100644 --- a/main.lua +++ b/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 : -- y script-binding 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+shift+a", "delayed_quit_increase", delayed_quit_increase)