zenity-rs
A lightweight, pure Rust implementation for displaying GUI dialogs from the command line. Designed for shell scripts and CLI tools that need simple user interaction.
Features
- Message dialogs: Info, warning, error, and question dialogs
- Input dialogs: Text entry and password input
- Progress dialog: With stdin control and pulsating mode
- File selection: Open/save dialogs with directory navigation
- List selection: Single-select, checklist, and radiolist modes
- Calendar: Date picker dialog
Highlights
- Pure Rust with no GTK/Qt dependencies
- Native X11 and Wayland support
- Small static binary (~1.5MB with musl)
- Automatic theme detection (light/dark)
- Respects system keyboard layout
Installation
Or build from source:
Usage
Message Dialogs
# Information dialog
# Warning dialog
# Error dialog
# Question dialog (Yes/No)
Input Dialogs
# Text entry
# Password input
Progress Dialog
# Static progress
# Pulsating progress
# Controlled via stdin
(
) |
File Selection
# Open file
# Save file
# Select directory
List Selection
# Simple list
# Checklist (multi-select)
# Radiolist (single-select)
Calendar
# Date picker
# With initial date
Common Options
--title=TEXT # Set dialog title
--text=TEXT # Set dialog text/prompt
--timeout=N # Auto-close after N seconds
Exit Codes
| Code | Meaning |
|---|---|
| 0 | OK/Yes clicked, or selection made |
| 1 | Cancel/No clicked |
| 5 | Timeout reached |
| 255 | Dialog was closed (ESC or window close) |
| 100 | Error occurred |
Building
Default (X11 + Wayland)
X11 only
Wayland only
Static binary (musl)
License
MIT