Skip to content

Instantly share code, notes, and snippets.

@thevirtuoso1973
Created January 3, 2020 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thevirtuoso1973/b4dbabee6f58380fb7e8c35dfc72a2e2 to your computer and use it in GitHub Desktop.
Save thevirtuoso1973/b4dbabee6f58380fb7e8c35dfc72a2e2 to your computer and use it in GitHub Desktop.
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