Skip to content

Commit

Permalink
Listen for open-recent-menu messages
Browse files Browse the repository at this point in the history
  • Loading branch information
natural-harmonia-gropius committed Aug 30, 2024
1 parent 6e8d52b commit d709e69
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions recentmenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,20 @@ mp.add_key_binding(nil, "last", play_last)
mp.register_event("file-loaded", on_load)
mp.register_event("end-file", on_end)

mp.register_script_message('open-recent-menu', function(provider)
if provider == nil then
open_menu()
elseif provider == "uosc" then
open_menu_uosc()
elseif provider == "command-palette" then
open_menu_command_palette()
elseif provider == "select" then
open_menu_select()
else
mp.msg.warn(provider + "not available")
end
end)

mp.register_script_message('uosc-version', function()
uosc_available = true
mp.commandv('script-message-to', 'uosc', 'get-locale', mp.get_script_name())
Expand Down

0 comments on commit d709e69

Please sign in to comment.