feat: load and apply output configs
fix: typo chore: update deps cleanup
This commit is contained in:
parent
7317353a32
commit
f3f7d5cfb6
5 changed files with 804 additions and 189 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use cosmic_comp_config::output::{self, OutputsConfig};
|
||||
use cosmic_config::CosmicConfigEntry;
|
||||
use std::{
|
||||
collections::BTreeMap,
|
||||
|
|
@ -23,6 +24,7 @@ pub struct UserData {
|
|||
pub xkb_config_opt: Option<XkbConfig>,
|
||||
pub time_applet_config: TimeAppletConfig,
|
||||
pub accessibility_zoom: ZoomConfig,
|
||||
pub outputs: Option<OutputsConfig>,
|
||||
}
|
||||
|
||||
impl UserData {
|
||||
|
|
@ -175,6 +177,12 @@ impl UserData {
|
|||
}
|
||||
};
|
||||
|
||||
let xdg = xdg::BaseDirectories::new();
|
||||
self.outputs = xdg.get_state_home().map(|mut s| {
|
||||
s.push("cosmic-comp/outputs.ron");
|
||||
output::load_outputs(Some(&s))
|
||||
});
|
||||
|
||||
match cosmic_config::Config::new("com.system76.CosmicAppletTime", TimeAppletConfig::VERSION)
|
||||
{
|
||||
Ok(config_handler) => match TimeAppletConfig::get_entry(&config_handler) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue