Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
My config.el file for doom emacs. Includes code that switches between a day/night theme depending on the time.
;;; .doom.d/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here:
;; Color theme changer depending on time
(setq hour
(string-to-number
(substring (current-time-string) 11 13))) ;; gets the hour
(if (member hour (number-sequence 6 16)) ;; light theme if between 06:00-16:59
(setq now 'doom-solarized-light)
(setq now 'doom-dracula)) ;; dark theme from 5pm
(if (equal now doom-theme)
nil
(setq doom-theme now))
;; end of color theme code
;; line numbers
(setq display-line-numbers-type 'relative)
(setq linum-relative-current-symbol "")
;; end of line numbers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment