Zenity dialogs for Golang, Windows, macOS
cmd/zenity | ||
internal/zenutil | ||
.gitignore | ||
color_darwin.go | ||
color_test.go | ||
color_unix.go | ||
color_windows.go | ||
color.go | ||
entry_darwin.go | ||
entry_test.go | ||
entry_unix.go | ||
entry_windows.go | ||
entry.go | ||
file_darwin.go | ||
file_filter_test.go | ||
file_test.go | ||
file_unix.go | ||
file_windows.go | ||
file.go | ||
go.mod | ||
go.sum | ||
LICENSE | ||
list_darwin.go | ||
list_test.go | ||
list_unix.go | ||
list_windows.go | ||
list.go | ||
msg_darwin.go | ||
msg_test.go | ||
msg_unix.go | ||
msg_windows.go | ||
msg.go | ||
notify_darwin.go | ||
notify_test.go | ||
notify_unix.go | ||
notify_windows.go | ||
notify.go | ||
progress_darwin.go | ||
progress.go | ||
pwd_stub.go | ||
pwd_test.go | ||
pwd_unix.go | ||
pwd.go | ||
README.md | ||
util_darwin.go | ||
util_unix.go | ||
util_windows.go | ||
zenity_test.go | ||
zenity.go |
Zenity dialogs for Golang, Windows and macOS
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:
- message (error, info, question, warning)
- text entry
- list (simple)
- password
- file selection
- color selection
- notification
Behavior on Windows, macOS and other Unixes might differ slightly. Some of that is intended (reflecting platform differences), other bits are unfortunate limitations, others still are open to be fixed.
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 support (no manifest required)
- WSL/Cygwin/MSYS2 support
- no additional dependencies
- on macOS:
- only dependency is
osascript
- only dependency is
- on other Unixes:
- wraps either one of
zenity
,qarma
,matedialog
- wraps either one of