bar height

This commit is contained in:
2025-09-29 10:51:21 +02:00
parent 7a6eca395d
commit 0ce3d286e2
5 changed files with 12 additions and 2 deletions

View File

@@ -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)

View File

@@ -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):

View File

@@ -3,7 +3,6 @@
border-bottom: solid 2px;
border-color: var(--border-color);
background-color: var(--window-bg);
min-height: 28px;
}
#center-container {

View File

@@ -1,3 +1,4 @@
bar_height: 42
vinyl:
enable: true
battery:

View File

@@ -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;
};
};
};