summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
authorAlan Pearce2017-05-08 14:07:40 +0200
committerAlan Pearce2017-05-08 14:07:40 +0200
commitc84f0d2d15bb70946ef071f6def5f44e0f2656cf (patch)
tree90326f6601d217940a4b57e41c93c198468426aa /emacs
parentb4aa77214316958742e5e45b03a443e5b39d877d (diff)
downloaddotfiles-c84f0d2d15bb70946ef071f6def5f44e0f2656cf.tar.lz
dotfiles-c84f0d2d15bb70946ef071f6def5f44e0f2656cf.tar.zst
dotfiles-c84f0d2d15bb70946ef071f6def5f44e0f2656cf.zip
Emacs: Move window chrome configuration to own block
It's not really related to a specific theme.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.org116
1 files changed, 61 insertions, 55 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 67c842f..668fdb4 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -161,61 +161,7 @@ Let’s try a basic theme.
             (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
@@ -303,6 +249,66 @@ correct, at least for Liberation Mono.
 (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
 
 Highlight what just changed when I undo, yank, and so on.