diff options
-rw-r--r-- | linux.nix | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -2,6 +2,17 @@ let solarized-xresources = ./xresources; + theme = builtins.getEnv "XTHEME"; + colors = { + "dark" = { + background = "#292b2e"; + foreground = "#b2b2b2"; + }; + "light" = { + background = "#fbf8ef"; + foreground = "#655370"; + }; + }; in { imports = [ ./common.nix ./email.nix ]; @@ -16,7 +27,7 @@ in "XTerm*metaSendsEscape" = true; "XTerm*utf8" = true; }; - extraConfig = builtins.readFile(solarized-xresources + "/Xresources.light"); + extraConfig = builtins.readFile(solarized-xresources + "/Xresources." + theme); }; services = { @@ -33,13 +44,13 @@ in width = "100%"; height = "2%"; radius = 0; - background = "#fdf6e3"; # solarized base3 - foreground = "#657b83"; # solarized base00 + background = colors."${theme}".background; + foreground = colors."${theme}".foreground; tray-position = "right"; tray-detached = false; tray-maxsize = 16; tray-transparent = false; - tray-background = "#fdf6e3"; + tray-background = colors."${theme}".background; tray-offset-x = 0; tray-offset-y = 0; tray-padding = 0; |