zenity/README.md
2020-01-19 12:53:20 +00:00

1.7 KiB

Zenity dialogs for Golang, Windows and macOS

GoDoc

This repo includes both a cross-platform Go package providing Zenity-like dialogs, 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:

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?

Requirements:

  • no cgo (see benefits, mostly cross-compilation)
  • no main loop (or other threading requirements)
  • no initialization
  • on Windows:
    • no additional dependencies
      • Explorer shell not required
      • works in Server Core
    • Unicode support
    • WSL/Cygwin/MSYS2 support
  • on macOS:
    • only dependency is osascript (with JXA; html/template makes JavaScript easy to template)
  • on other Unixes:
    • wraps either one of qarma, zenity, matedialog,
      in that order of preference