Make more theme parts dynamic

Pick Light vs Dark GTK theme based on variant name

Pick correct theme for bat

Team: stop following system theme
This commit is contained in:
Evie Litherland-Smith 2024-06-04 14:24:13 +01:00
parent e670a4e391
commit cfea36f08b
3 changed files with 12 additions and 6 deletions

View file

@ -2,6 +2,7 @@
config,
lib,
pkgs,
catppuccinVariant ? "Mocha",
...
}: {
imports = [
@ -36,7 +37,11 @@
};
gtk = with lib.strings; let
accent = "Lavender";
variant = "Mocha";
variant = catppuccinVariant;
type =
if variant == "Latte"
then "Light"
else "Dark";
in {
enable = true;
iconTheme = {
@ -47,8 +52,8 @@
name = "Papirus-Dark";
};
cursorTheme = {
package = pkgs.catppuccin-cursors."${toLower variant}Dark";
name = "Catppuccin-${variant}-Dark-Cursors";
package = pkgs.catppuccin-cursors."${toLower variant}${type}";
name = "Catppuccin-${variant}-${type}-Cursors";
size = 32;
};
theme = let
@ -59,7 +64,7 @@
size = toLower size;
variant = toLower variant;
};
name = "Catppuccin-${variant}-${size}-${accent}-Dark";
name = "Catppuccin-${variant}-${size}-${accent}-${type}";
};
};
xdg = {

View file

@ -22,7 +22,7 @@
awayOnSystemIdle = true;
closeAppOnCross = true;
electronCLIFlags = lib.mkIf config.wayland.windowManager.sway.enable [["ozone-platform" "wayland"]];
followSystemTheme = true;
followSystemTheme = false;
notificationMethod = "electron";
optInTeamsV2 = true;
spellCheckerLanguages = ["en_GB"];

View file

@ -1,6 +1,7 @@
{
lib,
pkgs,
catppuccinVariant ? "Mocha",
...
}: {
imports = [
@ -26,7 +27,7 @@
bat = {
enable = true;
config = {
theme = "catppuccinMocha";
theme = "catppuccin${catppuccinVariant}";
style = "plain,numbers,changes";
};
};