Skip to content

Auto-Dark-Emacs is an auto changer between 2 themes, dark/light, following MacOS Dark Mode settings

License

Notifications You must be signed in to change notification settings

realcomplex/auto-dark-emacs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto-Dark for Emacs

MELPA

Do you want Emacs to follow your MacOS/Linux/Windows Dark-mode on/off options?

This is it. This program lets Emacs change between 2 user defined (customizable) themes to be automatically changed when Dark Mode set on/off on MacOS/Linux/Windows. Now only supports Gnome on Linux.

By default, themes are wombat and leuven, since these are bundled with Emacs.

Install

Install it from MELPA and add to your .emacs file:

(require 'auto-dark)
(auto-dark-mode t)

Or simply copy the auto-dark.el file to ~/.emacs.d/auto-dark/auto-dark.el (or clone this repository there), and then add the following to your .emacs:

(add-to-list 'load-path "~/.emacs.d/auto-dark/")
(require 'auto-dark)
(auto-dark-mode t)

Or use use-package to install:

(use-package auto-dark
  :init (auto-dark-mode t))

Usage

Change your dark-mode settings on MacOS/Linux/Windows and let the magic happens :D

Customization

The light/dark themes can be customized using the Emacs customization system. M-x customize-group auto-dark.

OSA Script fallback

For terminal-based emacs, it is possible to check dark mode status using osascript rather than relying on the built-in Applescript support that GUI Emacs provides. To enable it, customize dark-mode-allow-osascript and set it to t.

Screenshot

A demo of this package in action.

auto-dark-emacs in acition full screen

About

Auto-Dark-Emacs is an auto changer between 2 themes, dark/light, following MacOS Dark Mode settings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Emacs Lisp 100.0%