summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--src/bar.rs14
-rw-r--r--src/config.rs2
3 files changed, 14 insertions, 3 deletions
diff --git a/README.md b/README.md
index fc0d71d..9b5516b 100644
--- a/README.md
+++ b/README.md
@@ -82,6 +82,7 @@ position = "top" # either "top" or "bottom"
hide_inactive_tags = true
invert_touchpad_scrolling = true
show_layout_name = true
+blend = true # whether tags/blocks colors should blend with bar's background
# WM-specific options
[wm.river]
diff --git a/src/bar.rs b/src/bar.rs
index eeb633d..5f24478 100644
--- a/src/bar.rs
+++ b/src/bar.rs
@@ -118,12 +118,20 @@ impl Bar {
let cairo_ctx = cairo::Context::new(&cairo_surf).expect("cairo context");
cairo_ctx.scale(scale_f, scale_f);
+ if !ss.config.blend {
+ cairo_ctx.set_operator(cairo::Operator::Source);
+ }
+
// Background
- cairo_ctx.save().unwrap();
- cairo_ctx.set_operator(cairo::Operator::Source);
+ if ss.config.blend {
+ cairo_ctx.save().unwrap();
+ cairo_ctx.set_operator(cairo::Operator::Source);
+ }
ss.config.background.apply(&cairo_ctx);
cairo_ctx.paint().unwrap();
- cairo_ctx.restore().unwrap();
+ if ss.config.blend {
+ cairo_ctx.restore().unwrap();
+ }
// Compute tags
if self.tags_computed.is_empty() {
diff --git a/src/config.rs b/src/config.rs
index f6ff47d..382f968 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -43,6 +43,7 @@ pub struct Config {
pub hide_inactive_tags: bool,
pub invert_touchpad_scrolling: bool,
pub show_layout_name: bool,
+ pub blend: bool,
// wm-specific
pub wm: WmConfig,
// overrides
@@ -83,6 +84,7 @@ impl Default for Config {
hide_inactive_tags: true,
invert_touchpad_scrolling: true,
show_layout_name: true,
+ blend: true,
wm: WmConfig {
river: RiverConfig { max_tag: 9 },