summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorMaxVerevkin <maxxverrr@gmail.com>2023-06-28 10:54:33 +0300
committerMaxVerevkin <maxxverrr@gmail.com>2023-06-28 10:54:33 +0300
commit432b6d66d4635fa70105c2ae6b6e470d0263c6cd (patch)
tree1e3f7086003ed751f49244477f091e7d1b348146 /src/config.rs
parent436d14e65a10965dce1c737b123305f44139e13b (diff)
downloadi3bar-mango-432b6d66d4635fa70105c2ae6b6e470d0263c6cd.tar.gz
Add an option to show any number of tags (not only the first 9)
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/config.rs b/src/config.rs
index 98d7eb1..8465eee 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -11,6 +11,8 @@ use std::{env, fmt};
#[derive(Deserialize, Debug)]
#[serde(deny_unknown_fields, default)]
pub struct Config {
+ // command
+ pub command: Option<String>,
// colors
pub background: Color,
pub color: Color,
@@ -35,18 +37,20 @@ pub struct Config {
pub tags_padding: f64,
pub blocks_r: f64,
pub blocks_overlap: f64,
- // command
- pub command: Option<String>,
// misc
pub position: Position,
pub hide_inactive_tags: bool,
pub invert_touchpad_scrolling: bool,
pub show_layout_name: bool,
+ // wm-specific
+ pub wm: WmConfig,
}
impl Default for Config {
fn default() -> Self {
Self {
+ command: None,
+
// A kind of gruvbox theme
background: Color::from_rgba_hex(0x282828ff),
color: Color::from_rgba_hex(0xffffffff),
@@ -59,6 +63,7 @@ impl Default for Config {
tag_urgent_bg: Color::from_rgba_hex(0xcc241dff),
tag_inactive_fg: Color::from_rgba_hex(0xd79921ff),
tag_inactive_bg: Color::from_rgba_hex(0x282828ff),
+
font: Font::new("monospace 10"),
height: 24,
margin_top: 0,
@@ -70,11 +75,15 @@ impl Default for Config {
tags_padding: 25.0,
blocks_r: 0.0,
blocks_overlap: 0.0,
- command: None,
+
position: Position::Top,
hide_inactive_tags: true,
invert_touchpad_scrolling: true,
show_layout_name: true,
+
+ wm: WmConfig {
+ river: RiverConfig { max_tag: 9 },
+ },
}
}
}
@@ -125,6 +134,16 @@ impl From<Position> for zwlr_layer_surface_v1::Anchor {
}
}
+#[derive(Debug, Deserialize)]
+pub struct WmConfig {
+ pub river: RiverConfig,
+}
+
+#[derive(Debug, Deserialize)]
+pub struct RiverConfig {
+ pub max_tag: u8,
+}
+
#[derive(Debug)]
pub struct Font(pub FontDescription);