Add a timeout option to OSD

This commit is contained in:
Alexander Bantyev 2020-09-16 18:54:19 +03:00
parent 95bcf6ae14
commit 0a56ecd002
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5

View File

@ -120,6 +120,8 @@ pub mod notify {
pub urgency: Urgency, pub urgency: Urgency,
pub timeout: i32,
// Progress bar stuff // Progress bar stuff
length: i32, length: i32,
@ -139,6 +141,8 @@ pub mod notify {
let mut config = Config::new("common"); let mut config = Config::new("common");
let timeout = config.get("notification", "default timeout").unwrap_or(-1); // -1 means the default timeout of the notification server
let length = config.get_default("progressbar", "length", 20); let length = config.get_default("progressbar", "length", 20);
let full = config.get_default("progressbar", "full", String::from("")); let full = config.get_default("progressbar", "full", String::from(""));
@ -153,6 +157,7 @@ pub mod notify {
title: None, icon: None, title: None, icon: None,
contents: OSDContents::default(), contents: OSDContents::default(),
urgency: Urgency::Normal, urgency: Urgency::Normal,
timeout,
length, full, empty, start, end, length, full, empty, start, end,
notification notification
}; };