diff options
author | Ben Sima <ben@bsima.me> | 2019-03-23 21:44:05 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2019-03-23 21:44:05 -0700 |
commit | a121511678df8f07e5f9087ae851671dedfcdc5f (patch) | |
tree | ff316588f04c47abbea8183490544b8088d90974 | |
parent | 3120037ddbba89ab36009867d5ad3094750a1e12 (diff) |
Add themes feature
-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; |