diff options
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | src/config.rs | 2 | ||||
| -rw-r--r-- | src/state.rs | 7 |
3 files changed, 8 insertions, 2 deletions
@@ -55,6 +55,7 @@ tag_inactive_fg = "#d79921" tag_inactive_bg = "#282828" font = "JetBrainsMono Nerd Font 10" height = 20 +vertical_margin = 0 separator_width = 0 tags_r = 6 tags_padding = 25 diff --git a/src/config.rs b/src/config.rs index 9770858..88e94c8 100644 --- a/src/config.rs +++ b/src/config.rs @@ -26,6 +26,7 @@ pub struct Config { // font and size pub font: Font, pub height: u32, + pub vertical_margin: u32, pub separator_width: f64, pub tags_r: f64, pub tags_padding: f64, @@ -57,6 +58,7 @@ impl Default for Config { tag_inactive_bg: Color::from_rgba_hex(0x282828ff), font: Font::new("monospace 10"), height: 24, + vertical_margin: 0, separator_width: 2.0, tags_r: 0.0, tags_padding: 25.0, diff --git a/src/state.rs b/src/state.rs index 6844e56..5f4d8b9 100644 --- a/src/state.rs +++ b/src/state.rs @@ -164,8 +164,11 @@ impl State { layer_surface_cb, ); layer_surface.set_size(conn, 0, self.shared_state.config.height); - layer_surface.set_anchor(conn, self.shared_state.config.position.into()); // Top + Left + Right - layer_surface.set_exclusive_zone(conn, self.shared_state.config.height as i32 + 5); // TODO: make the margin configurable + layer_surface.set_anchor(conn, self.shared_state.config.position.into()); + layer_surface.set_exclusive_zone( + conn, + (self.shared_state.config.height + self.shared_state.config.vertical_margin) as i32, + ); // Note: layer_surface is commited when we receive the scale factor of this output |
