diff options
| author | Thomas Ulmer <thomasmulmer02@gmail.com> | 2025-10-29 10:27:09 -0700 |
|---|---|---|
| committer | Thomas Ulmer <thomasmulmer02@gmail.com> | 2025-10-29 10:27:09 -0700 |
| commit | 83dc3497489a5fb81353b544b6c979d05c743088 (patch) | |
| tree | 0677dc1f81cce2f4acec0fa9a358285d702ab686 | |
| parent | 3e92299dca8bdeda4af7c58b6784b1b4c7bb32ae (diff) | |
fix mpv launcher
| -rw-r--r-- | glide/glide.ts | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/glide/glide.ts b/glide/glide.ts index 9b47dc6..0562564 100644 --- a/glide/glide.ts +++ b/glide/glide.ts @@ -26,10 +26,18 @@ glide.keymaps.set("normal", "gp", async () => { const url = cur_url.replace("inv.nadeko.net", "youtube.com").replace( /watch\?.*v=([a-zA-Z0-9\-]*).*/, 'watch?v=$1' ); - const proc = await glide.process.spawn("mpv", [ + if (!url.includes("youtube")) { + console.log("refused to open url with mpv: ", url); + return + } + const proc = await glide.process.spawn("nohup", [ + "mpv", url - ], { check_exit_code: false, cwd: "~"}); - console.log("openned mpv with url", url); + ], {}); + // const proc = await glide.process.spawn("xmessage", ["test from glide"], + // {}); + // console.log("opened kitty with pid", proc.pid); + console.log("opened mpv with url", url); }) glide.prefs.set("privacy.trackingprotection.enabled", true); |
