Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configfile? #36

Closed
RoccoRakete opened this issue Jul 29, 2023 · 5 comments
Closed

Configfile? #36

RoccoRakete opened this issue Jul 29, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@RoccoRakete
Copy link

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

@Jonher937
Copy link

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

@ErikReider ErikReider added the enhancement New feature or request label Aug 2, 2023
@RoccoRakete
Copy link
Author

Ahh perfect! This looks great.

@ErikReider
Copy link
Owner

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

@scientiac
Copy link

scientiac commented Dec 5, 2024

@ErikReider, How do I decrease the Icon size via css?

edited
Found It!

#container > image
    -gtk-icon-transform: scale(0.5);
 }

@Haraven
Copy link

Haraven commented Dec 9, 2024

A wiki for how to customize the various OSD elements would really help.

Currently, I'm stuck trying to figure out how to customize the color and size of the volume progress bar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants