this post was submitted on 16 Oct 2023
1 points (66.7% liked)

Emacs

311 readers
3 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

Hey everybody, first time poster here.

I've been using Emacs for a while now, but just recently starting toying with configs, experiencing new packages, learning some elisp so I can customize my emacs experience and overall making it my own.

A while back I noticed I needed some sort of dark mode functionality to change the theme to a darker one when there is less sunlight. After searching for some packages, I found none that really suited me.

So I decided to write my own: https://github.com/pedroangelo/theme-rotation.el

Check it out and tell me what you guys think. I've also included a sort of related work section in the README that discusses similar packages, and why I didn't found them to my taste.

PS: I wrote this package for my personal use. But if more people find it useful, I'd be quite satisfied with myself.

Also, do you think I should work towards getting it published in MELPA? I don't mind the work if it something that potentially many people might enjoy using.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago

Reviewed the code, great job on your first package—wouldn't know it was your first if you hadn't said so! I think you should definitely get it on MELPA.

If you wanted a next step for it, you could consider giving users not just the option of set times, but:

  • tying it into the OS dark/light schedule
  • or tying into Emacs' solar functions to get their local sunrise/sunset times
  • or making an API call to get local sunrise/sunset times.

You could also give them an option to provide an offset to those times... maybe they want light theme 30 minutes after the sun rises and dark theme 45 minutes before the sun sets, for example.

I did some thinking on this because I wanted to write a similar package at some point, before realizing I actually didn't want to switch themes at all. : )

No matter where you go with this, congrats on your first package. Well done!