forked from Shinonome/omarchy-nix
Update theme system
This commit is contained in:
@@ -8,16 +8,16 @@ inputs: {
|
||||
|
||||
themes = import ../themes.nix;
|
||||
|
||||
# Handle theme selection - either predefined or custom
|
||||
selectedTheme = if config.omarchy.theme == "custom"
|
||||
then themes.custom
|
||||
# Handle theme selection - either predefined or generated
|
||||
selectedTheme = if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark")
|
||||
then null
|
||||
else themes.${config.omarchy.theme};
|
||||
|
||||
# Generate color scheme - either from predefined or from wallpaper
|
||||
generatedColorScheme = if config.omarchy.theme == "custom"
|
||||
# Generate color scheme from wallpaper for generated themes
|
||||
generatedColorScheme = if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark") || (config.omarchy.theme_overrides ? wallpaper_path)
|
||||
then (inputs.nix-colors.lib.contrib { inherit pkgs; }).colorSchemeFromPicture {
|
||||
path = config.omarchy.customTheme.wallpaperPath;
|
||||
variant = config.omarchy.customTheme.variant;
|
||||
path = config.omarchy.theme_overrides.wallpaper_path;
|
||||
variant = if config.omarchy.theme == "generated_light" then "light" else "dark";
|
||||
}
|
||||
else null;
|
||||
in {
|
||||
@@ -47,7 +47,7 @@ in {
|
||||
};
|
||||
home.packages = packages.homePackages;
|
||||
|
||||
colorScheme = if config.omarchy.theme == "custom"
|
||||
colorScheme = if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark") || (config.omarchy.theme_overrides ? wallpaper_path)
|
||||
then generatedColorScheme
|
||||
else inputs.nix-colors.colorSchemes.${selectedTheme.base16-theme};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user