all repos — archive/dotfiles @ 949fe767aab789f269da4b3d9a8b9d2901080980

Superseded by nixfiles

Emacs: moodify eyebrowse
Alan Pearce alan@alanpearce.eu
Tue, 06 Aug 2019 15:16:28 +0200
commit

949fe767aab789f269da4b3d9a8b9d2901080980

parent

11714f9162eb12273f1b241a2dad6ed4f6973385

1 files changed, 18 insertions(+), 1 deletions(-)

jump to
M emacs/.emacs.d/main.elemacs/.emacs.d/main.el
@@ -63,7 +63,22 @@ (use-package moody   :config (progn
             (setq x-underline-at-descent-line t)
             (moody-replace-mode-line-buffer-identification)
-            (moody-replace-vc-mode)))
+            (moody-replace-vc-mode)
+            (with-eval-after-load 'eyebrowse
+              (defvar eyebrowse-lighter-default
+                '(:eval (eyebrowse-mode-line-indicator)))
+              (defvar moody-replace-eyebrowse-lighter
+                '(:eval (moody-tab (eyebrowse-mode-line-indicator) 1 'up)))
+              (defun moody-replace-eyebrowse (&optional reverse)
+                (interactive "P")
+                (if (assoc 'eyebrowse-mode mode-line-misc-info)
+                (setcdr (assoc 'eyebrowse-mode mode-line-misc-info)
+                        (list (if reverse
+                                  eyebrowse-lighter-default
+                                moody-replace-eyebrowse-lighter)))
+                (push (list 'eyebrowse-mode moody-replace-eyebrowse-lighter)
+                      (cdr (last mode-line-misc-info)))))
+              (moody-replace-eyebrowse nil))))
 
 (use-package ns-auto-titlebar
   :if (eq system-type 'darwin)
@@ -184,6 +199,8 @@ (use-package eyebrowse   :after (evil)
   :custom ((eyebrowse-new-workspace #'counsel-projectile-switch-project)
            (eyebrowse-mode t)
+           (eyebrowse-mode-line-left-delimiter "")
+           (eyebrowse-mode-line-right-delimiter "")
            (eyebrowse-mode-line-style 'always))
   :general (:keymaps 'evil-window-map
 	    "0" #'eyebrowse-switch-to-window-config-0