zenity/README.md

44 lines
1.7 KiB
Markdown
Raw Normal View History

2020-01-09 08:26:58 -05:00
# Zenity dialogs for Golang, Windows and macOS
[![GoDoc](https://godoc.org/github.com/ncruces/zenity?status.svg)](https://godoc.org/github.com/ncruces/zenity)
2020-01-23 06:44:28 -05:00
This repo includes both a cross-platform Go package providing
2020-01-26 11:04:49 -05:00
[Zenity](https://help.gnome.org/users/zenity/stable/)-like dialogs
2020-01-23 06:44:28 -05:00
(simple dialogs that interact graphically with the user),
2020-01-09 08:26:58 -05:00
as well as a *“port”* of the `zenity` command to both Windows and macOS based on that library.
**This is a work in progress.**
Lots of things are missing.
For now, these are the only implemented dialogs:
2020-01-13 21:26:25 -05:00
* [message](https://github.com/ncruces/zenity/wiki/Message-dialog) (error, info, question, warning)
* [file selection](https://github.com/ncruces/zenity/wiki/File-Selection-dialog)
2020-01-21 11:13:45 -05:00
* [color selection](https://github.com/ncruces/zenity/wiki/Color-Selection-dialog)
2020-01-27 10:42:43 -05:00
* [notification](https://github.com/ncruces/zenity/wiki/Notification)
2020-01-09 08:26:58 -05:00
2020-01-15 10:06:42 -05:00
Behavior on Windows, macOS and other Unixes might differ slightly.
2020-01-09 08:26:58 -05:00
Some of that is intended (reflecting platform differences),
other bits are unfortunate limitations,
2020-01-10 07:00:38 -05:00
others still are open to be fixed.
2020-01-09 08:26:58 -05:00
## Why?
2020-01-10 07:00:38 -05:00
There are a bunch of other dialog packages for Go.\
2020-01-09 08:26:58 -05:00
Why reinvent this particular wheel?
#### Requirements:
* no `cgo` (see [benefits](https://dave.cheney.net/2016/01/18/cgo-is-not-go), mostly cross-compilation)
* no main loop (or other threading requirements)
* no initialization
* on Windows:
2020-01-09 13:37:03 -05:00
* no additional dependencies
* Explorer shell not required
* works in Server Core
2020-01-09 08:26:58 -05:00
* Unicode support
2020-01-17 09:23:34 -05:00
* WSL/Cygwin/MSYS2 [support](https://github.com/ncruces/zenity/wiki/Zenity-for-WSL,-Cygwin,-MSYS2)
2020-01-09 08:26:58 -05:00
* on macOS:
2020-01-19 06:57:05 -05:00
* only dependency is `osascript`
2020-01-15 10:06:42 -05:00
* on other Unixes:
2020-01-21 07:03:58 -05:00
* wraps either one of `zenity`, `qarma`, `matedialog`