• Stars
    star
    141
  • Rank 259,971 (Top 6 %)
  • Language
    Emacs Lisp
  • License
    GNU General Publi...
  • Created over 5 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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. For now it supports Linux through Gnome and Termux(Android).

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
  :config (auto-dark-mode t))

Spacemacs

If you use Spacemacs, add (auto-dark) to the dotspacemacs-additional-packages list and add the following to dotspacemacs/user-config:

(use-package auto-dark
  :init (spacemacs/defer-until-after-user-config (lambda () (auto-dark-mode t)))
  :defer t)

This ensures that auto-dark-mode is activated only after spacemacs's built-in theme loading logic.

Doom Emacs

If you use Doom Emacs, the following config should do the trick

;; In your packages.el
(package! auto-dark)

;; In your config.el

(after! doom-ui
  ;; set your favorite themes
  (setq! auto-dark-dark-theme 'doom-one
        auto-dark-light-theme 'doom-one-light)
  (auto-dark-mode 1))

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.

You can also take advantage of the hooks auto-dark-dark-mode-hook and auto-dark-light-mode-hook to make it even further customizable. Take a look at this article on how to Integrate Catppuccin with Auto-Dark.

OSA Script fallback (macOS)

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

This package in action:

  • macOS

auto-dark-emacs in action - macos

  • Linux (Gnome DE)

auto-dark-emacs in action - linux gnome

More Repositories

1

ros

screenshot / copy & paste tool for org-mode files
Emacs Lisp
120
star
2

nocurses

nocurses.h - A terminal screen manipulation library (colors, position, clears, attributes,...)
C
48
star
3

magit-stats

A git statistics report generator that can be used both as an individual CLI Tool or called from inside Emacs.
TypeScript
36
star
4

ac-circuits

Org-mode file aimed for solving Alternated Current (AC) Circuits
17
star
5

lemacs

The LEmacs Emacs config - Same experience, both on TUI and GUI
Emacs Lisp
16
star
6

markdown-ts-mode

A major mode for Emacs providing basic syntax highlight for markdown files using treesitter
Emacs Lisp
11
star
7

freebsd-terminus

The Terminus font converted to freebsd vt (console only)
10
star
8

nethack

Nethack build for MacOS 64 bits
4
star
9

flymake-margin

A package to provide flymake into the margin world
Emacs Lisp
4
star
10

rx-harmonic

Harmonics Plotter (python3/tk)
Python
3
star
11

rx-sislin

rx-sislin - Linear System Solver up to 10 variables/equations (python3/tk)
Python
3
star
12

pyradio-m3u-to-playlist

A pyradio playlist generator from m3u
Python
2
star
13

rustictactoe

A Tic Tac Toe game written in Rust
2
star
14

react-tetris

A tetris clone made with React JS
TypeScript
2
star
15

react-game-of-life

A React app based on Conway's Game of Life
TypeScript
2
star
16

js-going-functional

Me trying to explain in JavaScript how to get to "Functional programming"
JavaScript
1
star
17

prisma-tutorial

Prisma ORM tutorial material
TypeScript
1
star
18

timec

A stopwatch (count up timer with no limit) for your terminal with labeling support (bash)
Shell
1
star
19

terminal_donut

A rotating terminal donut
C
1
star
20

aa

aa - Your last statusline! Just do aa and voilΓ‘! (Integrate with tmux, screen, i3, ...)
Shell
1
star
21

10_design_patterns

A study on 10 design patterns
1
star
22

dottmux

My personal tmux config file.
Shell
1
star
23

SQL-Basics

My personal SQL basics notes. Use it when learning/teaching SQL (examples with MySQL).
1
star
24

gpg-tutorial

A tutorial on GPG (GnuPG - GNU Privacy Guard)
1
star
25

broadcast-channel-api

An example on how to use the BroadcastChannel Javascript API
HTML
1
star
26

r-gimme

r-gimme.py returns all links present in a webpage or in a list of webpages
Python
1
star
27

rx-gimme

rx-gimme.py returns all links present in a webpage or in a list of webpages
Python
1
star
28

express_lab

My personal NodeJS Express lab - nothing to see here
JavaScript
1
star
29

rx-plotter

A software designed to plot given mathematical functions
Python
1
star
30

rx-fractal

Generates a fractal image between 3 given points using random numbers (python3/tk)
Python
1
star
31

dotalacritty

My personal Alacritty file
1
star
32

micro-frontends-lab

My lab on learning micro frontends architecture
JavaScript
1
star
33

rx-ccalc

Complex Numbers Calculator (python3/tk)
Python
1
star
34

javascript-notes

Some nots on JS using a .org file.
1
star
35

django_lab

My django framework lab
Python
1
star
36

anonchat

A minimal WebSocket Typescript/Javascript Anonymous chat server/client
TypeScript
1
star
37

100_computer_science_concepts

One hundred computer science concepts
1
star
38

redux-lab

A lab for redux projects
JavaScript
1
star
39

webdevtools

A collection of links for web development tools.
1
star
40

rx-passgen

Password Generator Utility Software - Stock python with tkinter
Python
1
star
41

dotvim

My personal .vimrc file
Vim Script
1
star
42

LionyxML

Config files for my GitHub profile.
1
star
43

dotkitty

My personal kitty config files
1
star
44

dotneovim

My neovim config file
Lua
1
star
45

r-swapi-client

A client for the swapi (Star Wars API)
CSS
1
star
46

nerd-installer

Simplify the installation of the entire Nerd Fonts collection effortlessly
Shell
1
star