-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ef-themes-select empty until themes are loaded #2
Comments
Hello @iris-garcia! This is not intended behaviour. I will see to it now and report back to you. |
I notice they are all present if I use |
@theherk I think the themes are not added until they are actually loaded. |
Thanks to Iris Garcia for informing me that the were not registered as "known" before. This was done in issue 2 on the GitHub mirror: <#2>. The code I am adding here needs to be reviewed to simplify all the internal functions. Thought it has been a very long day (again), so I will do that tomorrow.
@iris-garcia I just pushed the change. Yes, @theherk is correct in that I have changed it now. I believe it works properly. Please give it a try. I still plan to refine some of the internal functions in the interest of simplicity/correctness. Though that will have to wait until tomorrow morning. |
Thank you for the quick response @protesilaos, I think the logic is good, but maybe you placed the enabling of themes function in the wrong place, I still don't see the candidates (It can also be an issue in my environment). |
Thanks to Iris Garcia for pointing it out in issue 2 over at the GitHub mirror: <#2>.
Mea culpa! I only added it to one command, but not the other. I pushed a change now. |
I have a suggestion, can I open a PR? |
Yes, sure. Though, if possible, keep the change below 15 lines. Otherwise you need to assign copyright to the Free Software Foundation. |
I can confirm that this issue is fixed, happy to close it, however I see a new one with |
I just pushed commit Here is what I am loading at startup and both (require 'ef-themes)
;; The `ef-themes' provide lots of themes. I want to pick one at
;; random when I start Emacs: the `ef-themes-load-random' does just
;; that (it can be called interactively as well). I just check with
;; GNOME to determine if the choice should be about a light or a dark
;; theme.
(if (string-match-p
"dark"
(shell-command-to-string "gsettings get org.gnome.desktop.interface color-scheme"))
(ef-themes-load-random 'dark)
(ef-themes-load-random 'light))
(define-key global-map (kbd "<f5>") #'ef-themes-select) Simplified: (require 'ef-themes)
(ef-themes-load-random 'dark) ;; OR (ef-themes-load-random 'light)
(define-key global-map (kbd "<f5>") #'ef-themes-select) |
It works perfect now! Thank you @protesilaos, also for the suggestion on reading the current color-scheme of the DE to load dark or light themes. |
Great! |
Hi Prot,
First of all thank you for this amazing package, I love it.
The question I have is the following, if I just load the
ef-themes
like this:When I call
ef-themes-select
there are no candidates, is this the intention?If so, what is the best way to populate that list without having to load each theme during initialization?
Thank you.
The text was updated successfully, but these errors were encountered: