Wrap theme setting in when check for doom-themes

Move a few more things into modules from init.el, misc formatting otherwise
This commit is contained in:
Evie Litherland-Smith 2023-10-27 06:59:10 +01:00
parent 4949fb113e
commit 46adafaf28
5 changed files with 15 additions and 42 deletions

View file

@ -45,31 +45,23 @@
message-sendmail-extra-arguments '("--read-envelope-from") message-sendmail-extra-arguments '("--read-envelope-from")
message-send-mail-function #'message-send-mail-with-sendmail message-send-mail-function #'message-send-mail-with-sendmail
message-kill-buffer-on-exit t message-kill-buffer-on-exit t
use-dialog-box nil
display-line-numbers 'relative display-line-numbers 'relative
fill-column 80) fill-column 80)
;; Theme settings
(customize-set-variable 'crafted-startup-inhibit-splash t)
(setq use-dialog-box nil)
(tool-bar-mode -1) (tool-bar-mode -1)
(scroll-bar-mode -1) (scroll-bar-mode -1)
(load-theme 'doom-tokyo-night t)
(add-to-list 'default-frame-alist '(font . "FiraCode Nerd Font-12")) (add-to-list 'default-frame-alist '(font . "FiraCode Nerd Font-12"))
(global-prettify-symbols-mode) (global-prettify-symbols-mode)
(set-frame-parameter nil 'alpha-background 80) (set-frame-parameter nil 'alpha-background 80)
(add-to-list 'default-frame-alist '(alpha-background . 80)) (add-to-list 'default-frame-alist '(alpha-background . 80))
(when (require 'doom-themes nil :noerror) (load-theme 'doom-tokyo-night t))
;; Extra minor-modes ;; Extra minor-modes
(which-key-mode) (which-key-mode)
;; Extra functions ;; Extra functions
(defun crafted-startup-example/display-startup-time ()
"Display the startup time after Emacs is fully initialized."
(message "Crafted Emacs loaded in %s."
(emacs-init-time)))
(add-hook 'emacs-startup-hook #'crafted-startup-example/display-startup-time)
(defun my/org-move-done-tasks-to-bottom () (defun my/org-move-done-tasks-to-bottom ()
"Sort all tasks in the topmost heading by TODO state." "Sort all tasks in the topmost heading by TODO state."
(interactive) (interactive)
@ -87,18 +79,6 @@
(set-terminal-coding-system 'utf-8) (set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8)
;; Magit settings
(setq magit-clone-default-directory "~/Projects/")
;; ntfy server settings
(setq ntfy-server "https://ntfy.xenia.me.uk"
ntfy-topic "UhrNGphnSKCpCnk8"
ntfy-header "Notification from emacs"
ntfy-tags "purple_circle,loudspeaker")
;; Apheleia settings
(setq apheleia-remote-algorithm 'local)
;; TRAMP settings ;; TRAMP settings
(setq tramp-default-method "sshx" (setq tramp-default-method "sshx"
tramp-default-remote-shell "/bin/sh" tramp-default-remote-shell "/bin/sh"

View file

@ -4,9 +4,7 @@
(when (require 'elfeed nil :noerror) (when (require 'elfeed nil :noerror)
(add-hook 'elfeed-search-mode-hook #'elfeed-update) (add-hook 'elfeed-search-mode-hook #'elfeed-update)
(when (require 'elfeed-org nil :noerror) (when (require 'elfeed-org nil :noerror) (elfeed-org))
(elfeed-org)) (when (require 'elfeed-tube nil :noerror) (elfeed-tube-setup)))
(when (require 'elfeed-tube nil :noerror)
(elfeed-tube-setup)))
(provide 'custom-feed-config) (provide 'custom-feed-config)

View file

@ -1,22 +1,17 @@
(setq direnv-always-show-summary nil) (setq direnv-always-show-summary nil
apheleia-remote-algorithm 'local)
(when (require 'aggressive-indent nil :noerror) (when (require 'aggressive-indent nil :noerror) (add-hook 'prog-mode-hook #'aggressive-indent-mode))
(add-hook 'prog-mode-hook #'aggressive-indent-mode))
(when (require 'rainbow-delimiters nil :noerror) (when (require 'rainbow-delimiters nil :noerror) (add-hook 'prog-mode-hook #'rainbow-delimiters-mode))
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode))
(when (require 'treesit-aut nil :noerror) (when (require 'treesit-aut nil :noerror) (global-treesit-auto-mode +1))
(global-treesit-auto-mode +1))
(when (require 'apheleia nil :noerror) (when (require 'apheleia nil :noerror) (apheleia-global-mode +1))
(apheleia-global-mode +1))
(when (require 'eglot nil :noerror) (when (require 'eglot nil :noerror) (eglot-ensure))
(eglot-ensure))
(when (require 'direnv nil :noerror) (when (require 'direnv nil :noerror) (direnv-mode +1))
(direnv-mode +1))
(when (require 'yasnippet nil :noerror) (when (require 'yasnippet nil :noerror)
(require 'yasnippet-snippets nil :noerror) (require 'yasnippet-snippets nil :noerror)

View file

@ -3,7 +3,6 @@
emms-source-file-default-directory "~/Music" emms-source-file-default-directory "~/Music"
emms-lyrics-dir "~/Music/lyrics") emms-lyrics-dir "~/Music/lyrics")
(when (require 'emms-setup nil :noerror) (when (require 'emms-setup nil :noerror) (emms-all))
(emms-all))
(provide 'custom-media-config) (provide 'custom-media-config)

View file

@ -4,6 +4,7 @@
(project-find-file "Find file") (project-find-file "Find file")
(project-find-regexp "Find regexp") (project-find-regexp "Find regexp")
(project-find-dir "Find directory") (project-find-dir "Find directory")
(project-eshell "Eshell"))) (project-eshell "Eshell"))
magit-clone-default-directory "~/Projects/")
(provide 'custom-project-config) (provide 'custom-project-config)