Group -> Grouping

This commit is contained in:
Csaba
2024-11-07 09:42:12 +01:00
parent 80f0214e47
commit fbe5e2c1f7
3 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
use crate::config::Group; use crate::config::Grouping;
use crate::config::KomobarConfig; use crate::config::KomobarConfig;
use crate::config::KomobarTheme; use crate::config::KomobarTheme;
use crate::config::Position; use crate::config::Position;
@@ -319,9 +319,9 @@ impl Komobar {
let mut komobar = Self { let mut komobar = Self {
config: config.clone(), config: config.clone(),
render_config: RenderConfig { render_config: RenderConfig {
_group: match config.group { _grouping: match config.grouping {
None => Group::None, None => Grouping::None,
Some(group) => group, Some(grouping) => grouping,
}, },
}, },
komorebi_notification_state: None, komorebi_notification_state: None,
+2 -2
View File
@@ -29,7 +29,7 @@ pub struct KomobarConfig {
/// Theme /// Theme
pub theme: Option<KomobarTheme>, pub theme: Option<KomobarTheme>,
/// Visual grouping for widgets /// Visual grouping for widgets
pub group: Option<Group>, pub grouping: Option<Grouping>,
/// Left side widgets (ordered left-to-right) /// Left side widgets (ordered left-to-right)
pub left_widgets: Vec<WidgetConfig>, pub left_widgets: Vec<WidgetConfig>,
/// Right side widgets (ordered left-to-right) /// Right side widgets (ordered left-to-right)
@@ -182,6 +182,6 @@ pub enum LabelPrefix {
} }
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema)] #[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema)]
pub enum Group { pub enum Grouping {
None None
} }
+2 -2
View File
@@ -1,6 +1,6 @@
use crate::battery::Battery; use crate::battery::Battery;
use crate::battery::BatteryConfig; use crate::battery::BatteryConfig;
use crate::config::Group; use crate::config::Grouping;
use crate::cpu::Cpu; use crate::cpu::Cpu;
use crate::cpu::CpuConfig; use crate::cpu::CpuConfig;
use crate::date::Date; use crate::date::Date;
@@ -30,7 +30,7 @@ pub trait BarWidget {
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
pub struct RenderConfig { pub struct RenderConfig {
/// Sets how widgets are grouped /// Sets how widgets are grouped
pub _group: Group, pub _grouping: Grouping,
} }
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)]