From f63924142cca50e5e5110f7f4eea6d9038f6ec55 Mon Sep 17 00:00:00 2001 From: dp12 Date: Tue, 8 Jan 2019 10:45:25 -0500 Subject: [PATCH] Add party parrot segment --- README.md | 1 + doom-modeline.el | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0ba3e21..44fd816 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ The `doom-modeline` was designed for minimalism, and offers: - An indicator for `LSP` state - An indicator for github notifications - An indicator for buffer position which is compatible with `nyan-mode` +- An indicator for party parrot - Truncated file name, file icon, buffer state and project name in buffer information segment, which is compatible with `projectile` and `project` diff --git a/doom-modeline.el b/doom-modeline.el index 73d0093..8ee4b74 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -55,6 +55,7 @@ ;; - An indicator for LSP state ;; - An indicator for github notifications ;; - An indicator for buffer position which is compatible with nyan-mode +;; - An indicator for party parrot ;; - Truncated file name, file icon, buffer state and project name in buffer ;; information segment, which is compatible with projectile and project ;; @@ -238,6 +239,7 @@ It returns a file name which can be used directly as argument of (declare-function magit-toplevel 'magit-git) (declare-function minions-minor-modes-menu 'minions) (declare-function nyan-create 'nyan-mode) +(declare-function parrot-create 'parrot) (declare-function persp-add-buffer 'persp-mode) (declare-function persp-contain-buffer-p 'persp-mode) (declare-function persp-remove-buffer 'persp-mode) @@ -1741,6 +1743,14 @@ mouse-1: Display Line and Column Mode Menu" mouse-face (:box 1) local-map ,mode-line-column-line-number-mode-map)))) +;; +;; party parrot +;; +(doom-modeline-def-segment parrot + "The party parrot animated icon. Requires `parrot-mode' to be enabled." + (when (bound-and-true-p parrot-mode) + (concat " " (parrot-create) " "))) + ;; ;; evil-state ;; @@ -1956,7 +1966,7 @@ mouse-1: Toggle Debug on Quit" ;; (doom-modeline-def-modeline 'main - '(bar workspace-number window-number evil-state god-state ryo-modal xah-fly-keys matches " " buffer-info remote-host buffer-position " " selection-info) + '(bar workspace-number window-number evil-state god-state ryo-modal xah-fly-keys matches " " buffer-info remote-host buffer-position parrot " " selection-info) '(misc-info persp-name lsp github debug minor-modes input-method buffer-encoding major-mode process vcs checker)) (doom-modeline-def-modeline 'minimal @@ -1964,7 +1974,7 @@ mouse-1: Toggle Debug on Quit" '(media-info major-mode)) (doom-modeline-def-modeline 'special - '(bar window-number evil-state god-state ryo-modal xah-fly-keys matches " " buffer-info-simple buffer-position " " selection-info) + '(bar window-number evil-state god-state ryo-modal xah-fly-keys matches " " buffer-info-simple buffer-position parrot " " selection-info) '(misc-info lsp debug minor-modes input-method buffer-encoding major-mode process checker)) (doom-modeline-def-modeline 'project