ErikReider/SwayOSD

Configfile?

RoccoRakete opened this issue · 3 comments

Is there any config file to configure it's look? Or do I miss something?

It will try to load a user provided style.css on startup:

SwayOSD/src/main.rs

Lines 54 to 66 in 1add33d

// Try loading the users CSS theme
if let Some(user_config_path) = user_style_path() {
let user_provider = CssProvider::new();
user_provider
.load_from_path(&user_config_path)
.expect("Failed loading user defined style.css");
StyleContext::add_provider_for_screen(
&screen,
&user_provider,
gtk::STYLE_PROVIDER_PRIORITY_APPLICATION as u32,
);
println!("Loaded user defined CSS file");
}

Path is taken from here:

SwayOSD/src/utils.rs

Lines 374 to 380 in 1add33d

pub fn user_style_path() -> Option<String> {
let path = user_config_dir().join("swayosd/style.css");
if path.exists() {
return path.to_str().map(|s| s.to_string());
}
None
}

Which would probably equate to ~/.config/swayosd/style.css

Ahh perfect! This looks great.

Oh! I misread the issue. You were looking for a CSS file to customize! Closing due to it already being added :)