From 2607a10537dfad88c5aef87ce225d0ee79c147ec Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Fri, 28 Apr 2023 17:15:19 +0200 Subject: [PATCH] Support xresources --- hm_modules/xresources.nix | 37 +++++++++++++++++++++++++++++++++++++ odin/hm.nix | 1 + thor/hm.nix | 1 + 3 files changed, 39 insertions(+) create mode 100644 hm_modules/xresources.nix diff --git a/hm_modules/xresources.nix b/hm_modules/xresources.nix new file mode 100644 index 0000000..b00293b --- /dev/null +++ b/hm_modules/xresources.nix @@ -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 "; + }; +} diff --git a/odin/hm.nix b/odin/hm.nix index 21521cc..68ceeb9 100644 --- a/odin/hm.nix +++ b/odin/hm.nix @@ -117,6 +117,7 @@ ../hm_modules/vim.nix ../hm_modules/webapp.nix ../hm_modules/xidlehook.nix + ../hm_modules/xresources.nix ../hm_modules/zathura.nix ../hm_modules/zellij.nix ]; diff --git a/thor/hm.nix b/thor/hm.nix index 8b16e43..fb5c50d 100644 --- a/thor/hm.nix +++ b/thor/hm.nix @@ -106,6 +106,7 @@ ../hm_modules/vim.nix ../hm_modules/webapp.nix ../hm_modules/xidlehook.nix + ../hm_modules/xresources.nix ../hm_modules/zathura.nix ../hm_modules/zellij.nix ];