Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 4 additions & 0 deletions examples/openurl.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import windy

openUrl("https://github.com")

4 changes: 4 additions & 0 deletions src/windy/platforms/win32/platform.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down