gu

Package Version Hex Docs

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

pub fn main() {
   let name =
      gu.zenity
      |> gu.new_entry(
         text: Some("What's Your Name?"),
         entry_text: None,
         hide_text: False,
      )
      |> gu.set_title("Demo")
      |> gu.prompt()
      |> result.unwrap("Unknown")

   gu.zenity
   |> gu.new_info()
   |> gu.set_title("Demo")
   |> gu.set_text("Hello, " <> name <> "!")
   |> gu.show(True)
}

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.

gu was created for the needs of nemo_gleam.

Development

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