 (defun td/adaptive-theme (theme &optional no-confirm no-enable)
   "Adapt some faces according to THEME, NO-CONFIRM and NO-ENABLE."
   (unless no-enable
-    (let ((fg (color-lighten-name (face-foreground 'default) 30))
-          (bg (color-darken-name (face-background 'default) 10)))
+    (let ((fg (color-lighten-name
+               (color-desaturate-name (face-foreground 'default) 64) 40))
+          (bg (color-darken-name
+               (color-desaturate-name (face-background 'default) 64) 4)))
       (set-face-attribute 'fringe nil :background nil)
-      (set-face-attribute 'region nil :background bg)
+      (set-face-attribute 'region nil
+                          :background (color-darken-name (face-background 'default) 8))
       (eval-after-load 'nlinum
-        `(set-face-attribute 'linum nil :height 110 :foreground ,fg :background ,bg))
+        `(set-face-attribute 'linum nil
+                             :height 110
+                             :foreground ,fg :background ,bg))
       (eval-after-load 'hl-line
         `(set-face-attribute 'hl-line nil :foreground nil :background ,bg)))))
 


(use-package hideshow
  :defer t
  :init (add-hook 'prog-mode-hook #'hs-minor-mode)
  :bind (("C-c C-n" . hs-toggle-hiding)))

(use-package undo-tree
  :ensure t

(use-package nlinum
  :defer t
  :ensure t
  :init (add-hook 'prog-mode-hook 'nlinum-mode)
  :config (setq nlinum-format " %4d "))

(use-package exec-path-from-shell
