From d709e696a3e748fe2efd5de98ca76b2101c83306 Mon Sep 17 00:00:00 2001 From: natural-harmonia-gropius <50797982+natural-harmonia-gropius@users.noreply.github.com> Date: Fri, 30 Aug 2024 10:08:31 +0800 Subject: [PATCH] Listen for open-recent-menu messages --- recentmenu.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/recentmenu.lua b/recentmenu.lua index 290b015..a9f9d7e 100644 --- a/recentmenu.lua +++ b/recentmenu.lua @@ -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())