summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2018-02-15 16:39:20 +0100
committerAlan Pearce2018-02-15 16:39:20 +0100
commit549946dbbe021a1cda2c4e88a82786c97c355455 (patch)
tree31aad284e7953cde3b31587379c4426224126935
parent6853e6098c858939515d429cfbdd026f5e22c50e (diff)
downloadnixfiles-549946dbbe021a1cda2c4e88a82786c97c355455.tar.lz
nixfiles-549946dbbe021a1cda2c4e88a82786c97c355455.tar.zst
nixfiles-549946dbbe021a1cda2c4e88a82786c97c355455.zip
Emacs: Automatically resize powerline after setting font
-rw-r--r--emacs/.emacs.d/main.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index 1318d388..66bfed80 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -257,6 +257,10 @@
             (setq powerline-default-separator 'bar
                   powerline-height (* 2  (ceiling (* (default-font-height) (+ 1 (* 2 line-spacing))) 2))
                   spaceline-responsive nil)
+            (define-hook-helper after-setting-font ()
+              :name resize-powerline
+              (setq powerline-height (* 2  (ceiling (* (default-font-height) (+ 1 (* 2 line-spacing))) 2)))
+              (setq-default mode-line-format (spaceline-spacemacs-theme)))
             (setq-default mode-line-format (spaceline-spacemacs-theme))))
 
 ;;;;; Chrome