gu

Package Version Hex Docs

gleam add gu
import gu
import gleam/option.{None, Some}

pub fn main() {
  let demo = 
        gu.zenity
        |> gu.set_title("Demo")
        |> gu.new_entry(
           text: Some("What's Your Name?"),
           entry_text: None,
           hide_text: False,
        )
        |> gu.run(False)
  let name = case demo {
     Some(#(_, val)) -> gu.parse(val)
     None -> "Unknown"
  }
  gu.zenity
  |> gu.new_info()
  |> gu.set_title("Demo")
  |> gu.set_text("Hello, " <> name <> "!")
  |> gu.run(False)
}

screenshot

Examples

Links work on GitHub

zenitycode
--calendarcalendar.gleam
--entryentry.gleam
--errorerror.gleam
--infoinfo.gleam
--file-selectionfile_selection.gleam
--listlist.gleam
--notificationnotification.gleam
--questionquestion.gleam
--warningwarning.gleam
--scalescale.gleam
--text-infotext_info.gleam
--color-selectioncolor_selection.gleam
--passwordpassword.gleam
--formsforms.gleam

Further documentation can be found at https://hexdocs.pm/gu.

Development

gleam run -m examples/forms # Run an example
gleam test  # Run the tests
gleam shell # Run an Erlang shell
Search Document