Skip to content

Commit

Permalink
Add Auto-Dark to Emacs (#23)
Browse files Browse the repository at this point in the history
This minor mode auto-toggles dark mode with the system.
  • Loading branch information
sellout authored Jul 7, 2024
2 parents 035ad36 + 8c28544 commit 46ce7ef
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions home/.config/emacs/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@

(use-package agenix)

(use-package auto-dark
:after custom
:defer nil
:init (auto-dark-mode))

(use-package autorevert
:custom (auto-revert-mode-text ""))

Expand Down
1 change: 1 addition & 0 deletions nix/modules/emacs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@
# epkgs.agda2-mode # fails while linking Agda-2.6.2.2
epkgs.agenix
epkgs.applescript-mode
epkgs.auto-dark
epkgs.auto-dim-other-buffers
epkgs.bats-mode
epkgs.bradix
Expand Down
9 changes: 9 additions & 0 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ in {
emacs = final.emacs29;
emacsPackagesFor = emacs:
(prev.emacsPackagesFor emacs).overrideScope' (efinal: eprev: {
auto-dark = eprev.auto-dark.overrideAttrs (old: {
## adds `frame-background-mode` support (LionyxML/auto-dark-emacs#57)
src = final.fetchFromGitHub {
owner = "sellout";
repo = "auto-dark-emacs";
rev = "default-to-custom-enabled-themes";
sha256 = "D+bXR9zVDLDnsuOn6NT3mboeciyQiPIGLAHmokY15nI=";
};
});
## still waffling between `direnv` and `envrc`. `direnv` has at least an
## attempt at TRAMP support, but `envrc` seems generally better.
direnv = eprev.direnv.overrideAttrs (old: {
Expand Down

0 comments on commit 46ce7ef

Please sign in to comment.