mirror of
https://github.com/henrysipp/omarchy-nix.git
synced 2026-06-05 18:29:26 -05:00
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};
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ inputs: {
|
||||
palette = config.colorScheme.palette;
|
||||
convert = inputs.nix-colors.lib.conversions.hexToRGBString;
|
||||
backgroundRgb = "rgb(${convert ", " palette.base00})";
|
||||
foregroundRgb = "rgb(${convert ", " palette.base05})";
|
||||
in {
|
||||
home.file = {
|
||||
".config/waybar/" = {
|
||||
@@ -16,7 +17,7 @@ in {
|
||||
text = ''
|
||||
@define-color background ${backgroundRgb};
|
||||
* {
|
||||
color: white;
|
||||
color: ${foregroundRgb};
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
|
||||
Reference in New Issue
Block a user