Zenity dialogs for Golang, Windows, macOS Fork of https://github.com/ncruces/zenity
Find a file
2022-03-26 02:56:06 +00:00
.github/workflows Update go.yml 2022-03-24 16:05:11 +00:00
cmd/zenity Command improvements. 2022-03-26 02:56:06 +00:00
internal/zenutil Bump go version. 2022-03-24 14:37:37 +00:00
scripts Fix script. 2022-03-26 01:21:21 +00:00
.gitignore WIP: zenity command (macos). 2020-01-07 00:57:50 +00:00
color.go Documentation, fix #24. 2022-03-26 00:58:27 +00:00
color_darwin.go Canceled error. 2021-04-29 16:05:28 +01:00
color_test.go WSL test improvements. 2021-07-29 16:20:50 +01:00
color_unix.go Bump go version. 2022-03-24 14:37:37 +00:00
color_windows.go WIP: progress (windows). 2021-04-28 01:32:23 +01:00
entry.go Documentation, fix #24. 2022-03-26 00:58:27 +00:00
entry_darwin.go Canceled error. 2021-04-29 16:05:28 +01:00
entry_test.go WSL test improvements. 2021-07-29 16:20:50 +01:00
entry_unix.go Bump go version. 2022-03-24 14:37:37 +00:00
entry_windows.go Refactor. 2022-03-24 12:51:28 +00:00
file.go Documentation, fix #24. 2022-03-26 00:58:27 +00:00
file_darwin.go Canceled error. 2021-04-29 16:05:28 +01:00
file_filter_test.go Scripted user tests. 2021-07-08 17:15:12 +01:00
file_test.go WSL test improvements. 2021-07-29 16:20:50 +01:00
file_unix.go Bump go version. 2022-03-24 14:37:37 +00:00
file_util_test.go Scripted user tests. 2021-07-08 17:15:12 +01:00
file_windows.go Unsafe rules. 2021-09-15 13:54:35 +01:00
go.mod Bump go version. 2022-03-24 14:37:37 +00:00
go.sum Use NewLazySystemDLL (windows). 2021-09-10 01:32:34 +01:00
LICENSE Initial commit 2019-12-10 10:51:21 +00:00
list.go Documentation, fix #24. 2022-03-26 00:58:27 +00:00
list_darwin.go Progress. 2021-05-04 12:48:19 +01:00
list_test.go WSL test improvements. 2021-07-29 16:20:50 +01:00
list_unix.go Bump go version. 2022-03-24 14:37:37 +00:00
list_windows.go Refactor. 2022-03-24 12:51:28 +00:00
main_test.go WSL test improvements. 2021-07-29 16:20:50 +01:00
msg.go Documentation, fix #24. 2022-03-26 00:58:27 +00:00
msg_darwin.go Canceled error. 2021-04-29 16:05:28 +01:00
msg_test.go Avoid closures in syscall.NewCallback, #20. 2021-09-13 13:17:15 +01:00
msg_unix.go Bump go version. 2022-03-24 14:37:37 +00:00
msg_windows.go Command improvements. 2022-03-26 02:56:06 +00:00
notify.go Refactor. 2021-03-04 12:42:30 +00:00
notify_darwin.go Refactor. 2021-03-04 12:42:30 +00:00
notify_test.go Improve CI testing. 2021-07-07 01:01:22 +01:00
notify_unix.go Bump go version. 2022-03-24 14:37:37 +00:00
notify_windows.go Workaround #17. 2021-08-14 03:08:15 +01:00
progress.go Documentation, fix #24. 2022-03-26 00:58:27 +00:00
progress_darwin.go Progress. 2021-05-04 12:48:19 +01:00
progress_test.go Improve CI testing. 2021-07-07 01:01:22 +01:00
progress_unix.go Bump go version. 2022-03-24 14:37:37 +00:00
progress_windows.go Refactor. 2022-03-24 12:51:28 +00:00
pwd.go Documentation, fix #24. 2022-03-26 00:58:27 +00:00
pwd_stub.go Bump go version. 2022-03-24 14:37:37 +00:00
pwd_test.go WSL test improvements. 2021-07-29 16:20:50 +01:00
pwd_unix.go Bump go version. 2022-03-24 14:37:37 +00:00
README.md Update README.md 2021-07-23 12:17:43 +01:00
util_darwin.go WIP: progress (unix). 2021-04-27 14:09:30 +01:00
util_unix.go Bump go version. 2022-03-24 14:37:37 +00:00
util_unix_test.go Bump go version. 2022-03-24 14:37:37 +00:00
util_windows.go Renames. 2022-03-23 13:52:52 +00:00
zenity.go Command improvements. 2022-03-26 02:56:06 +00:00
zenity_test.go Test improvements. 2021-07-16 03:01:00 +01:00

Zenity dialogs for Golang, Windows and macOS

Go Reference Go Report Go Cover Mentioned in Awesome Go

This repo includes both a cross-platform Go package providing Zenity-like dialogs (simple dialogs that interact graphically with the user), as well as a “port” of the zenity command to both Windows and macOS based on that library.

Implemented dialogs:

Behavior on Windows, macOS and other Unixes might differ slightly. Some of that is intended (reflecting platform differences), other bits are unfortunate limitations.

Installing

The Go package:

go get github.com/ncruces/zenity

The zenity command on macOS/WSL using Homebrew:

brew install ncruces/tap/zenity

Or download the latest release.

Why?

There are a bunch of other dialog packages for Go.
Why reinvent this particular wheel?

Benefits:

  • no cgo (see benefits, mostly cross-compilation)
  • no main loop (or any other threading or initialization requirements)
  • cancelation through context
  • on Windows:
    • no additional dependencies
      • Explorer shell not required
      • works in Server Core
    • Unicode support
    • High DPI (no manifest required)
    • Visual Styles (no manifest required)
    • WSL/Cygwin/MSYS2 support
  • on macOS:
    • only dependency is osascript
  • on other Unixes:
    • wraps either one of zenity, qarma, matedialog