Coder Social home page Coder Social logo

Comments (22)

seagle0128 avatar seagle0128 commented on July 17, 2024

Thanks for liking doom-modeline!

I have to say ghub+ is not a popular package although I am using it with magit. I need some time to investigate and make the decision.

Regarding doom-themes, are you using Emacs in terminal or with GUI? That's different. If you are using Emacs GUI, please refer to my config: https://github.com/seagle0128/.emacs.d/blob/6018a1592457b2f3c77961149a7c0b14cbe88991/lisp/init-ui.el#L98 . I may be able to help if more details are provided.

from doom-modeline.

seagle0128 avatar seagle0128 commented on July 17, 2024

Following by the snippets you provide, I create a new segment of Github notifications. But honestly I couldn't test a full functionality. I don't know if ghubp-get-notifications works well in the timer, and if the performance is good. Hope fetching github notifications don't slow down Emacs, or I have to disable it by default.

Please trial and help to test. Thanks in advance!

Screenthot

github

Customization

;; Whether display github notifications or not.
(setq doom-modeline-github t)

;; The interval of checking github.
(setq doom-modeline-github-interval (* 30 60))

from doom-modeline.

seagle0128 avatar seagle0128 commented on July 17, 2024

I did some tests and got the notifications number from github, but disappear a few minutes. ghubp-get-notifications returns errors after the first success. I have no idea if it's as designed, but it seems work as expected in mode-line. The performance is not good. It cost huge CPU while fetching from github, but I think it's fine since it's triggered every 30 min.

I am waiting for more feedbacks.

from doom-modeline.

stardiviner avatar stardiviner commented on July 17, 2024

Sorry for late response, I cloned repo for testing latest commits. Need wait for participation notifications on my GitHub account to test. So feedback maybe later.

About the doom-themes, I applied following config:

(use-package doom-themes
  :ensure t
  :no-require t
  :config (load-theme 'doom-one t)
  ;; Enable flashing mode-line on errors
  (doom-themes-visual-bell-config)

  ;; Enable custom neotree theme (all-the-icons must be installed!)
  (doom-themes-neotree-config)
  ;; or for treemacs users
  (doom-themes-treemacs-config)

  ;; Corrects (and improves) org-mode's native fontification.
  (doom-themes-org-config))

(use-package solaire-mode
  :ensure t
  :hook (((change-major-mode after-revert ediff-prepare-buffer) . turn-on-solaire-mode)
         (minibuffer-setup . solaire-mode-in-minibuffer)
         (after-load-theme . solaire-mode-swap-bg)))

Here is my screenshot:

image

from doom-modeline.

stardiviner avatar stardiviner commented on July 17, 2024

And I found the flycheck segment is partially hidden.

As in this screenshot:

image

from doom-modeline.

seagle0128 avatar seagle0128 commented on July 17, 2024

The new screenshot above looks as good as mine, except the icons of treemacs.

image

With (doom-themes-treemacs-config), the icons will be changed to atom style.

About the flycheck segment issue, I revert my recent change for it. It works well on macOS, but seems not on Linux. Please check the latest version.

BTW, I can open a new issue in your repo for testing the notification feature 😄

from doom-modeline.

stardiviner avatar stardiviner commented on July 17, 2024

I guess the slight color difference is because system reason. seems macOS has better rendering. Close this issue now.

from doom-modeline.

TxGVNN avatar TxGVNN commented on July 17, 2024

Hi @seagle0128 I wonder if I you continue to add more features (as I see it's feature-bloat) the doom-modeline is still fast or slow a bit?

from doom-modeline.

seagle0128 avatar seagle0128 commented on July 17, 2024

@TxGVNN It depends. If the feature brings big performance impact, I won't. And I am always trying to add enablers for the segments. You can choose to enable or disable.

Regarding this feature, frankly I implemented since I may use it in my daily work. So far it's still fast according my test.

from doom-modeline.

stardiviner avatar stardiviner commented on July 17, 2024

Seems the segment has lot of reduntant running process to access the API.
Here is the screenshot:

image

from doom-modeline.

seagle0128 avatar seagle0128 commented on July 17, 2024

@stardiviner Are all processes alive? And exist in list-process also? It seems not happen on macOS.

from doom-modeline.

stardiviner avatar stardiviner commented on July 17, 2024

Yes, all processes alive, and they are from list-process. I'm using Arch Linux.

from doom-modeline.

seagle0128 avatar seagle0128 commented on July 17, 2024

@stardiviner maybe need to report to ghub+?

from doom-modeline.

stardiviner avatar stardiviner commented on July 17, 2024

Recently, I checked out this multiple connections issue, I found might because that time my network not avialbe, so that multiple connections not closed. Anyway, now it works fine. Thanks @seagle0128

from doom-modeline.

seagle0128 avatar seagle0128 commented on July 17, 2024

Welcome. Glad to know! Thanks for the update.

from doom-modeline.

seagle0128 avatar seagle0128 commented on July 17, 2024

@stardiviner I reimplemented this feature with async and ghub. If you are using magit, all packages are ready. ghub+ can be dropped now. Moreover, the checking is asynchronous so won't block the typing. Better experience!

from doom-modeline.

stardiviner avatar stardiviner commented on July 17, 2024

@seagle0128 Wow! That's awesome, thanks. :)

from doom-modeline.

edkolev avatar edkolev commented on July 17, 2024

I don't want the github segment - would it be possible to run this code only if the github segment is in the modeline?

(run-with-timer 30
                doom-modeline-github-interval
                #'doom-modeline--github-fetch-notifications)

I can set (setq doom-modeline-github nil), however, the above snippet will still be executed.

from doom-modeline.

seagle0128 avatar seagle0128 commented on July 17, 2024

@edkolev Yes, it's possible. The fetching action in the anonymous timer is executed every 30 minutes. If doom-modeline-github is nil, nothing to do and then exits. If just starting the timer when doom-modeline-github is t, you have to restart Emacs after change doom-modeline-github. Do you have any better idea?

from doom-modeline.

seagle0128 avatar seagle0128 commented on July 17, 2024

@edkolev I have an idea and submitted the changes. But only support the runtime change of doom-modeline-github on 26+. On 25, Emacs need to be restarted to take effect after doom-modeline-github is changed.

from doom-modeline.

edkolev avatar edkolev commented on July 17, 2024

Thanks, much better - no code will be executed when github segment is disabled!

However, add-variable-watcher seems like an overkill, I think it's perfectly fine for the user to restart emacs when changing this variable.

from doom-modeline.

seagle0128 avatar seagle0128 commented on July 17, 2024

Thanks for the feedback and comments. I will keep add-variable-watcher for debugging for now.

from doom-modeline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.