fix: watch notifications

This commit is contained in:
galister
2024-03-29 14:09:39 +01:00
parent 106af7dd03
commit 7d987f5cb8
4 changed files with 34 additions and 18 deletions

View File

@@ -66,12 +66,7 @@ fn def_auto() -> Arc<str> {
}
fn def_toast_topics() -> IdMap<ToastTopic, DisplayMethod> {
let mut map = IdMap::new();
map.insert(ToastTopic::System, DisplayMethod::Center);
map.insert(ToastTopic::DesktopNotification, DisplayMethod::Center);
map.insert(ToastTopic::XSNotification, DisplayMethod::Center);
map.insert(ToastTopic::IpdChange, DisplayMethod::Hide);
map
IdMap::new()
}
#[derive(Deserialize, Serialize)]
@@ -94,6 +89,9 @@ pub struct GeneralConfig {
#[serde(default = "def_true")]
pub notifications_sound_enabled: bool,
#[serde(default = "def_toast_topics")]
pub notification_topics: IdMap<ToastTopic, DisplayMethod>,
#[serde(default = "def_true")]
pub keyboard_sound_enabled: bool,
@@ -115,9 +113,6 @@ pub struct GeneralConfig {
#[serde(default = "def_pw_tokens")]
pub pw_tokens: Vec<(String, String)>,
#[serde(default = "def_toast_topics")]
pub toast_topics: IdMap<ToastTopic, DisplayMethod>,
#[serde(default = "def_osc_port")]
pub osc_out_port: u16,