summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2018-05-18 14:19:11 -0700
committerBen Sima <ben@bsima.me>2018-05-18 14:19:11 -0700
commitfef4abae44827974e66e19a2029db3dff1d2350f (patch)
tree2dafbffe77593d2d2133e1d1c9476751a20d9476
parentbd7b17222ed86337f4d61c6d8e55593a1389ffad (diff)
Switch solarized theme automatically
-rw-r--r--home.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/home.nix b/home.nix
index e45a3d9..f671553 100644
--- a/home.nix
+++ b/home.nix
@@ -109,13 +109,19 @@
"fugitive"
];
settings = {
- background = "light";
ignorecase = true;
expandtab = true;
history = 1000;
tabstop = 4;
};
extraConfig = ''
+ " Auto-switch theme
+ let hour = strftime("%H")
+ if 6 <= hour && hour < 18
+ set background=light
+ else
+ set background=dark
+ endif
colorscheme solarized
filetype plugin indent on
set cuc cul " Crosshair