Skip to content

Commit d1f388f

Browse files
committed
feat: add system icon to modeline
1 parent 5a6e88f commit d1f388f

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

README.org

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,19 @@ from: https://github.com/doomemacs/doomemacs/blob/master/lisp/doom-start.el
422422

423423
(defconst sys-is-wsl2 (getenv "WSLENV"))
424424

425+
(defconst my-system-icon (cond
426+
(sys-is-wsl2 "  ")
427+
((eq system-type 'gnu/linux)
428+
"  ")
429+
((eq system-type 'windows-nt)
430+
"  ")
431+
((eq system-type 'darwin)
432+
"  " )
433+
(t
434+
" ? ")))
435+
436+
(setq global-mode-string (append global-mode-string '(my/global-system-icon)))
437+
425438
;; 动态库目录
426439
(defconst my-lib-dir (expand-file-name "lib" user-emacs-directory))
427440
(add-to-list 'load-path my-lib-dir)
@@ -464,10 +477,10 @@ from: https://github.com/doomemacs/doomemacs/blob/master/lisp/doom-start.el
464477

465478
;; 博客相关目录
466479
(if sys-is-windows
467-
(defconst my-blogs-dir (expand-file-name "D:/BaiduSyncdisk/Blogs"))
468-
(if sys-is-wsl2
469-
(defconst my-blogs-dir (expand-file-name "/mnt/d/BaiduSyncdisk/Blogs"))
470-
(defconst my-blogs-dir (expand-file-name "~/BaiduSyncdisk/Blogs"))))
480+
(defconst my-blogs-dir (expand-file-name "D:/BaiduSyncdisk/Blogs"))
481+
(if sys-is-wsl2
482+
(defconst my-blogs-dir (expand-file-name "/mnt/d/BaiduSyncdisk/Blogs"))
483+
(defconst my-blogs-dir (expand-file-name "~/BaiduSyncdisk/Blogs"))))
471484
(defconst my-blogs-org-dir (expand-file-name "org" my-blogs-dir))
472485
(defconst my-blogs-image-dir (expand-file-name "images" my-blogs-dir))
473486

0 commit comments

Comments
 (0)