Open stardiviner opened 6 years ago
I have a config as following:
;;; GitHub Notifications (Participating) (use-package ghub+ :ensure t :config (defvar github-notifications-number nil) (defun github-notifications () (setq github-notifications-number (length ;; check out documentation of `ghubp-get-notifications'. (ghubp-get-notifications :participating "true") ; from package `ghub+'. ;; (ghub-get "/notifications" '((:participating . "true"))) ;; (ghub-get "/notifications") ))) (run-with-timer 10 600 'github-notifications) (defun *github-notifications () (if (and (active) (> github-notifications-number 0)) (propertize (concat (all-the-icons-faicon "github" :v-adjust 0.05) (format " %s " github-notifications-number)) 'face 'mode-line-data-face))) (defun github-open-notifications-participating () "Open GitHub Notifications/Participating page." (interactive) (browse-url "https://github.com/notifications/participating")) (unless (boundp 'prog-vcs-prefix) (define-prefix-command 'prog-vcs-prefix)) (define-key prog-vcs-prefix (kbd "N") 'github-open-notifications-participating) )
I use function *github-notifications in my custom mode-line-format to show GitHub notifications. How can I do this for sx.el?
*github-notifications
mode-line-format
sx.el
I check out sx-inbox.el source code, but hardly to implement one function by myself (I'm not good enough on Elisp). Only know related functions sx-inbox--print-info and sx-inbox-item-type-unread etc.
sx-inbox.el
sx-inbox--print-info
sx-inbox-item-type-unread
I have a config as following:
I use function
*github-notifications
in my custommode-line-format
to show GitHub notifications. How can I do this forsx.el
?