Toqozz / wired-notify

Lightweight notification daemon with highly customizable layout blocks, written in Rust.
MIT License
608 stars 28 forks source link

Notification delay #113

Closed YanDoroshenko closed 1 year ago

YanDoroshenko commented 1 year ago

There's a small delay (~200ms) between an action triggering a notification and the notification itself. Most noticeable when changing volume. Doesn't happen with xfce4-notifyd.

Wired version: 0.10.2.

Maybe it has something to do with polling interval?

biopsin commented 1 year ago

Im noticing this too with last release, Ive built from master but not yet tested..

Toqozz commented 1 year ago

Yep, this is very likely a poll interval thing. I haven't tested this, but it probably comes from dbus.rs:


pub fn process_dbus() {
    let conn = get_connection();
    loop {
        match conn.process(Duration::from_millis(1000)) {
            Ok(_) => (),
            Err(e) => eprintln!("DBus Error: {}", e),
        }
    }
}

I've been meaning to make that configurable.

Toqozz commented 1 year ago

Sorry, it's actually this one: https://github.com/Toqozz/wired-notify/blob/f4300acba8180f8fc6babc1a118f9b3753a2b052/src/main.rs#L164

Adding a config option now.

Toqozz commented 1 year ago

Fixed in 73bb268. See idle_poll_interval option in wired.ron.