A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Seme4eg/mpv-scripts/tree/master below:

GitHub - Seme4eg/mpv-scripts

A menu that shows all commands you have available, key bindings and commends (if present) and from which you can call any of those commands.

Setup:

Keybidings you can see in extended menu keybindings section.

Note: if you are using my leader script, you will see your leader bindings in M-x menu as well.

Essentially same as the M-x, but instead of using extended-menu module uses external rofi to display and search through commands.

Setup:

Note: if you are using my leader script, you will see your leader bindings in M-x menu as well.

Adds leader key to your mpv. With prefixes and which-key functionality. Allows for ‘mnemonic’ command calling.

It won’t redefine existing bidings (at least i didn’t find a way to do it for now), but it will add leader bindings on top of current ones, which will allow you to freely redefine previous key bindings to any other command. For instance if you had seek command on l key and you bound it to <leader> n then u can bind any other command to l and you will still have <leader> n bound to seek.

NOTE: For script commands to appear in leader key bindings (after you set those up in script file) they must be initially set to some key, which is usually not a problem since most (if not all) scripts bind themselfes to some default key.

Setup:

Example can be found in the script file itself.

{'key', 'name', 'description', [innerBindings]}

Any key you desire

Can be one of:

full command name
means it is not a script-defined command, will look like "add contrast 1". Full list of all commands can be found using my M-x script.
prefix
literaly 'prefix' string, which will tell the script that there are following bindings after this one.
script command name
To set binding to a script command look for this command name, which is passed as 2nd argument to mp.add_key_binding or mp.add_forced_key_binding and usually can be found in its script file. This field must be unique. Examples:
-- here command name is "M-x"
mp.add_key_binding(opts.toggle_menu_binding, "M-x", function()
                     mx_menu:init(data)
end)

-- here command name is "chapters-menu"
mp.add_key_binding(opts.toggle_menu_binding, "chapters-menu", function()
                     chapter_menu:init(chapter)
end)

String that describes what the command that is bound to this binding does. In case name field is 'prefix' for your convenience i’d suggest setting 1-3 word description. For example for a prefix audio description, subtitles description for s prefix etc.

Only being used with keys that are prefixes. Includes keys following that prefix key, consista of same format tables - {‘key’, ‘name’, ‘description’, [innerBindings]}. Key field within this table is being concatenated with all parent prefixes.

{'s', 'prefix', 'subtitles', {'a', 'prefix', ... {'+', 'increase-font', ...}}} will result in sa+ keybinding for increase-font command.

Passing bindings table to script-module

Pass it to set_leader_bindings func, which can be found in the end of ~~/scripts/leader.lua

sort bindings by key, to show them in which-key in alphabetical order Move my bindings table somewhere else

Move my keybinding object definition out of the script file so the user just has an example somewhere. And also current realisation will cause conflicts when pulling from master since everyone will have his own bindings object.

Upon init set all leader bindings to M-x and merge it there move recently called commands to top of M-x menu list

Set shaders from your shaders folder using rofi selection.

Setup:

Ctrl+s - default keybinding. Change it via input.conf:

Ctrl+t script-binding shaders-rofi

This script assumes shaders are under ~~/shaders/. Make an issue/pull request if redefining shaders dir is a common case.

No demo here since it has basically same functionality as M-x but instead of commands you choose chapters of current video (if any). Shares same script-module with M-x.

Setup:

Keybindings you can see in extended menu keybindings section.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4