Skip to content

Commit

Permalink
osc.lua: move title mbtn script-opts below playlist_next's
Browse files Browse the repository at this point in the history
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().
  • Loading branch information
guidocella authored and kasper93 committed Dec 12, 2024
1 parent 53554f5 commit f4a35a0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions DOCS/man/osc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand All @@ -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=``
Expand Down
8 changes: 4 additions & 4 deletions player/lua/osc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit f4a35a0

Please sign in to comment.