Add distinct theme presets and bundle the default Ferese wallpaper

This commit is contained in:
Samuel Onoja committed 2026-09-27 06:10:52 +01:00
1 parent 9e90de4e74
commit 7e96a62e43
14 files changed
+462 -84

No files matched your search

+17
View File
@@ -27,6 +27,23 @@ pub fn config_path() -> Option<PathBuf> {
.map(|p| p.join("ferese/config.kdl"))
}
pub fn default_wallpaper() -> &'static str {
static PATH: std::sync::OnceLock<String> = std::sync::OnceLock::new();
PATH.get_or_init(|| {
let path = std::env::current_exe()
.ok()
.and_then(|path| path.parent().map(|dir| dir.join("wallpapers/ferese.png")))
.filter(|path| path.is_file())
.unwrap_or_else(|| {
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../assets/wallpapers/ferese.png")
});
path.canonicalize()
.unwrap_or(path)
.to_string_lossy()
.into_owned()
})
}
fn field(name: &str, parent: &str) -> String {
if parent == "commands" {
return name.to_owned();