2 releases
new 0.1.1 | Nov 21, 2024 |
---|---|
0.1.0 | Nov 2, 2024 |
#9 in #warnings
281 downloads per month
4KB
Linux Terminal Notify
linux_terminal_notify is a lightweight Rust library for sending terminal notifications on Linux systems. It allows developers to easily send customizable notifications directly to the terminal, enhancing the user experience with real-time alerts.
Features
- Simple API: Easy-to-use functions to send notifications.
- Customizable Messages: Specify different types of notifications (info, warning, error).
- Terminal Colors: Color-coded messages for better visibility.
- Optional Sound Alerts: Support for sound notifications if the terminal supports it.
Installation
Add this to your Cargo.toml
:
[dependencies]
linux_terminal_notify = "0.1.0"
Usage
Here’s a quick example to get you started:
extern crate linux_terminal_notify;
use linux_terminal_notify::{notify, NotificationType};
fn main() {
notify("Build completed.", NotificationType::Info);
notify("Disk space low.", NotificationType::Warning);
notify("Build failed.", NotificationType::Error);
}
Examples
extern crate linux_terminal_notify;
use linux_terminal_notify::{notify, NotificationType};
fn main() {
// Info notification
notify("Deployment successful!", NotificationType::Info);
// Warning notification
notify("Memory usage is high.", NotificationType::Warning);
// Error notification
notify("Unable to connect to database.", NotificationType::Error);
}
License
This project is licensed under the MIT License. See the LICENSE file for details.
Author
bensatlantik