feat(themes): declaratively manage icons, cursors, and dark/light modes
- Automatically detect light mode via 'light.mode' file in theme folder - Read icon theme name from 'icons.theme' file in theme folder - Switch Stylix polarity and iconTheme based on theme selection - Add yaru-theme and bibata-cursors to default packages - Remove obsolete imperative nomarchy-theme-set-gnome script
This commit is contained in:
@@ -117,6 +117,15 @@ in
|
||||
border_size = togglesState.hyprland.border_size or 2;
|
||||
};
|
||||
fonts.monospace = togglesState.font or "JetBrainsMono Nerd Font";
|
||||
|
||||
# Derived properties from the theme directory
|
||||
isLightMode = builtins.pathExists (../../themes + "/${togglesState.theme or "nord"}/light.mode");
|
||||
iconsTheme = let
|
||||
iconsFile = ../../themes + "/${togglesState.theme or "nord"}/icons.theme";
|
||||
in
|
||||
if builtins.pathExists iconsFile
|
||||
then lib.removeSuffix "\n" (builtins.readFile iconsFile)
|
||||
else "Yaru-blue";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user