Skip to content

Commit

Permalink
update themes
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Ye committed Jun 25, 2024
1 parent cf13dab commit 36bd6ca
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions phye-lisp/phye-init-misc.el
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
(setq mac-command-modifier 'meta)
(setq mac-option-modifier 'super)
(setq help-window-select t)

(customize-set-variable 'calendar-latitude +31.2)
(customize-set-variable 'calendar-longitude +121.5)
;; }}

(provide 'phye-init-misc)
16 changes: 12 additions & 4 deletions phye-lisp/phye-init-themes.el
Original file line number Diff line number Diff line change
Expand Up @@ -197,18 +197,26 @@
(defun phye/toggle-theme (&optional light)
"Toggle light theme if LIGHT is t, restore dark theme otherwise."
(interactive)
(let ((loc (getenv "LOCATION")))
(message "Toggle Theme at %s" loc)
(let ((loc (getenv "LOCATION"))
(bg-color "")) ;; term + dark (default): color-48
(if light
(if (display-graphic-p)
(setq bg-color "green") ;; gui + light: green
(setq bg-color "color-27")) ;; term + light: color-27
(if (display-graphic-p)
(setq bg-color "blue1") ;; gui + dark: sky blue
(setq bg-color "color-48"))) ;; term + dark: color-48
(message "Toggle Theme at %s, bg color: %s" loc bg-color)
(when (equal loc "office")
(if light
(progn
(setq previous-dark-theme (car custom-enabled-themes))
(my-random-healthy-color-theme)
(custom-set-faces
'(ivy-current-match ((t (:extend t :background "color-48"))))))
`(ivy-current-match ((t (:extend t :background ,bg-color))))))
(phye/load-theme previous-dark-theme)
(custom-set-faces
'(ivy-current-match ((t (:extend t :background "color-27"))))))
`(ivy-current-match ((t (:extend t :background ,bg-color))))))
(when (display-graphic-p)
(shell-command "~/bin/scripts/toggle_dark_theme.sh")))))

Expand Down

0 comments on commit 36bd6ca

Please sign in to comment.