summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorMax Verevkin <34583604+MaxVerevkin@users.noreply.github.com>2022-11-27 21:25:15 +0200
committerGitHub <noreply@github.com>2022-11-27 21:25:15 +0200
commitd28693c9d293ea7c348c0e9e1a4e89ccff6dcae4 (patch)
tree0794e56251e223388463a84d09616ef47a918bb4 /src/config.rs
parent9ddde2d2ee9833412e39afbd1ed907cdea22f08f (diff)
parentd45a4ef408c0f5a2071194d4c3285f0b7cb27dd0 (diff)
downloadi3bar-mango-d28693c9d293ea7c348c0e9e1a4e89ccff6dcae4.tar.gz
Merge pull request #1 from MaxVerevkin/next
Rewrite using latest walayd libs & implement HiDPI
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs
index 66b8c8a..2af9af0 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -7,8 +7,8 @@ use std::fmt;
use std::fs::read_to_string;
use std::ops::Deref;
-#[derive(Deserialize)]
-#[serde(default)]
+#[derive(Deserialize, Debug)]
+#[serde(deny_unknown_fields, default)]
pub struct Config {
// colors
pub background: Color,
@@ -20,6 +20,8 @@ pub struct Config {
pub tag_focused_bg: Color,
pub tag_urgent_fg: Color,
pub tag_urgent_bg: Color,
+ pub tag_inactive_fg: Color,
+ pub tag_inactive_bg: Color,
// font and size
pub font: Font,
pub height: u32,
@@ -29,6 +31,9 @@ pub struct Config {
pub blocks_overlap: f64,
// command
pub command: Option<String>,
+ // misc
+ pub hide_inactive_tags: bool,
+ pub invert_touchpad_scrolling: bool,
}
impl Default for Config {
@@ -44,6 +49,8 @@ impl Default for Config {
tag_focused_bg: Color::from_rgba_hex(0x689d68ff),
tag_urgent_fg: Color::from_rgba_hex(0x282828ff),
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,
separator_width: 2.0,
@@ -51,6 +58,8 @@ impl Default for Config {
blocks_r: 0.0,
blocks_overlap: 0.0,
command: None,
+ hide_inactive_tags: true,
+ invert_touchpad_scrolling: true,
}
}
}
@@ -79,6 +88,7 @@ impl Config {
}
}
+#[derive(Debug)]
pub struct Font(pub FontDescription);
impl Font {