#notifications #notify #desktop-notifications #operating-systems #linuxalert #winalert #dbus-notify

bin+lib rsnotifyos

RSNotifyOS is a library for printing alerts on Linux and Windows operating systems. It uses the D-Bus IPC and Subprocess protocol to communicate with the desktop notification system on Linux. Implements a dialog window system to display alerts on both operating systems.

2 releases

0.1.1 Apr 9, 2024
0.1.0 Mar 20, 2024

#194 in GUI

Download history 127/week @ 2024-03-15 20/week @ 2024-03-22 9/week @ 2024-03-29 126/week @ 2024-04-05

282 downloads per month

MIT license

32KB
410 lines

Rust Notification Send (RSNotifyOS)

RSNotifyOS is a library for printing alerts on Linux and Windows operating systems. It uses the D-Bus IPC and Subprocess protocol to communicate with the desktop notification system on Linux, Implements a dialog window system to display alerts on both operating systems.

Usage

Functions Use:

  • Print a notification (linux): command:
extern crate rsnotifyos;
use rsnotifyos::RNotify;
    		
fn main() {
    RNotify::cmd_notify("Rust", "dialog-information", "normal", "Hello Word", "", "", 1000);
}

dbus:

extern crate rsnotifyos;
use rsnotifyos::RNotify;
    		
fn main() {
   RNotify::dbus_notify("RNotification", "Notification", "Hello Word!", "dialog-information", &0, &1000)
}
  • Print an alert message in a window (linux, windows): information:
extern crate rsnotifyos;
use rsnotifyos::RNotify;
       		
fn main() {
   RNotify::alert("INFO","Menssage Rust");
}

error:

extern crate rsnotifyos;
use rsnotifyos::RNotify;
       		
fn main() {
    RNotify::alert("ERROR","Error: Menssage Alert Rust");
}

ref doc/usage.md

Installation

  • build linux:
sudo apt-get install libpango1.0-dev libgdk-pixbuf-2.0-dev libglib2.0-dev libgtk-3-dev libcairo2-dev
git clone https://github.com/frerd7/rsnotifyos.git
cargo build
cargo test

or:

cargo install rnotify
  • build windows:
git clone https://github.com/frerd7/rsnotifyos.git
cargo test

or:

cargo install rnotify
  • debug:
cargo --build --features enable_debug

Autor

Frederick Valdez

Dependencies

~0–4MB
~88K SLoC