Support xresources

This commit is contained in:
Filippo Berto 2023-04-28 17:15:19 +02:00
parent 027f988477
commit 2607a10537
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
3 changed files with 39 additions and 0 deletions

37
hm_modules/xresources.nix Normal file
View file

@ -0,0 +1,37 @@
{ pkgs, ... }:
let
strPalette = with pkgs.rice;
pkgs.lib.nix-rice.palette.toRgbHex { inherit (colorPalette) normal bright primary; };
in
{
home.file.".Xresources" = {
text = ''
Xcursor.theme: "Quogir"
Xcursor.size: 32
*.foreground: ${strPalette.primary.foreground}
*.background: ${strPalette.primary.background}
*.cursorColor: ${strPalette.normal.white}
*.color0: ${strPalette.normal.black}
*.color1: ${strPalette.normal.red}
*.color2: ${strPalette.normal.green}
*.color3: ${strPalette.normal.yellow}
*.color4: ${strPalette.normal.blue}
*.color5: ${strPalette.normal.magenta}
*.color6: ${strPalette.normal.cyan}
*.color7: ${strPalette.normal.white}
*.color8: ${strPalette.bright.black}
*.color9: ${strPalette.bright.red}
*.color10: ${strPalette.bright.green}
*.color11: ${strPalette.bright.yellow}
*.color12: ${strPalette.bright.blue}
*.color13: ${strPalette.bright.magenta}
*.color14: ${strPalette.bright.cyan}
*.color15: ${strPalette.bright.white}
xterm*faceName: ${pkgs.rice.font.monospace.name}
xterm*faceSize: ${toString pkgs.rice.font.monospace.size}
'';
onChange = "${pkgs.xorg.xrdb}/bin/xrdb -merge ~/.Xresources ";
};
}