diff options
| author | Robert Günzler <r@gnzler.io> | 2026-02-10 12:32:48 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-02-10 12:41:25 +0100 |
| commit | 63feeb9f369fc6176e85c1c2d8fcc863caad1946 (patch) | |
| tree | 41cd5d2d1ec36e74e464caab722cc9b460153f04 /.config/mpv/scripts/openuri.lua | |
| parent | 5bd0a4aca65ecb9818ef1285982d160b6b6ff665 (diff) | |
start new
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '.config/mpv/scripts/openuri.lua')
| -rw-r--r-- | .config/mpv/scripts/openuri.lua | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/.config/mpv/scripts/openuri.lua b/.config/mpv/scripts/openuri.lua deleted file mode 100644 index 61b20e5..0000000 --- a/.config/mpv/scripts/openuri.lua +++ /dev/null @@ -1,42 +0,0 @@ -mp = require("mp") -format_json = require("mp.utils").format_json - -function open_uri() - local json = format_json({ - type = "open-uri", - title = "https://mpv.io", - items = { - { - title = "Enter a network url", - align = "left", - value = "ignore", - muted = true, - selectable = false - } - }, - on_search = { "script-message-to", mp.get_script_name(), "openuri-cb" }, - palette = true, - search_style = "palette", - search_debounce = "submit" - }) or "{}" - mp.commandv("script-message-to", "uosc", "open-menu", json) -end - -mp.register_script_message("openuri-cb", function(path) - mp.commandv("script-message-to", "uosc", "close-menu", "openuri") - mp.commandv("loadfile", path, "append-play") -end) - -mp.add_key_binding("ctrl+o", "openuri", open_uri) - -mp.add_key_binding("ctrl+shift+o", "pasteuri", function() - local r = mp.command_native({ - name = "subprocess", - playback_only = false, - capture_stdout = true, - args = { "wl-paste" }, - }) - if r.status == 0 then - mp.commandv("script-message-to", mp.get_script_name(), "openuri-cb", r.stdout) - end -end) |