From 7248e882ab641c62f6b5f749f2685aac59e4fb9f Mon Sep 17 00:00:00 2001 From: User Date: Wed, 24 Jun 2026 08:39:00 +0800 Subject: [PATCH] feat(syncthing): Add syncthing package with custom faces --- lisp/init-kbd-func.el | 3 +++ lisp/init-kbd.el | 3 ++- lisp/init-package.el | 5 +++++ lisp/my-base16-dark-theme.el | 19 ++++++++++++++++++- 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/lisp/init-kbd-func.el b/lisp/init-kbd-func.el index a48e964..49c7c0b 100644 --- a/lisp/init-kbd-func.el +++ b/lisp/init-kbd-func.el @@ -17,6 +17,9 @@ (w32-shell-execute "open" "runemacs.exe") (kill-emacs))) +(defun disable-truncate-lines () + (toggle-truncate-lines 1)) + (defun my/jinx-smart-toggle () "Toggle jinx-mode smartly. Disable jinx-mode if it's enable and global-jinx-mode is disable , otherwise toggle global-jinx-mode." diff --git a/lisp/init-kbd.el b/lisp/init-kbd.el index 9ac5b50..4d15fe3 100644 --- a/lisp/init-kbd.el +++ b/lisp/init-kbd.el @@ -147,7 +147,8 @@ :prefix "C-c x" "e" 'eshell "E" 'eat - "p" 'proced) + "p" 'proced + "s" 'syncthing) ;; scratch buffer (if *is-mac* diff --git a/lisp/init-package.el b/lisp/init-package.el index 1eb08dd..bf1c802 100644 --- a/lisp/init-package.el +++ b/lisp/init-package.el @@ -183,6 +183,11 @@ 'proced-format-alist '(custom user pid ppid sess tree pcpu pmem rss start time state (args comm)))) +;; syncthing +(use-package syncthing + :hook + (syncthing-mode . disable-truncate-lines)) + (provide 'init-package) ;;; init-package.el ends here diff --git a/lisp/my-base16-dark-theme.el b/lisp/my-base16-dark-theme.el index 978da54..2ac1ce1 100644 --- a/lisp/my-base16-dark-theme.el +++ b/lisp/my-base16-dark-theme.el @@ -119,7 +119,24 @@ `(proced-executable ((,class (:foreground ,cyan)))) `(proced-run-status-code ((,class (:foreground ,green)))) `(proced-uninterruptible-sleep-status-code ((,class (:foreground ,red)))) - `(proced-time-colon ((,class (:foreground ,violet))))))) + `(proced-time-colon ((,class (:foreground ,violet)))) + + `(syncthing-bold ((,class (:inherit bold)))) + `(syncthing-italic ((,class (:inherit italic)))) + `(syncthing-my-id ((,class (:foreground ,blue :weight bold)))) + `(syncthing-rate-upload ((,class (:foreground ,green)))) + `(syncthing-rate-download ((,class (:foreground ,blue :weight bold)))) + `(syncthing-uptime ((,class (:foreground ,magenta :wegiht bold)))) + `(syncthing-count-discovery ((,class (:foreground ,blue :weight bold)))) + `(syncthing-count-listeners ((,class (:foreground ,green :weight bold)))) + `(syncthing-count-local-bytes ((,class (:foreground ,cyan :weight bold)))) + `(syncthing-count-local-files ((,class (:inherit default :weight bold)))) + `(syncthing-count-local-folders ((,class (:foreground ,yellow :weight bold)))) + `(syncthing-progress-100 ((,class (:foreground ,green)))) + `(syncthing-progress-75 ((,class (:foreground ,cyan)))) + `(syncthing-progress-50 ((,class (:foreground ,yellow)))) + `(syncthing-progress-25 ((,class (:foreground ,orange)))) + `(syncthing-progress-0 ((,class (:foreground ,red))))))) (provide-theme 'my-base16-dark)