zenity/README.md

46 lines
2 KiB
Markdown
Raw Normal View History

2020-01-09 08:26:58 -05:00
# Zenity dialogs for Golang, Windows and macOS
2020-12-13 08:12:01 -05:00
[![PkgGoDev](https://pkg.go.dev/badge/image)](https://pkg.go.dev/github.com/ncruces/zenity)
2020-01-29 11:55:51 -05:00
[![Go Report](https://goreportcard.com/badge/github.com/ncruces/zenity)](https://goreportcard.com/report/github.com/ncruces/zenity)
2020-01-09 08:26:58 -05:00
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.
2021-04-09 10:14:31 -04:00
Implemented dialogs:
2020-01-13 21:26:25 -05:00
* [message](https://github.com/ncruces/zenity/wiki/Message-dialog) (error, info, question, warning)
2021-04-05 18:19:02 -04:00
* [text entry](https://github.com/ncruces/zenity/wiki/Text-Entry-dialog)
2021-04-11 22:59:08 -04:00
* [list](https://github.com/ncruces/zenity/wiki/List-dialog) (simple)
2021-04-05 18:19:02 -04:00
* [password](https://github.com/ncruces/zenity/wiki/Password-dialog)
2021-04-09 10:14:31 -04:00
* [file selection](https://github.com/ncruces/zenity/wiki/File-Selection-dialog)
* [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),
2021-04-27 20:27:28 -04:00
other bits are unfortunate limitations.
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?
2020-01-30 21:45:44 -05:00
#### Benefits:
2020-01-09 08:26:58 -05:00
* no `cgo` (see [benefits](https://dave.cheney.net/2016/01/18/cgo-is-not-go), mostly cross-compilation)
2020-01-30 21:45:44 -05:00
* no main loop (or any other threading or initialization requirements)
* cancelation through [`context`](https://golang.org/pkg/context/)
2020-01-09 08:26:58 -05:00
* 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
2021-04-27 20:27:28 -04:00
* High DPI (no manifest required)
* Visual Styles (no manifest required)
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`