improv(cosmic-config): use notifier debouncer on inotify watchers

This commit is contained in:
Michael Aaron Murphy 2025-06-23 17:13:58 +02:00
parent 5be9611c8a
commit 90ad3e9e1b
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
3 changed files with 14 additions and 10 deletions

View file

@ -1,13 +1,14 @@
use iced_futures::futures::{SinkExt, Stream};
use iced_futures::{futures::channel::mpsc, stream};
use notify::RecommendedWatcher;
use notify_debouncer_full::{Debouncer, RecommendedCache};
use std::{borrow::Cow, hash::Hash};
use crate::{Config, CosmicConfigEntry};
pub enum ConfigState<T> {
Init(Cow<'static, str>, u64, bool),
Waiting(T, RecommendedWatcher, mpsc::Receiver<Vec<String>>, Config),
Waiting(T, Debouncer<RecommendedWatcher, RecommendedCache>, mpsc::Receiver<Vec<String>>, Config),
Failed,
}