Skip to content

trzsz/zenity

This branch is 29 commits behind ncruces/zenity:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Feb 26, 2024
0af002c · Feb 26, 2024
May 22, 2023
Jan 24, 2024
Feb 26, 2024
May 11, 2022
May 9, 2022
Jan 7, 2020
Jan 24, 2024
Jan 27, 2023
Jun 2, 2022
Jun 8, 2022
May 18, 2022
Jun 2, 2022
Jun 29, 2022
Dec 15, 2022
Dec 15, 2022
Jun 22, 2022
Dec 20, 2022
Feb 23, 2024
Jun 2, 2022
Jun 8, 2022
May 18, 2022
Dec 20, 2022
Feb 23, 2024
Jun 7, 2023
Apr 12, 2023
Jun 7, 2023
Feb 7, 2024
Apr 12, 2023
Apr 12, 2023
Feb 23, 2024
Feb 7, 2024
Feb 7, 2024
Dec 19, 2022
Jul 27, 2022
May 18, 2022
Dec 19, 2022
Feb 23, 2024
Jul 29, 2021
Dec 5, 2022
Jun 8, 2022
May 18, 2022
Jun 2, 2022
Dec 7, 2022
Mar 4, 2021
Jan 10, 2023
May 18, 2022
Jun 2, 2022
Feb 23, 2024
Aug 3, 2023
Aug 3, 2023
May 18, 2022
Aug 3, 2023
Feb 23, 2024
Jul 27, 2022
Jun 8, 2022
May 18, 2022
Jun 2, 2022
Feb 23, 2024
Dec 20, 2022
Dec 15, 2022
Dec 20, 2022
Feb 23, 2024
Aug 3, 2023
Dec 14, 2022
Dec 19, 2022
Dec 14, 2022
Dec 14, 2022

Repository files navigation

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.

About

Zenity dialogs for Golang, Windows, macOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.7%
  • Shell 1.3%