gu

Package Version Hex Docs

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

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.show(err: False)
   let name = case demo {
      Ok(val) -> gu.parse(val)
      Error(_) -> "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