this post was submitted on 04 Dec 2023
1 points (100.0% liked)

Emacs

310 readers
2 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
 

I wrote a library that lets you cycle through the available themes in Emacs. F10 and shift-F10 keys will cycle forward and backward through the themes. The theme name is printed for reference.

https://github.com/tsengf/theme-cycle

Installation
Download theme-cycle.el into ~/.emacs.d.

Add the following to your Emacs configuration

(add-to-list 'load-path (expand-file-name "~/.emacs.d)
(require 'theme-cycle)
;; Load as many themes as you are interested in exploring.
(use-package doom-themes)
(use-package ef-themes)
(use-package modus-themes)
(use-package solarized-themes)

To Use

Use F10 to cycle forward through the themes. Use shift-F10 to cycle backward through the themes.

top 4 comments
sorted by: hot top controversial new old
[–] 00-11@alien.top 1 points 11 months ago

Cycling shows everything in your session using each theme, in turn.


doremi-custom-themes+ is an interactive Lisp function in doremi-cmd.el.

It is bound to C-x t s.

(doremi-custom-themes+ &optional FLIP)

Successively cycle among custom themes.

The themes used for cycling are those in option doremi-custom-themes.

You can use C-g to quit and cancel changes made so far. Note, however, that some things might not be restored. C-g can only disable any themes that you applied. It cannot restore other customizations that enabling a theme might have overruled. Note: Having a lot of frames present can slow down this command considerably.

Option doremi-custom-themes-accumulate-flag determines whether cycling accumulates themes or disables all themes other than the current one. Note: A non-nil value (accumulating) can considerably slow down cycling.

Option doremi-themes-update-flag determines whether the updated value of doremi-custom-themes is saved. A prefix arg to this command flips the option value for the current invocation of the command.

[–] danderzei@alien.top 1 points 11 months ago

That´s cool. I was working something similar today. I call it Emacs Disco as it changes themes randomly every 10 seconds :) Try this:

(run-with-timer 0 60 'cycle-themes)

[–] danderzei@alien.top 1 points 11 months ago

Create an Emacs theme disco by randomly switching themes manually or automatically (from the Ef Themes collection): https://github.com/pprevos/disco-ef-themes

[–] fediverser@alien.top 1 points 11 months ago

This post is an automated archive from a submission made on /r/emacs, powered by Fediverser software running on alien.top. Responses to this submission will not be seen by the original author until they claim ownership of their alien.top account. Please consider reaching out to them let them know about this post and help them migrate to Lemmy.

Lemmy users: you are still very much encouraged to participate in the discussion. There are still many other subscribers on !emacs@communick.news that can benefit from your contribution and join in the conversation.

Reddit users: you can also join the fediverse right away by getting by visiting https://portal.alien.top. If you are looking for a Reddit alternative made for and by an independent community, check out Fediverser.