mod activity;
mod alert_sounds;
mod anti_idle;
mod behavior;
mod bell;
use super::SettingsUI;
use super::section::section_matches;
use std::collections::HashSet;
pub fn show(
ui: &mut egui::Ui,
settings: &mut SettingsUI,
changes_this_frame: &mut bool,
collapsed: &mut HashSet<String>,
) {
let query = settings.search_query.trim().to_lowercase();
if section_matches(
&query,
"Bell",
&[
"visual", "audio", "sound", "beep", "volume", "flash", "color",
],
) {
bell::show_bell_section(ui, settings, changes_this_frame, collapsed);
}
if section_matches(
&query,
"Activity",
&[
"activity",
"notify",
"idle",
"inactivity",
"silence",
"threshold",
"session",
"session ended",
"shell exits",
],
) {
activity::show_activity_section(ui, settings, changes_this_frame, collapsed);
}
if section_matches(
&query,
"Alert Sounds",
&[
"alert",
"sound",
"event",
"command",
"tab",
"frequency",
"duration",
"wav",
"ogg",
],
) {
alert_sounds::show_alert_sounds_section(ui, settings, changes_this_frame, collapsed);
}
if section_matches(
&query,
"Behavior",
&[
"suppress",
"focused",
"buffer",
"notification queue",
"suppress when focused",
],
) {
behavior::show_behavior_section(ui, settings, changes_this_frame, collapsed);
}
if section_matches(
&query,
"Anti-Idle",
&[
"anti-idle",
"keep-alive",
"timeout",
"ssh",
"connection",
"keep alive",
],
) {
anti_idle::show_anti_idle_section(ui, settings, changes_this_frame, collapsed);
}
}
pub fn keywords() -> &'static [&'static str] {
&[
"bell",
"visual bell",
"audio bell",
"sound",
"beep",
"volume",
"desktop notification",
"flash color",
"flash colour",
"notification",
"activity",
"activity notification",
"activity threshold",
"inactivity",
"silence",
"silence notification",
"silence threshold",
"session ended",
"shell exits",
"suppress",
"focused",
"suppress notifications",
"buffer",
"max buffer",
"test notification",
"anti-idle",
"anti idle",
"keep-alive",
"keepalive",
"idle",
"timeout",
"ssh timeout",
"connection timeout",
"alert",
"frequency",
"duration",
"sound file",
"custom sound",
"character",
"ascii",
"nul",
"enq",
"esc",
"space",
"wav",
"ogg",
"flac",
]
}