From efb6b91ce19f113fa2b814cebdd6eb7ee97a865a Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Fri, 17 Jan 2025 11:00:54 +0100 Subject: [PATCH] treewide: move foot styling out of module --- .../hm/programs/terminal/emulators/foot.nix | 37 ++++++++++++++- modules/nix/style/modules/foot.nix | 45 ------------------- 2 files changed, 36 insertions(+), 46 deletions(-) delete mode 100644 modules/nix/style/modules/foot.nix diff --git a/modules/hm/programs/terminal/emulators/foot.nix b/modules/hm/programs/terminal/emulators/foot.nix index 685b434..d596e88 100644 --- a/modules/hm/programs/terminal/emulators/foot.nix +++ b/modules/hm/programs/terminal/emulators/foot.nix @@ -3,7 +3,11 @@ config, osConfig, ... -}: { +}: let + styleCfg = osConfig.local.style; + # because someone thought this was a great idea: https://github.com/tinted-theming/schemes/commit/61058a8d2e2bd4482b53d57a68feb56cdb991f0b + palette = builtins.mapAttrs (_: color: lib.removePrefix "#" color) styleCfg.scheme.palette; +in { config = lib.mkIf osConfig.local.modules.hyprland.enable { programs.foot = { enable = true; @@ -13,6 +17,37 @@ font = "monospace:size=14"; shell = "${lib.getExe config.programs.fish.package}"; }; + + colors = with palette; + lib.mkIf styleCfg.enable { + background = base00; + foreground = base05; + + regular0 = base00; + regular1 = base08; + regular2 = base0B; + regular3 = base0A; + regular4 = base0D; + regular5 = base0E; + regular6 = base0C; + regular7 = base05; + + bright0 = base02; + bright1 = base08; + bright2 = base0B; + bright3 = base0A; + bright4 = base0D; + bright5 = base0E; + bright6 = base0C; + bright7 = base07; + + "16" = base09; + "17" = base0F; + "18" = base01; + "19" = base02; + "20" = base04; + "21" = base06; + }; }; }; }; diff --git a/modules/nix/style/modules/foot.nix b/modules/nix/style/modules/foot.nix deleted file mode 100644 index d35e4ae..0000000 --- a/modules/nix/style/modules/foot.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ - lib, - config, - ... -}: let - cfg = config.local.style; -in { - config.home-manager.sharedModules = lib.mkIf cfg.enable [ - { - programs.foot.settings.colors = let - # because someone thought this was a great idea: https://github.com/tinted-theming/schemes/commit/61058a8d2e2bd4482b53d57a68feb56cdb991f0b - palette = builtins.mapAttrs (_: color: lib.removePrefix "#" color) cfg.scheme.palette; - in - with palette; { - background = base00; - foreground = base05; - - regular0 = base00; - regular1 = base08; - regular2 = base0B; - regular3 = base0A; - regular4 = base0D; - regular5 = base0E; - regular6 = base0C; - regular7 = base05; - - bright0 = base02; - bright1 = base08; - bright2 = base0B; - bright3 = base0A; - bright4 = base0D; - bright5 = base0E; - bright6 = base0C; - bright7 = base07; - - "16" = base09; - "17" = base0F; - "18" = base01; - "19" = base02; - "20" = base04; - "21" = base06; - }; - } - ]; -}