Zenity dialogs for Golang, Windows, macOS
Go to file
dependabot[bot] 3dfd448277
Bump go.uber.org/goleak from 1.2.1 to 1.3.0 (#81)
Bumps [go.uber.org/goleak](https://github.com/uber-go/goleak) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/uber-go/goleak/releases)
- [Changelog](https://github.com/uber-go/goleak/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/goleak/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: go.uber.org/goleak
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 22:19:59 +01:00
.github Delete codeql.yml 2023-05-22 12:27:03 +01:00
cmd/zenity Issue #62. 2023-08-03 13:57:51 +01:00
internal Issue #62. 2023-08-03 13:57:51 +01:00
scripts Username (macOS). 2022-05-11 18:19:13 +01:00
testdata Custom icons (test). 2022-05-09 15:50:25 +01:00
.gitignore WIP: zenity command (macos). 2020-01-07 00:57:50 +00:00
color_darwin.go Fix window icons (macOS). 2022-06-09 00:31:14 +01:00
color_test.go Add window icons, tests. 2022-05-19 00:04:20 +01:00
color_unix.go Attach, modal (unix). 2022-06-02 11:24:24 +00:00
color_windows.go Parent window id (windows). 2022-06-29 12:50:30 +01:00
color.go Attach, modal (unix). 2022-06-02 11:24:24 +00:00
date_darwin.go Use ptr. 2022-12-15 00:26:34 +00:00
date_test.go Refactor (windows). 2022-06-22 15:14:52 +01:00
date_unix.go Improve compatibility with zenity. 2022-12-20 12:23:21 +00:00
date_windows.go Use ptr. 2022-12-15 00:26:34 +00:00
date.go Use ptr. 2022-12-15 00:26:34 +00:00
entry_darwin.go Fix window icons (macOS). 2022-06-09 00:31:14 +01:00
entry_test.go Add window icons, tests. 2022-05-19 00:04:20 +01:00
entry_unix.go Improve compatibility with zenity. 2022-12-20 12:23:21 +00:00
entry_windows.go Use ptr. 2022-12-15 00:26:34 +00:00
entry.go Attach, modal (unix). 2022-06-02 11:24:24 +00:00
file_darwin.go Support relative paths. 2023-04-12 12:52:10 +01:00
file_filter_test.go File filter tweaks. 2023-06-07 15:13:37 +01:00
file_test.go Parallel tests. 2022-12-15 14:29:56 +00:00
file_unix.go Fix #55. 2023-04-12 11:08:58 +01:00
file_util_test.go Add test case. 2023-04-12 13:36:20 +01:00
file_windows.go Improve error message. 2023-04-12 12:21:09 +01:00
file.go File filter tweaks. 2023-06-07 15:13:37 +01:00
go.mod Bump go.uber.org/goleak from 1.2.1 to 1.3.0 (#81) 2023-10-24 22:19:59 +01:00
go.sum Bump go.uber.org/goleak from 1.2.1 to 1.3.0 (#81) 2023-10-24 22:19:59 +01:00
LICENSE Initial commit 2019-12-10 10:51:21 +00:00
list_darwin.go Errors, documentation. 2022-07-28 00:11:12 +01:00
list_test.go Add window icons, tests. 2022-05-19 00:04:20 +01:00
list_unix.go Improve compatibility with zenity. 2022-12-19 19:49:05 +00:00
list_windows.go Use ptr. 2022-12-15 00:26:34 +00:00
list.go Improve compatibility with zenity. 2022-12-19 19:49:05 +00:00
main_test.go WSL test improvements. 2021-07-29 16:20:50 +01:00
msg_darwin.go Fix window icons (macOS). 2022-06-09 00:31:14 +01:00
msg_test.go Add window icons, tests. 2022-05-19 00:04:20 +01:00
msg_unix.go Attach, modal (unix). 2022-06-02 11:24:24 +00:00
msg_windows.go Quote accelerators (&) on windows. 2022-12-07 14:55:24 +00:00
msg.go Documentation. 2022-12-05 01:32:15 +00:00
notify_darwin.go Use Cut, Fields. 2023-01-10 14:26:14 +00:00
notify_test.go Add window icons, tests. 2022-05-19 00:04:20 +01:00
notify_unix.go Attach, modal (unix). 2022-06-02 11:24:24 +00:00
notify_windows.go Issue #69. 2023-08-03 17:39:22 +01:00
notify.go Refactor. 2021-03-04 12:42:30 +00:00
progress_darwin.go Issue #62. 2023-08-03 13:57:51 +01:00
progress_test.go Add window icons, tests. 2022-05-19 00:04:20 +01:00
progress_unix.go Issue #62. 2023-08-03 13:57:51 +01:00
progress_windows.go Issue #62. 2023-08-03 13:57:51 +01:00
progress.go Issue #62. 2023-08-03 13:57:51 +01:00
pwd_darwin.go Fix window icons (macOS). 2022-06-09 00:31:14 +01:00
pwd_test.go Add window icons, tests. 2022-05-19 00:04:20 +01:00
pwd_unix.go Attach, modal (unix). 2022-06-02 11:24:24 +00:00
pwd_windows.go Use ptr. 2022-12-15 00:26:34 +00:00
pwd.go Errors, documentation. 2022-07-28 00:11:12 +01:00
README.md Coverage action. 2023-01-27 15:26:12 +00:00
util_darwin.go Use ptr. 2022-12-15 00:26:34 +00:00
util_test.go Improve compatibility with zenity. 2022-12-20 12:23:21 +00:00
util_windows.go Icons (windows), see #35. 2022-07-27 00:25:18 +01:00
util.go Improve compatibility with zenity. 2022-12-20 12:23:21 +00:00
zenity_darwin.go Add IsAvailable. 2022-12-14 23:53:30 +00:00
zenity_test.go Improve compatibility with zenity. 2022-12-19 19:49:05 +00:00
zenity_unix.go Add IsAvailable. 2022-12-14 23:53:30 +00:00
zenity_windows.go Add IsAvailable. 2022-12-14 23:53:30 +00:00
zenity.go Issue #62. 2023-08-03 13:57:51 +01:00

Zenity dialogs for Golang, Windows and macOS

Go Reference Go Report Go Coverage Mentioned in Awesome Go

This repo includes:

  • a cross-platform Go package providing Zenity-like dialogs (simple dialogs that interact graphically with the user)
  • a “port” of the 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.

Installing

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.

Using

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.

Why?

Benefits of the Go package:

  • 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 (no manifest required)
    • Visual Styles (no manifest required)
    • WSL/Cygwin/MSYS2 support
  • on macOS:
    • only dependency is osascript
  • on other Unixes:
    • wraps either one of zenity, matedialog, qarma

Credits

I'd like to thank all contributors, but @gen2brain in particular for dlgs, which was instrumental to the Windows port of zenity.