diff --git a/bar/config.py b/bar/config.py index a09ff08..1545f57 100644 --- a/bar/config.py +++ b/bar/config.py @@ -51,3 +51,4 @@ if app_config is None: VINYL = app_config.get("vinyl", {"enable": False}) BATTERY = app_config.get("battery", {"enable": False}) +BAR_HEIGHT = app_config.get("bar_height", 40) diff --git a/bar/modules/bar.py b/bar/modules/bar.py index 074e443..f29b20f 100644 --- a/bar/modules/bar.py +++ b/bar/modules/bar.py @@ -20,7 +20,7 @@ from fabric.utils import ( ) from fabric.widgets.circularprogressbar import CircularProgressBar -from bar.config import VINYL, BATTERY +from bar.config import VINYL, BATTERY, BAR_HEIGHT class StatusBar(Window): @@ -132,6 +132,9 @@ class StatusBar(Window): invoke_repeater(1000, self.update_progress_bars) + # Set the bar height + self.set_size_request(-1, BAR_HEIGHT) + self.show_all() def update_progress_bars(self): diff --git a/bar/styles/bar.css b/bar/styles/bar.css index 3e64cb6..4de027e 100644 --- a/bar/styles/bar.css +++ b/bar/styles/bar.css @@ -3,7 +3,6 @@ border-bottom: solid 2px; border-color: var(--border-color); background-color: var(--window-bg); - min-height: 28px; } #center-container { diff --git a/example.yaml b/example.yaml index 93093c8..c3a07a7 100644 --- a/example.yaml +++ b/example.yaml @@ -1,3 +1,4 @@ +bar_height: 42 vinyl: enable: true battery: diff --git a/flake.nix b/flake.nix index d07472a..4d51c05 100644 --- a/flake.nix +++ b/flake.nix @@ -82,11 +82,17 @@ default = false; }; }; + bar_height = lib.mkOption { + type = lib.types.int; + default = 40; + description = "Height of the status bar in pixels"; + }; }; }; default = { vinyl.enable = false; battery.enable = false; + bar_height = 40; }; }; };