github.com/ncruces/zenity
Package zenity provides cross-platform access to simple dialogs that interact graphically with the user. It is inspired by, and closely follows the API of, the zenity program, which it uses to provide the functionality on various Unixes. See: https://help.gnome.org/users/zenity/stable/ This package does not require cgo, and it does not impose any threading or initialization requirements.
Readme
This repo includes:
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.
The Go package:
go get github.com/ncruces/zenity@latest
The zenity
command on macOS/WSL using Homebrew 🍺:
brew install ncruces/tap/zenity
The zenity
command on Windows using Scoop 🍨:
scoop install https://ncruces.github.io/scoop/zenity.json
The zenity
command on macOS/Windows, if you have Go:
go install github.com/ncruces/zenity/cmd/zenity@latest
Or download the latest release.
For the Go package, consult the documentation and examples.
The zenity
command does its best to be compatible with the GNOME version.
Consult the documentation
and man page of that command.
cgo
(see benefits, mostly cross-compilation)context
osascript
zenity
, matedialog
, qarma
I'd like to thank all contributors,
but @gen2brain in particular
for dlgs
,
which was instrumental to the Windows port of zenity
.
FAQs
Package zenity provides cross-platform access to simple dialogs that interact graphically with the user. It is inspired by, and closely follows the API of, the zenity program, which it uses to provide the functionality on various Unixes. See: https://help.gnome.org/users/zenity/stable/ This package does not require cgo, and it does not impose any threading or initialization requirements.
We found that github.com/ncruces/zenity demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.