From 949fe767aab789f269da4b3d9a8b9d2901080980 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 6 Aug 2019 15:16:28 +0200 Subject: Emacs: moodify eyebrowse --- emacs/.emacs.d/main.el | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index 4769039e..c66941c9 100644 --- a/emacs/.emacs.d/main.el +++ b/emacs/.emacs.d/main.el @@ -63,7 +63,22 @@ :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 @@ With two prefix arguments, write out the day and month name." :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 -- cgit 1.4.1