gleam add guimport 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)
}Links work on GitHub
| zenity | code |
|---|---|
| --calendar | calendar.gleam |
| --entry | entry.gleam |
| --error | error.gleam |
| --info | info.gleam |
| --file-selection | file_selection.gleam |
| --list | list.gleam |
| --notification | notification.gleam |
| --question | question.gleam |
| --warning | warning.gleam |
| --scale | scale.gleam |
| --text-info | text_info.gleam |
| --color-selection | color_selection.gleam |
| --password | password.gleam |
| --forms | forms.gleam |
Further documentation can be found at https://hexdocs.pm/gu.
gu was created for the needs of nemo_gleam.
gleam run -m examples/forms # Run an example
gleam test # Run the tests
gleam shell # Run an Erlang shell