From fef4abae44827974e66e19a2029db3dff1d2350f Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 18 May 2018 14:19:11 -0700 Subject: Switch solarized theme automatically --- home.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'home.nix') 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 -- cgit v1.2.3