diff --git a/config.org b/config.org index 17001f7..a00a380 100644 --- a/config.org +++ b/config.org @@ -1682,8 +1682,15 @@ Let's make this suit me slightly better. #+end_src ** Theme magic Let's automatically update terminals on theme change (as long as ~pywal~ is available). + +Unfortunately, as the theme is set on startup this causes the hook to be run +immediately. It would be nicer to /not/ have this add to our precious startup +time (around 0.4s last time I checked). +We can achieve this by deferring it with a short idle timer that should add the +hook /just after/ initialisation. + #+begin_src emacs-lisp :tangle (if (executable-find "wal") "yes" "no") -(add-hook 'doom-load-theme-hook 'theme-magic-from-emacs) +(run-with-idle-timer 0.1 nil (lambda () (add-hook 'doom-load-theme-hook 'theme-magic-from-emacs))) #+end_src ** Tramp Let's try to make tramp handle prompts better