From f4a35a0264f9eaaa58fecf0d37cf4d5340ff7ae1 Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Thu, 12 Dec 2024 20:20:58 +0100 Subject: [PATCH] osc.lua: move title mbtn script-opts below playlist_next's Sort mbtn script-opts according to how they are shown to the user in bar layout instead of how they are defined in osc_init(). --- DOCS/man/osc.rst | 12 ++++++------ player/lua/osc.lua | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/DOCS/man/osc.rst b/DOCS/man/osc.rst index 4832664abac7e..ec619af0ab211 100644 --- a/DOCS/man/osc.rst +++ b/DOCS/man/osc.rst @@ -501,12 +501,6 @@ Configurable Options The following options configure what commands are run when the buttons are clicked. ``mbtn_mid`` commands are also triggered with ``shift+mbtn_left``. -``title_mbtn_left_command=script-binding stats/display-page-5`` - -``title_mbtn_mid_command=show-text ${filename}`` - -``title_mbtn_right_command=script-binding select/select-playlist; script-message-to osc osc-hide`` - ``playlist_prev_mbtn_left_command=playlist-prev; show-text ${playlist} 3000`` ``playlist_prev_mbtn_mid_command=show-text ${playlist} 3000`` @@ -519,6 +513,12 @@ clicked. ``mbtn_mid`` commands are also triggered with ``shift+mbtn_left``. ``playlist_next_mbtn_right_command=show-text ${playlist} 3000`` +``title_mbtn_left_command=script-binding stats/display-page-5`` + +``title_mbtn_mid_command=show-text ${filename}`` + +``title_mbtn_right_command=script-binding select/select-playlist; script-message-to osc osc-hide`` + ``play_pause_mbtn_left_command=cycle pause`` ``play_pause_mbtn_mid_command=`` diff --git a/player/lua/osc.lua b/player/lua/osc.lua index c0ed7a510e445..1b3b6eb0c9c02 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -71,10 +71,6 @@ local user_opts = { -- luacheck: push ignore -- luacheck: max line length - title_mbtn_left_command = "script-binding stats/display-page-5", - title_mbtn_mid_command = "show-text ${filename}", - title_mbtn_right_command = "script-binding select/select-playlist; script-message-to osc osc-hide", - playlist_prev_mbtn_left_command = "playlist-prev", playlist_prev_mbtn_mid_command = "show-text ${playlist} 3000", playlist_prev_mbtn_right_command = "show-text ${playlist} 3000", @@ -83,6 +79,10 @@ local user_opts = { playlist_next_mbtn_mid_command = "show-text ${playlist} 3000", playlist_next_mbtn_right_command = "show-text ${playlist} 3000", + title_mbtn_left_command = "script-binding stats/display-page-5", + title_mbtn_mid_command = "show-text ${filename}", + title_mbtn_right_command = "script-binding select/select-playlist; script-message-to osc osc-hide", + play_pause_mbtn_left_command = "cycle pause", play_pause_mbtn_mid_command = "", play_pause_mbtn_right_command = "cycle-values loop-file inf no",