From 3d0eaba984a697621821aeb2f80e8c2a3dbcca96 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 6 Apr 2026 15:23:53 -0700 Subject: yoshi-mode-line: Update - Add icons for certain modes: ‘org-journal’, ‘php’, ‘emacs-lisp’, and ‘magit’. - Add spaces around the mode line buffer identifier. - Show the major mode in the right-side of the mode line only. --- icons/emacs.svg | 286 ++++++++++++++++ icons/magit.svg | 34 ++ icons/org-journal.svg | 906 ++++++++++++++++++++++++++++++++++++++++++++++++++ icons/php.svg | 96 ++++++ yoshi-mode-line.el | 21 +- 5 files changed, 1342 insertions(+), 1 deletion(-) create mode 100644 icons/emacs.svg create mode 100644 icons/magit.svg create mode 100644 icons/org-journal.svg create mode 100644 icons/php.svg diff --git a/icons/emacs.svg b/icons/emacs.svg new file mode 100644 index 0000000..3868024 --- /dev/null +++ b/icons/emacs.svg @@ -0,0 +1,286 @@ + +image/svg+xml diff --git a/icons/magit.svg b/icons/magit.svg new file mode 100644 index 0000000..2ea4518 --- /dev/null +++ b/icons/magit.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/org-journal.svg b/icons/org-journal.svg new file mode 100644 index 0000000..ed89648 --- /dev/null +++ b/icons/org-journal.svg @@ -0,0 +1,906 @@ + + + + + Org-Journal icon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Openclipart + + + Org-Journal icon + 2018-12-0 + Icon/logo for the Emacs “org-journal” mode. +By Tina Russell, based on original clipart by gsagri04, and incorporating the Org Mode unicorn art by Christophe Bataillon and Greg Newman. (The Org Mode unicorn was originally conceived by Bastien Guerry.) +The journal clipart is in the public domain, while the unicorn art is licensed under the GNU General Public License version 2 or later, so this image is also licensed under the GNU GPL version 2 or later. +GPL version 2: http://www.gnu.org/licenses/gpl-2.0.html +GPL current version: http://www.gnu.org/licenses/gpl.html +Original clipart: https://openclipart.org/detail/144781/diary-by-gsagri04 +Org Mode unicorn art: https://commons.wikimedia.org/wiki/File:Org-mode-unicorn.svg + + + + Tina Russell + + + + + emacs + org + org-mode + org-journal + journal + diary + unicorn + + + + + Tina Russell, gsagri04, Christophe Bataillon, Greg Newman + + + + + + diff --git a/icons/php.svg b/icons/php.svg new file mode 100644 index 0000000..a99aea3 --- /dev/null +++ b/icons/php.svg @@ -0,0 +1,96 @@ + + + Official PHP Logo + + + + image/svg+xml + + Official PHP Logo + + + Colin Viebrock + + + + + + + + + + + + Copyright Colin Viebrock 1997 - All rights reserved. + + + 1997 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/yoshi-mode-line.el b/yoshi-mode-line.el index f84e1a4..840bfb9 100644 --- a/yoshi-mode-line.el +++ b/yoshi-mode-line.el @@ -69,11 +69,30 @@ (propertize "git" 'display `(image :type svg :file ,(expand-file-name "git-svgrepo-com.svg" yoshi-mode-line-icons-dir) :ascent center :height ,(window-default-font-height))))) (t (if backend (symbol-name backend) ""))))) +(defun yoshi-mode-line-mode-name () + "Display the current mode in a nice way." + (cond + ((derived-mode-p '(org-journal-mode)) + (propertize mode-name 'display `(image :type svg :file ,(expand-file-name "org-journal.svg" yoshi-mode-line-icons-dir) :ascent center :height ,(window-default-font-height)))) + ((derived-mode-p '(php-mode)) + (propertize mode-name 'display `(image :type svg :file ,(expand-file-name "php.svg" yoshi-mode-line-icons-dir) :ascent center :height ,(window-default-font-height)))) + ((derived-mode-p '(emacs-lisp-mode)) + (propertize mode-name 'display `(image :type svg :file ,(expand-file-name "emacs.svg" yoshi-mode-line-icons-dir) :ascent center :height ,(window-default-font-height)))) + ((derived-mode-p '(magit-mode)) + (propertize mode-name 'display `(image :type svg :file ,(expand-file-name "magit.svg" yoshi-mode-line-icons-dir) :ascent center :height ,(window-default-font-height)))) + (t + mode-name))) + (setq vc-display-status nil) +(setq-default mode-line-buffer-identification + (list + (apply 'propertize " %b " (text-properties-at 0 (car mode-line-buffer-identification))))) (setq-default mode-line-format `("%e" mode-line-front-space (:eval (yoshi-mode-line-buffer-status-display)) " %z" ,@(cdr (cddadr (car (get 'mode-line-format 'standard-value)))) mode-line-format-right-align - mode-name " " (:eval (yoshi-mode-line-vc-display)) mode-line-front-space)) + (:eval (yoshi-mode-line-mode-name)) " " (:eval (yoshi-mode-line-vc-display)) mode-line-front-space)) +;;; Remove the major mode from the main mode line area. +(setq mode-line-modes (seq-remove-at-position mode-line-modes 3)) (provide 'yoshi-mode-line) ;;; yoshi-mode-line.el ends here -- cgit v1.3-2-g0d8e