From dbc1ce8df888b5bb38652a1b41170f8c7e9f32d0 Mon Sep 17 00:00:00 2001 From: linlyboi Date: Fri, 1 Mar 2024 01:01:06 +0200 Subject: [PATCH] AUTO DARKMODE LESGO --- private_dot_config/doom/config.el | 12 +++++++++--- private_dot_config/doom/packages.el | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/private_dot_config/doom/config.el b/private_dot_config/doom/config.el index 1ce7085..d49ecca 100644 --- a/private_dot_config/doom/config.el +++ b/private_dot_config/doom/config.el @@ -33,12 +33,18 @@ ;; There are two ways to load a theme. Both assume the theme is installed and ;; available. You can either set `doom-theme' or manually load a theme with the ;; `load-theme' function. This is the default: -(setq doom-theme 'doom-gruvbox-light) - +;; (setq doom-theme 'doom-gruvbox-light) +(setq darkman-themes '(:light doom-gruvbox-light :dark doom-gruvbox)) ;; This determines the style of line numbers in effect. If set to `nil', line ;; numbers are disabled. For relative line numbers, set this to `relative'. (setq display-line-numbers-type 'relative) - +(when (daemonp) + (add-hook 'server-after-make-frame-hook #'darkman-mode) + (advice-add 'darkman-mode + :after + (lambda () + (remove-hook 'server-after-make-frame-hook + #'darkman-mode)))) ;; If you use `org' and don't want your org files in the default location below, ;; change `org-directory'. It must be set before org loads! (setq org-directory "~/org/") diff --git a/private_dot_config/doom/packages.el b/private_dot_config/doom/packages.el index b4c3220..b813be7 100644 --- a/private_dot_config/doom/packages.el +++ b/private_dot_config/doom/packages.el @@ -49,6 +49,7 @@ (package! flymake-ruff) (package! org-alert) (package! org-contacts) +(package! darkman) ;; Doom's packages are pinned to a specific commit and updated from release to ;; release. The `unpin!' macro allows you to unpin single packages...