From 0939fec6f4360848c16e691973a139166815ff5e Mon Sep 17 00:00:00 2001 From: Blendoit Date: Tue, 10 Nov 2020 19:00:28 -0800 Subject: Reorganize header definition logic. --- smart-documents.org | 76 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 24 deletions(-) diff --git a/smart-documents.org b/smart-documents.org index f715448..7722df6 100644 --- a/smart-documents.org +++ b/smart-documents.org @@ -1320,30 +1320,58 @@ In Org mode, the document header line will be the title of the document we are working on currently. #+BEGIN_SRC emacs-lisp :tangle yes - (setq-default header-line-format - (list - (propertize "..." 'display sd-icons-blue-ellipsis) - '(:eval - (list - (if (eq (length (window-list)) 1) - (propertize " ↤ " 'mouse-face 'highlight - 'face 'org-special-keyword - 'local-map 'previous-buffer - 'help-echo "Return to previous window.") - (list (propertize " ❌ " 'mouse-face 'org-todo - 'face 'org-special-keyword - 'help-echo "Close this window.") - (propertize " ⇱" 'mouse-face 'highlight - 'face 'org-special-keyword - 'help-echo "Maximize this window.") - (propertize "⇲ " 'mouse-face 'highlight - 'face 'org-special-keyword - 'help-echo "Minimize this window."))) - (if (string-equal major-mode "org-mode") - (org-property-value "TITLE") - (buffer-name)))))) - ;; Ensure our icon is animated on start - (image-animate sd-icons-blue-ellipsis 0 t) + (setq sd-header-gnu-linux + (list + (propertize "..." 'display sd-icons-blue-ellipsis) + '(:eval + (list + (if (eq (length (window-list)) 1) + (propertize " ↤ " 'mouse-face 'highlight + 'face 'org-special-keyword + 'local-map 'previous-buffer + 'help-echo "Return to previous window.") + (list (propertize " ❌ " 'mouse-face 'org-todo + 'face 'org-special-keyword + 'help-echo "Close this window.") + (propertize " ⇱" 'mouse-face 'highlight + 'face 'org-special-keyword + 'help-echo "Maximize this window.") + (propertize "⇲ " 'mouse-face 'highlight + 'face 'org-special-keyword + 'help-echo "Minimize this window."))) + (if (string-equal major-mode "org-mode") + (org-property-value "TITLE") + (buffer-name)))))) + + (setq sd-header-windows-nt + (list + '(:eval + (list + (if (eq (length (window-list)) 1) + (propertize " ↤ " 'mouse-face 'highlight + 'face 'org-special-keyword + 'local-map 'previous-buffer + 'help-echo "Return to previous window.") + (list (propertize " ❌ " 'mouse-face 'org-todo + 'face 'org-special-keyword + 'help-echo "Close this window.") + (propertize " ⇱" 'mouse-face 'highlight + 'face 'org-special-keyword + 'help-echo "Maximize this window.") + (propertize "⇲ " 'mouse-face 'highlight + 'face 'org-special-keyword + 'help-echo "Minimize this window."))) + (if (string-equal major-mode "org-mode") + (org-property-value "TITLE") + (buffer-name)))))) + + (cond ((string-equal system-type "windows-nt") + (setq header-line-format sd-header-windows-nt)) + ((string-equal system-type "gnu'linux") + (setq header-line-format sd-header-gnu-linux))) + + ;; Ensure our icons are animated on start + (image-animate sd-icons-blue-ellipsis 0 t) #+END_SRC **** Mode line -- cgit v1.2.3