diff options
author | Blendoit <blendoit@gmail.com> | 2020-11-10 19:00:28 -0800 |
---|---|---|
committer | Blendoit <blendoit@gmail.com> | 2020-11-10 19:00:28 -0800 |
commit | 0939fec6f4360848c16e691973a139166815ff5e (patch) | |
tree | 3453d93230afaac8de482f99111cddb41e95be1f | |
parent | 0d6b56cb8d97c2ea7e865e5abf00913bfdabf547 (diff) |
Reorganize header definition logic.
-rw-r--r-- | smart-documents.org | 76 |
1 files 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 |