Skip to content

emacsmirror/warm-mode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

warm-mode.el

A global minor mode that warms Emacs colors for nighttime coding. Reduces blue light and slightly dims colors across all faces, working with any theme.

Why

System-wide tools like wlsunset apply a blue light filter to your entire screen. warm-mode is useful when you only want the effect in Emacs, leaving other applications unaffected. It also works cross-platform, unlike most system-wide tools. You could also combine both for extra warmth.

Another alternative is to switch to a different theme at night, but warm-mode preserves your exact color scheme, just making it warmer. This makes it easier to adapt without losing familiarity with your theme.

Screenshots

Examples using warm-mode-warmth 0.25 and warm-mode-dim 0.9.

modus-vivendi

Disabled Enabled
modus-vivendi disabled modus-vivendi enabled

modus-operandi

Disabled Enabled
modus-operandi disabled modus-operandi enabled

creamy

Disabled Enabled
creamy disabled creamy enabled

Installation

Using use-package:

(use-package warm-mode
  :ensure (:host github :repo "smallwat3r/emacs-warm-mode"))

Or manually, clone this repository and add to your load-path:

(add-to-list 'load-path "/path/to/emacs-warm-mode")
(require 'warm-mode)

Usage

Toggle warm mode:

M-x warm-mode

Customization

Variable Default Description
warm-mode-warmth 0.2 Intensity of warm shift (0.0 to 0.5)
warm-mode-dim 0.9 Brightness multiplier (0.5 to 1.0)

Example configuration:

(use-package warm-mode
  :ensure (:host github :repo "smallwat3r/emacs-warm-mode")
  :custom
  (warm-mode-warmth 0.25)
  (warm-mode-dim 0.9))

Limitations

  1. Only foreground and background colors are transformed. Attributes like :underline or :box usually inherit from foreground, so they are effectively warmed. However, if a theme explicitly sets a color for these attributes, that color will not be transformed.

  2. The mode is global and cannot be enabled per-frame.

  3. The warming algorithm is simple and not a proper color temperature shift like f.lux or Redshift. Results may vary depending on your theme.

  4. May not change text colors in terminal Emacs where color support is limited.

About

Warm colors for nighttime coding

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Emacs Lisp 100.0%