cosmic-config-derive: automatically generate setters

This commit is contained in:
Jeremy Soller 2024-01-12 09:39:35 -07:00
parent 8e0e8d3f87
commit 5ae1ac2abd
No known key found for this signature in database
GPG key ID: DCFCA852D3906975
2 changed files with 25 additions and 5 deletions

View file

@ -35,11 +35,6 @@ impl ThemeMode {
1
}
/// Set auto-switch from light to dark mode
pub fn set_auto_switch(config: &Config, value: bool) -> Result<(), cosmic_config::Error> {
config.set("auto_switch", value)
}
/// Get the config for the theme mode
pub fn config() -> Result<Config, cosmic_config::Error> {
Config::new(THEME_MODE_ID, Self::version())