From 8a07a2a519e7d6962b8710ba5dbe97533b898cd8 Mon Sep 17 00:00:00 2001 From: treeform Date: Wed, 14 Jan 2026 10:00:08 -0800 Subject: [PATCH 1/2] Add openUrl for win32. --- examples/openurl.nim | 4 ++++ src/windy/platforms/win32/platform.nim | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 examples/openurl.nim diff --git a/examples/openurl.nim b/examples/openurl.nim new file mode 100644 index 0000000..e4ef84d --- /dev/null +++ b/examples/openurl.nim @@ -0,0 +1,4 @@ +import windy + +openUrl("https://github.com") + diff --git a/src/windy/platforms/win32/platform.nim b/src/windy/platforms/win32/platform.nim index 16029b3..64359b4 100644 --- a/src/windy/platforms/win32/platform.nim +++ b/src/windy/platforms/win32/platform.nim @@ -2516,6 +2516,10 @@ proc setConfig*(appName: string, fileName: string, content: string) = let configPath = configDir / fileName writeFile(configPath, content) +proc openUrl*(url: string) = + ## Open a URL in the default web browser. + discard execShellCmd("start " & url) + proc openTempTextFile*(title, text: string) = ## Open a text file in the default text editor. if not dirExists("tmp"): From 157852da2428e6e262f3b40a0983c2f671179dfb Mon Sep 17 00:00:00 2001 From: treeform Date: Wed, 14 Jan 2026 10:01:06 -0800 Subject: [PATCH 2/2] Add to CI --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f44503..0da9fe4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,6 +38,7 @@ jobs: - run: nim c examples/system_cursors.nim - run: nim c examples/tray.nim - run: nim c examples/websocket.nim + - run: nim c examples/openurl.nim - run: nim c -d:emscripten examples/basic.nim - run: nim c -d:emscripten examples/basic_boxy.nim @@ -58,3 +59,4 @@ jobs: - run: nim c -d:emscripten examples/system_cursors.nim - run: nim c -d:emscripten examples/tray.nim # - run: nim c -d:emscripten examples/websocket.nim + - run: nim c -d:emscripten examples/openurl.nim