mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-03 03:31:03 +02:00
feat: config option for bar height
This commit is contained in:
parent
dc14cb003f
commit
2e0f033bed
3 changed files with 8 additions and 1 deletions
|
@ -40,6 +40,8 @@ impl Default for BarPosition {
|
|||
pub struct Config {
|
||||
#[serde(default = "default_bar_position")]
|
||||
pub position: BarPosition,
|
||||
#[serde(default = "default_bar_height")]
|
||||
pub height: i32,
|
||||
|
||||
pub left: Option<Vec<ModuleConfig>>,
|
||||
pub center: Option<Vec<ModuleConfig>>,
|
||||
|
@ -52,6 +54,10 @@ const fn default_bar_position() -> BarPosition {
|
|||
BarPosition::Bottom
|
||||
}
|
||||
|
||||
const fn default_bar_height() -> i32 {
|
||||
42
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn load() -> Option<Self> {
|
||||
let config_dir = config_dir().expect("Failed to locate user config dir");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue