timcharper / auto-dark-emacs

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Auto-Dark-Emacs

Wanna emacs to follow your MacOS Dark-mode on/off options?

That's it. This program lets Emacs change between 2 user defined (in code) themes to be automatically changed when Dark Mode set on/off on MacOS.

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

Install

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

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

Usage

Change your dark-mode settings on MacOS 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-emacs.

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-emacs/allow-osascript and set it to t.

Screenshot

Here it's what it does.

auto-dark-emacs  in action

About

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

License:GNU General Public License v2.0


Languages

Language:Emacs Lisp 100.0%