zenwarr / mpv-config

Collection of my personalized mpv scripts and configuration files
20 stars 3 forks source link

subtitle-search how to hide and re-open current search results #17

Closed mrfragger closed 1 month ago

mrfragger commented 1 month ago

On audiobooks that are 20+ hours..even 50+ hours it takes more than 30+ seconds to return results.

To hide current search results and then open the results again simply add these two lines one keybind for hiding TAB and / to reopen search results. Once you hit ESC then search results are gone and can start a new query. script-modules/scroll-list.lua

    keybinds = {
        {'DOWN', 'scroll_down', function() vars:scroll_down() end, {repeatable = true}},
        {'UP', 'scroll_up', function() vars:scroll_up() end, {repeatable = true}},
        {'PGDWN', 'move_pagedown', function() vars:move_pagedown() end, {}},
        {'PGUP', 'move_pageup', function() vars:move_pageup() end, {}},
        {'HOME', 'move_begin', function() vars:move_begin() end, {}},
        {'END', 'move_end', function() vars:move_end() end, {}},

        {'TAB', 'close_list', function() vars:close_list() end, {}},
        {'/', 'open_list', function() vars:open_list() end, {}},

        {'ESC', 'close_browser', function() vars:close() end, {}}
mrfragger commented 1 month ago

To get a black border behind search results with a little white shadow for better search results visibility in script-modules/scroll-list.lua near the top list_style = [[{\q2\fs20\c&Hffffff&}]], change to list_style = [[{\backcolour&H000000&\shad1\bord4\q2\fs20\c&Hffffff&}]],