From b48f70201ae1fc95450133e4ee66917f6497b90f Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Tue, 29 Nov 2022 23:20:54 +0100 Subject: [PATCH] config/doom: add theming --- .config/doom/config.el | 30 ++++++------------------ .config/doom/theme.el | 1 + .config/doom/theme.el##default | 24 +++++++++++++++++++ .config/doom/theme.el##hostname.elephant | 23 ++++++++++++++++++ .config/doom/user.el##user.janekf | 1 + 5 files changed, 56 insertions(+), 23 deletions(-) create mode 120000 .config/doom/theme.el create mode 100644 .config/doom/theme.el##default create mode 100644 .config/doom/theme.el##hostname.elephant create mode 120000 .config/doom/user.el##user.janekf diff --git a/.config/doom/config.el b/.config/doom/config.el index 9f9ace3..d7693a5 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -1,27 +1,5 @@ ;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- -;;;; VISUALS - -;; Doom exposes five (optional) variables for controlling fonts in Doom. Here -;; are the three important ones: -;; -;; + `doom-font' -;; + `doom-variable-pitch-font' -;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for -;; presentations or streaming. -;; -;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd -;; font string. You generally only need these two: -;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light) -;; doom-variable-pitch-font (font-spec :family "sans" :size 13)) - -;; There are two ways to load a theme. Both assume the theme is installed and -;; available. You can either set `doom-theme' or manually load a theme with the -;; `load-theme' function. This is the default: -(setq doom-theme (if (equal (getenv "THEME") "light") 'doom-opera-light 'doom-one) - doom-font (font-spec :family "monospace" :size 24 :weight 'semi-light) - doom-variable-pitch-font (font-spec :family "sans" :size 24)) - (defun load-theme-string (theme) (if (-contains? (custom-available-themes) (intern theme)) (load-theme (intern theme)))) (defun toggle-theme (&optional suffix) @@ -221,6 +199,7 @@ Version 2019-11-04 2021-02-16" (load! "./user.el" nil t) (load! "./local.el" nil t) +(load! "./theme.el" nil t) (setq backup-directory-alist (list (cons "." (concat doom-cache-dir "backup/"))) custom-emacs-data-dir (expand-file-name "data" doom-private-dir)) @@ -926,8 +905,13 @@ Version 2019-11-04 2021-02-16" plantuml-indent-level 4 ) (after! org - (org-babel-do-load-languages 'org-babel-load-languages '((plantuml . t))) + (org-babel-do-load-languages 'org-babel-load-languages + '((plantuml . t))) ) + + (add-hook 'plantuml-mode-hook + (lambda () (setq-local compile-command (format "plantuml %s" (shell-quote-argument buffer-file-name))))) + ) (use-package vc-fossil diff --git a/.config/doom/theme.el b/.config/doom/theme.el new file mode 120000 index 0000000..d88c0ae --- /dev/null +++ b/.config/doom/theme.el @@ -0,0 +1 @@ +theme.el##default \ No newline at end of file diff --git a/.config/doom/theme.el##default b/.config/doom/theme.el##default new file mode 100644 index 0000000..35fc3cf --- /dev/null +++ b/.config/doom/theme.el##default @@ -0,0 +1,24 @@ +;;; theme.el -*- lexical-binding: t; -*- + +;;;; VISUALS + +;; Doom exposes five (optional) variables for controlling fonts in Doom. Here +;; are the three important ones: +;; +;; + `doom-font' +;; + `doom-variable-pitch-font' +;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for +;; presentations or streaming. +;; +;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd +;; font string. You generally only need these two: +;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light) +;; doom-variable-pitch-font (font-spec :family "sans" :size 13)) + +;; There are two ways to load a theme. Both assume the theme is installed and +;; available. You can either set `doom-theme' or manually load a theme with the +;; `load-theme' function. This is the default: + +(setq doom-theme (if (equal (getenv "THEME") "light") 'doom-opera-light 'doom-one) + doom-font (font-spec :family "monospace" :size 16 :weight 'semi-light) + doom-variable-pitch-font (font-spec :family "sans" :size 16)) diff --git a/.config/doom/theme.el##hostname.elephant b/.config/doom/theme.el##hostname.elephant new file mode 100644 index 0000000..4ead94a --- /dev/null +++ b/.config/doom/theme.el##hostname.elephant @@ -0,0 +1,23 @@ +;;; theme.el -*- lexical-binding: t; -*- + +;;;; VISUALS + +;; Doom exposes five (optional) variables for controlling fonts in Doom. Here +;; are the three important ones: +;; +;; + `doom-font' +;; + `doom-variable-pitch-font' +;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for +;; presentations or streaming. +;; +;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd +;; font string. You generally only need these two: +;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light) +;; doom-variable-pitch-font (font-spec :family "sans" :size 13)) + +;; There are two ways to load a theme. Both assume the theme is installed and +;; available. You can either set `doom-theme' or manually load a theme with the +;; `load-theme' function. This is the default: +(setq doom-theme (if (equal (getenv "THEME") "light") 'doom-opera-light 'doom-one) + doom-font (font-spec :family "monospace" :size 24 :weight 'semi-light) + doom-variable-pitch-font (font-spec :family "sans" :size 24)) diff --git a/.config/doom/user.el##user.janekf b/.config/doom/user.el##user.janekf new file mode 120000 index 0000000..e8ff0ad --- /dev/null +++ b/.config/doom/user.el##user.janekf @@ -0,0 +1 @@ +user.el##user.janek \ No newline at end of file