Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osc.lua: update mouse bindings #15497

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions DOCS/man/osc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ The Interface
pl prev
============= ================================================
left-click play previous file in playlist
right-click show the playlist
shift+L-click show the playlist
middle-click show the playlist
right-click open the playlist selector
============= ================================================

pl next
============= ================================================
left-click play next file in playlist
right-click show the playlist
shift+L-click show the playlist
middle-click show the playlist
right-click open the playlist selector
============= ================================================

title
Expand All @@ -50,8 +50,9 @@ title

============= ================================================
left-click show file and track info
shift+L-click show the filename
middle-click show the filename
right-click open the playlist selector
right-click show the path
============= ================================================

cache
Expand All @@ -66,15 +67,17 @@ play
skip back
============= ================================================
left-click go to beginning of chapter / previous chapter
right-click open the chapter selector
shift+L-click show chapters
middle-click show chapters
right-click open the chapter selector
============= ================================================

skip frwd
============= ================================================
left-click go to next chapter
right-click open the chapter selector
shift+L-click show chapters
middle-click show chapters
right-click open the chapter selector
============= ================================================

time elapsed
Expand Down Expand Up @@ -505,19 +508,19 @@ clicked. ``mbtn_mid`` commands are also triggered with ``shift+mbtn_left``.

``playlist_prev_mbtn_mid_command=show-text ${playlist} 3000``

``playlist_prev_mbtn_right_command=show-text ${playlist} 3000``
``playlist_prev_mbtn_right_command=script-binding select/select-playlist; script-message-to osc osc-hide``

``playlist_next_mbtn_left_command=playlist-next; show-text ${playlist} 3000``

``playlist_next_mbtn_mid_command=show-text ${playlist} 3000``

``playlist_next_mbtn_right_command=show-text ${playlist} 3000``
``playlist_next_mbtn_right_command=script-binding select/select-playlist; script-message-to osc osc-hide``

``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``
``title_mbtn_right_command=show-text ${path}``

``play_pause_mbtn_left_command=cycle pause``

Expand Down
3 changes: 3 additions & 0 deletions etc/restore-osc-bindings.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ chapter_prev_mbtn_left_command=no-osd add chapter -1; show-text ${chapter-list}
chapter_next_mbtn_left_command=no-osd add chapter 1; show-text ${chapter-list} 3000

# restore behavior before select.lua usage
playlist_prev_mbtn_right_command=show-text ${playlist} 3000
playlist_next_mbtn_right_command=show-text ${playlist} 3000

title=${media-title}
title_mbtn_left_command=show-text "${!playlist-count==1:[${playlist-pos-1}/${playlist-count}] }${media-title}"
title_mbtn_right_command=show-text ${filename}
Expand Down
6 changes: 3 additions & 3 deletions player/lua/osc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ local user_opts = {
-- luacheck: max line length
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",
playlist_prev_mbtn_right_command = "script-binding select/select-playlist; script-message-to osc osc-hide",

playlist_next_mbtn_left_command = "playlist-next",
playlist_next_mbtn_mid_command = "show-text ${playlist} 3000",
playlist_next_mbtn_right_command = "show-text ${playlist} 3000",
playlist_next_mbtn_right_command = "script-binding select/select-playlist; script-message-to osc osc-hide",

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",
title_mbtn_right_command = "show-text ${path}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be $path or $stream-path or $stream-open-file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never heard of stream-path, docs say it's useless. stream-open-filename is the huge EDL string when playing ytdl_hook URLs I don't know why you would want to see that instead of the normal youtube URL.


play_pause_mbtn_left_command = "cycle pause",
play_pause_mbtn_mid_command = "",
Expand Down
Loading