summaryrefslogtreecommitdiff
path: root/linux.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2019-03-23 21:44:05 -0700
committerBen Sima <ben@bsima.me>2019-03-23 21:44:05 -0700
commita121511678df8f07e5f9087ae851671dedfcdc5f (patch)
treeff316588f04c47abbea8183490544b8088d90974 /linux.nix
parent3120037ddbba89ab36009867d5ad3094750a1e12 (diff)
Add themes feature
Diffstat (limited to 'linux.nix')
-rw-r--r--linux.nix19
1 files changed, 15 insertions, 4 deletions
diff --git a/linux.nix b/linux.nix
index 7301016..80dd949 100644
--- a/linux.nix
+++ b/linux.nix
@@ -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;