mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat(config): allow printing default and computed config (#2521)
* feat: allow printing default and computed config * fix custom modules * actually fix custom modules
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
use crate::config::ModuleConfig;
|
||||
|
||||
use serde::Serialize;
|
||||
use starship_module_config_derive::ModuleConfig;
|
||||
|
||||
#[derive(Clone, ModuleConfig)]
|
||||
#[derive(Clone, ModuleConfig, Serialize)]
|
||||
pub struct BatteryConfig<'a> {
|
||||
pub full_symbol: &'a str,
|
||||
pub charging_symbol: &'a str,
|
||||
@@ -32,7 +33,7 @@ impl<'a> Default for BatteryConfig<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, ModuleConfig)]
|
||||
#[derive(Clone, ModuleConfig, Default, Serialize)]
|
||||
pub struct BatteryDisplayConfig<'a> {
|
||||
pub threshold: i64,
|
||||
pub style: &'a str,
|
||||
|
||||
Reference in New Issue
Block a user