bar height
This commit is contained in:
@@ -51,3 +51,4 @@ if app_config is None:
|
|||||||
|
|
||||||
VINYL = app_config.get("vinyl", {"enable": False})
|
VINYL = app_config.get("vinyl", {"enable": False})
|
||||||
BATTERY = app_config.get("battery", {"enable": False})
|
BATTERY = app_config.get("battery", {"enable": False})
|
||||||
|
BAR_HEIGHT = app_config.get("bar_height", 40)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ from fabric.utils import (
|
|||||||
)
|
)
|
||||||
from fabric.widgets.circularprogressbar import CircularProgressBar
|
from fabric.widgets.circularprogressbar import CircularProgressBar
|
||||||
|
|
||||||
from bar.config import VINYL, BATTERY
|
from bar.config import VINYL, BATTERY, BAR_HEIGHT
|
||||||
|
|
||||||
|
|
||||||
class StatusBar(Window):
|
class StatusBar(Window):
|
||||||
@@ -132,6 +132,9 @@ class StatusBar(Window):
|
|||||||
|
|
||||||
invoke_repeater(1000, self.update_progress_bars)
|
invoke_repeater(1000, self.update_progress_bars)
|
||||||
|
|
||||||
|
# Set the bar height
|
||||||
|
self.set_size_request(-1, BAR_HEIGHT)
|
||||||
|
|
||||||
self.show_all()
|
self.show_all()
|
||||||
|
|
||||||
def update_progress_bars(self):
|
def update_progress_bars(self):
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
border-bottom: solid 2px;
|
border-bottom: solid 2px;
|
||||||
border-color: var(--border-color);
|
border-color: var(--border-color);
|
||||||
background-color: var(--window-bg);
|
background-color: var(--window-bg);
|
||||||
min-height: 28px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#center-container {
|
#center-container {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
bar_height: 42
|
||||||
vinyl:
|
vinyl:
|
||||||
enable: true
|
enable: true
|
||||||
battery:
|
battery:
|
||||||
|
|||||||
@@ -82,11 +82,17 @@
|
|||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
bar_height = lib.mkOption {
|
||||||
|
type = lib.types.int;
|
||||||
|
default = 40;
|
||||||
|
description = "Height of the status bar in pixels";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
default = {
|
default = {
|
||||||
vinyl.enable = false;
|
vinyl.enable = false;
|
||||||
battery.enable = false;
|
battery.enable = false;
|
||||||
|
bar_height = 40;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user