Constants¶
Debug and Refresh Settings¶
Themes¶
Constants and types for the Battery Boost application.
THEME = _THEME
module-attribute
¶
Mapping of ThemeName to the corresponding colour scheme.
DEFAULT_THEME = THEME[ThemeName.DARK]
module-attribute
¶
Default theme.
ThemeName
¶
Bases: Enum
Available themes.
Currently available themes
- LIGHT: Light theme
- DARK: Dark theme
Source code in src/battery_boost/constants.py
19 20 21 22 23 24 25 26 27 | |
ThemeKeys
¶
Bases: TypedDict
Colours used in the GUI theme for Battery Boost.
Attributes:
| Name | Type | Description |
|---|---|---|
default_bg |
str
|
Background colour of the main window in normal mode. |
charge_bg |
str
|
Background colour when full charge mode is active. |
text |
str
|
Colour of standard text. |
btn_normal |
str
|
Colour of the button in normal mode. |
btn_active_normal |
str
|
Button colour when pressed in normal mode. |
btn_charge |
str
|
Colour of the button in full-charge mode. |
btn_active_charge |
str
|
Button colour when pressed in full-charge mode. |
btn_discharge |
str
|
Colour of the button when battery is discharging. |
btn_active_discharge |
str
|
Button colour when pressed while discharging. |
btn_discharge_text |
str
|
Text colour for the button while discharging. |
Source code in src/battery_boost/constants.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
Fonts¶
Constants and types for the Battery Boost application.
FontSizeConfig = tuple[tuple[str, int], tuple[str, int], float]
module-attribute
¶
Font size configuration used by the GUI.
Contains
- (font name, size) for the standard UI font
- (font name, size) for the small UI font
- GUI scale factor
FONT_SIZES = _FONT_SIZES
module-attribute
¶
Font configurations for the GUI.
- Keys: size level (1–5)
- Values: tuple of ((standard font, size), (small font, size), scale factor)
Battery State¶
Constants and types for the Battery Boost application.
STATES = _STATES
module-attribute
¶
Mapping of battery state to UI labels and actions.
BatteryState
¶
Bases: Enum
Battery profiles managed by TLP.
Source code in src/battery_boost/constants.py
124 125 126 127 | |
UIState
¶
Bases: TypedDict
Labels and actions for the battery state displayed in the GUI.
Source code in src/battery_boost/constants.py
130 131 132 133 134 | |