all repos — archive/dotfiles @ c84f0d2d15bb70946ef071f6def5f44e0f2656cf

Superseded by nixfiles

Emacs: Move window chrome configuration to own block

It's not really related to a specific theme.
Alan Pearce alan@alanpearce.uk
Mon, 08 May 2017 14:07:40 +0200
commit

c84f0d2d15bb70946ef071f6def5f44e0f2656cf

parent

b4aa77214316958742e5e45b03a443e5b39d877d

1 files changed, 61 insertions(+), 55 deletions(-)

jump to
M emacs/.emacs.d/init.orgemacs/.emacs.d/init.org
@@ -161,61 +161,7 @@ (set-face-foreground 'border "#a1b56c")             (set-face-background 'vertical-border "#a1b56c")
             (set-face-foreground 'vertical-border "#a1b56c")
             (set-face-background 'window-divider "#a1b56c")
-            (set-face-foreground 'window-divider "#a1b56c")
-
-            (defvar mode-line-default-format mode-line-format)
-            (defvar mode-line-default-hidden nil
-              "Whether to hide the mode line by default")
-
-            (defun show-mode-line ()
-              (interactive)
-              (setq mode-line-format mode-line-default-format)
-              (when (called-interactively-p 'interactive)
-                (setq-default mode-line-format mode-line-default-format)
-                (setq mode-line-default-hidden nil)))
-            (defun hide-mode-line ()
-              (interactive)
-              (setq mode-line-format nil)
-              (when (called-interactively-p 'interactive)
-                (setq-default mode-line-format nil)
-                (setq mode-line-default-hidden t)))
-
-            (setq-default cursor-in-non-selected-windows nil)
-
-            (defun hide-clutter ()
-              (interactive)
-              (fringe-mode '(4 . 8))
-              (hide-mode-line))
-
-            (defun show-clutter ()
-              (interactive)
-              (fringe-mode '(8 . 8))
-              (show-mode-line))
-            (hide-clutter)
-
-            (when mode-line-default-hidden
-              (call-interactively #'hide-mode-line))
-
-            (setq-default indicate-buffer-boundaries 'left)
-
-            (defun hide-mode-line-if-default-hidden ()
-              (if mode-line-default-hidden
-                  (hide-mode-line)
-                (show-mode-line)))
-
-            (add-to-list 'default-frame-alist '(border-width . 0))
-            (add-to-list 'default-frame-alist '(internal-border-width . 0))
-            (when (eq window-system 'x)
-              (setq window-divider-default-bottom-width 1
-                    window-divider-default-right-width 1
-                    window-divider-default-places t)
-              (setq mode-line-default-hidden t)
-              (window-divider-mode +1))
-
-            (add-hook 'after-change-major-mode-hook #'hide-mode-line-if-default-hidden)
-
-            (add-hook 'minibuffer-setup-hook #'show-mode-line)
-            (add-hook 'minibuffer-exit-hook #'hide-mode-line)))
+            (set-face-foreground 'window-divider "#a1b56c")))
 #+END_SRC
 
 Highlighting quasi-quoted expressions in lisps is quite useful, but I
@@ -301,6 +247,66 @@ (column-number-mode t) (size-indication-mode t)
 
 (setq frame-title-format '("%f" (dired-directory dired-directory)))
+#+END_SRC
+
+** Chrome
+
+Sometimes I like to hide clutter.  Other times, it's useful.
+
+#+BEGIN_SRC emacs-lisp
+(defvar mode-line-default-format mode-line-format)
+(defvar mode-line-default-hidden nil
+  "Whether to hide the mode line by default")
+
+(defun show-mode-line ()
+  (interactive)
+  (setq mode-line-format mode-line-default-format)
+  (when (called-interactively-p 'interactive)
+    (setq-default mode-line-format mode-line-default-format)
+    (setq mode-line-default-hidden nil)))
+(defun hide-mode-line ()
+  (interactive)
+  (setq mode-line-format nil)
+  (when (called-interactively-p 'interactive)
+    (setq-default mode-line-format nil)
+    (setq mode-line-default-hidden t)))
+
+(setq-default cursor-in-non-selected-windows nil)
+
+(defun hide-clutter ()
+  (interactive)
+  (fringe-mode '(4 . 8))
+  (hide-mode-line))
+
+(defun show-clutter ()
+  (interactive)
+  (fringe-mode '(8 . 8))
+  (show-mode-line))
+(hide-clutter)
+
+(when mode-line-default-hidden
+  (call-interactively #'hide-mode-line))
+
+(setq-default indicate-buffer-boundaries 'left)
+
+(defun hide-mode-line-if-default-hidden ()
+  (if mode-line-default-hidden
+      (hide-mode-line)
+    (show-mode-line)))
+
+(add-to-list 'default-frame-alist '(border-width . 0))
+(add-to-list 'default-frame-alist '(internal-border-width . 0))
+(when (eq window-system 'x)
+  (setq window-divider-default-bottom-width 1
+        window-divider-default-right-width 1
+        window-divider-default-places t)
+  (setq mode-line-default-hidden t)
+  (window-divider-mode +1))
+
+(add-hook 'after-change-major-mode-hook #'hide-mode-line-if-default-hidden)
+
+(add-hook 'minibuffer-setup-hook #'show-mode-line)
+(add-hook 'minibuffer-exit-hook #'hide-mode-line)
 #+END_SRC
 
 ** Highlight Changes