From f123771bd968cd1ac34a9f655a793de9c7bce7e6 Mon Sep 17 00:00:00 2001 From: deinferno <14363193+deinferno@users.noreply.github.com> Date: Tue, 21 Feb 2023 15:31:38 +0000 Subject: [PATCH] Add a xresources module (#38) Co-authored-by: Daniel Thwaites --- modules/xresources/hm.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 modules/xresources/hm.nix diff --git a/modules/xresources/hm.nix b/modules/xresources/hm.nix new file mode 100644 index 00000000..2e565425 --- /dev/null +++ b/modules/xresources/hm.nix @@ -0,0 +1,28 @@ +{ pkgs, config, lib, ... }: + +with config.stylix.fonts; + +let + themeFile = config.lib.stylix.colors { + templateRepo = pkgs.fetchFromGitHub { + owner = "tinted-theming"; + repo = "base16-xresources"; + rev = "6711cf4fa61e903e52ef6eac186b83e04a0397d8"; + sha256 = "sha256-WazWviLhQRCyF9EBi2IDn9h8wrKc00PpqtltFDpUP5Q="; + }; + }; +in +{ + options.stylix.targets.xresources.enable = + config.lib.stylix.mkEnableTarget "Xresources" true; + + config = lib.mkIf config.stylix.targets.xresources.enable { + xresources = { + properties = { + "*.faceName" = monospace.name; + "*.renderFont" = true; + }; + extraConfig = builtins.readFile themeFile; + }; + }; +}