summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorcashmere <cashmere@autistici.org>2026-07-29 11:31:51 +0200
committercashmere <cashmere@autistici.org>2026-07-29 11:31:51 +0200
commitde596d4fca9ca54f9248e788685eee1820bb2381 (patch)
tree4ed9f82251f45c94d28e836ede83c87f67b0f917 /src/config.rs
parent5b77a6d8f19500eee21a497ce84db538ded05c00 (diff)
downloadi3bar-mango-de596d4fca9ca54f9248e788685eee1820bb2381.tar.gz
configurable focused window widget, tray hidden list, global coords for tray context menu
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/config.rs b/src/config.rs
index f93d7a8..4e41069 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -46,10 +46,11 @@ pub struct Config {
pub invert_touchpad_scrolling: bool,
pub show_tags: bool,
pub show_layout_name: bool,
- pub show_focused_window: bool,
pub blend: bool,
pub show_mode: bool,
pub start_hidden: bool,
+ // focused window
+ pub focused_window: FocusedWindowConfig,
// tray
pub tray: TrayConfig,
// wm-specific
@@ -95,11 +96,11 @@ impl Default for Config {
invert_touchpad_scrolling: true,
show_tags: true,
show_layout_name: true,
- show_focused_window: true,
blend: true,
show_mode: true,
start_hidden: false,
+ focused_window: FocusedWindowConfig::default(),
tray: TrayConfig::default(),
wm: WmConfig {
@@ -193,7 +194,7 @@ impl From<Layer> for zwlr_layer_shell_v1::Layer {
}
}
-#[derive(Deserialize, Debug, Clone, Copy)]
+#[derive(Deserialize, Debug, Clone)]
#[serde(deny_unknown_fields, default)]
pub struct TrayConfig {
pub enabled: bool,
@@ -201,6 +202,7 @@ pub struct TrayConfig {
pub show_icon: bool,
pub show_name: bool,
pub show_description: bool,
+ pub hidden: Vec<String>,
}
impl Default for TrayConfig {
@@ -211,6 +213,27 @@ impl Default for TrayConfig {
show_icon: true,
show_name: true,
show_description: false,
+ hidden: Vec::new(),
+ }
+ }
+}
+
+#[derive(Deserialize, Debug, Clone, Copy)]
+#[serde(deny_unknown_fields, default)]
+pub struct FocusedWindowConfig {
+ pub enabled: bool,
+ pub show_icon: bool,
+ pub show_app_id: bool,
+ pub show_title: bool,
+}
+
+impl Default for FocusedWindowConfig {
+ fn default() -> Self {
+ Self {
+ enabled: true,
+ show_icon: true,
+ show_app_id: true,
+ show_title: true,
}
}
}