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

Support built-in command palette script/API (a searchable menu) #13964

Closed
stax76 opened this issue Apr 22, 2024 · 2 comments · Fixed by #13982 or #14087
Closed

Support built-in command palette script/API (a searchable menu) #13964

stax76 opened this issue Apr 22, 2024 · 2 comments · Fixed by #13982 or #14087

Comments

@stax76
Copy link
Contributor

stax76 commented Apr 22, 2024

Expected behavior of the wanted feature

I noticed there has been work done on a context menu, there is another popular UI concept that could be supported as built-in script and API, a searchable menu, it can be used for:

Bindings, playlist, chapters, profiles, audio/subtitle/video tracks, commands, properties, options, audio devices, recent files, console history and more. mpv having such features built-in would improve productivity and user-friendliness, especially for beginners, some user scripts are hard to find and difficult to install due to lack of good documentation and missing package/extension/script manager.

The UI concept is very useful and popular, used for many things in VS Code (158k GitHub stars) and fzf (59k GitHub stars).

The same or similar concept is in the start menu of Windows, Gnome and KDE, in browser address bars and popular external launchers:

alfred launcher for macOS
flow launcher for Windows
rofi and albert launcher for Linux.

mpv.net had a WPF based command palette, but the code stopped working after porting from .NET Framework to .NET 5 (Core) due to a change made by Microsoft. Some mpv.net users miss the lost functionality now.

The existing script, 500 lines of code:

https://github.com/stax76/mpv-scripts?tab=readme-ov-file#command_palette

It's based on an awesome module which has 900 lines of code, found here:

https://github.com/Seme4eg/mpv-scripts/blob/master/script-modules/extended-menu.lua

There are a couple of searchable mpv menus listed here:

https://github.com/stax76/awesome-mpv?tab=readme-ov-file#menu

@guidocella
Copy link
Contributor

I implemented this in https://github.com/guidocella/mpv-console-select with just mp.input and the console's log instead of making a custom UI. I'm not sure if we want to upstream something like it.

@tsl0922
Copy link
Contributor

tsl0922 commented Apr 24, 2024

The context menu may have a libass based fallback implementation in the feature, it should be possible to adapt it to behave like command palette.

guidocella added a commit to guidocella/mpv that referenced this issue Apr 24, 2024
This allows scripts to make the user choose from a list of entries by
typing part of their text and/or by navigating them with keybindings,
like dmenu or fzf.

Closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue Apr 24, 2024
This allows scripts to make the user choose from a list of entries by
typing part of their text and/or by navigating them with keybindings,
like dmenu or fzf.

Closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue Apr 24, 2024
This allows scripts to make the user choose from a list of entries by
typing part of their text and/or by navigating them with keybindings,
like dmenu or fzf.

Closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue Apr 24, 2024
This allows scripts to make the user choose from a list of entries by
typing part of their text and/or by navigating them with keybindings,
like dmenu or fzf.

Closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue Apr 25, 2024
This allows scripts to make the user choose from a list of entries by
typing part of their text and/or by navigating them with keybindings,
like dmenu or fzf.

Closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue Apr 26, 2024
This allows scripts to make the user choose from a list of entries by
typing part of their text and/or by navigating them with keybindings,
like dmenu or fzf.

Closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue Apr 26, 2024
This allows scripts to make the user choose from a list of entries by
typing part of their text and/or by navigating them with keybindings,
like dmenu or fzf.

Closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 4, 2024
This allows scripts to make the user choose from a list of entries by
typing part of their text and/or by navigating them with keybindings,
like dmenu or fzf.

Closes mpv-player#13964.
kasper93 pushed a commit that referenced this issue May 7, 2024
This allows scripts to make the user choose from a list of entries by
typing part of their text and/or by navigating them with keybindings,
like dmenu or fzf.

Closes #13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 8, 2024
This adds script messages to select playlist entries, tracks, chapters
and subtitle lines using the newly introduced mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 8, 2024
This adds script messages to select playlist entries, tracks, chapters
and subtitle lines using the newly introduced mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 9, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 9, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 9, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 10, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 10, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 10, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 10, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 10, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 10, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 11, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 11, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 11, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 11, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 11, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 11, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 11, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 11, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 12, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 12, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 12, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 12, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 12, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 12, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 12, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
guidocella added a commit to guidocella/mpv that referenced this issue May 12, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes mpv-player#13964.
kasper93 pushed a commit that referenced this issue May 12, 2024
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes #13964.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants