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: allow adding custom buttons #15517

Merged
merged 2 commits into from
Jan 4, 2025
Merged

Conversation

guidocella
Copy link
Contributor

Allow adding custom buttons without forking the whole OSC like in https://github.com/christoph-heinrich/mpv-quality-menu/blob/master/osc.patch

I tried to put these to the left of the cache text at first but the layout is determined at startup so you can't conditionally remove elements at runtime.

Emoji may not be perfectly aligned depending on the font used.

Example with:

custom_button_1_content=🔁
custom_button_1_mbtn_left_command=cycle-values loop-file inf no
custom_button_1_mbtn_right_command=cycle-values loop-playlist inf no

custom_button_2_content=🔂
custom_button_2_mbtn_left_command=cycle-values loop-file 1 no

custom_button_3_content=🔀
custom_button_3_mbtn_left_command=playlist-shuffle

screenshot

Copy link

github-actions bot commented Dec 14, 2024

Download the artifacts for this pull request:

Windows
macOS

player/lua/osc.lua Outdated Show resolved Hide resolved
player/lua/osc.lua Outdated Show resolved Hide resolved
player/lua/osc.lua Outdated Show resolved Hide resolved
@guidocella guidocella force-pushed the osc-custom branch 4 times, most recently from 53efd5f to a5d2a75 Compare January 4, 2025 19:24
player/lua/osc.lua Outdated Show resolved Hide resolved
player/lua/osc.lua Outdated Show resolved Hide resolved
@kasper93 kasper93 merged commit 2e1bc3c into mpv-player:master Jan 4, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants