From fd714ad8a088645b8cfce484779a619d980c528b Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Mon, 3 Jun 2024 18:40:20 -0700 Subject: [PATCH] After a thousand years, I've changed my theme And fixed a few bugs related to switching between inside and out. :-D --- ha-display.org | 69 ++++++++++++++++++++++++++++----------- ha-org-word-processor.org | 66 ++++++++++++++++--------------------- 2 files changed, 78 insertions(+), 57 deletions(-) diff --git a/ha-display.org b/ha-display.org index f583296..d7eab0f 100644 --- a/ha-display.org +++ b/ha-display.org @@ -55,11 +55,10 @@ Let's install and load some of packages from the [[https://github.com/hlissner/d doom-modeline-lsp-icon t doom-modeline-percent-position nil) (doom-modeline-mode 1)) - - (use-package doom-themes) #+end_src -* Find the Buffer Window +* Window Dimmer To make the active window /more noticeable/, we /dim/ the in-active windows with the [[https://github.com/gonewest818/dimmer.el][dimmer project]]. + #+begin_src emacs-lisp (use-package dimmer :custom @@ -80,7 +79,7 @@ Large screen, lots of windows, so where is the cursor? While I used to use =hl-l :straight (:host github :repo "protesilaos/pulsar") :custom (pulsar-face 'pulsar-generic) - (pulsar-delay 0.05) + (pulsar-delay 0.15) :config (dolist (built-in-function '(recenter-top-bottom move-to-window-line-top-bottom reposition-window @@ -132,42 +131,74 @@ And if I can’t find the cursor, and don’t want to move it to see it, I can h :bind ("" . pulsar-pulse-line)) #+end_src * Themes -One does get used to a particular collection of colors. Mine is Tomorrow: +One does get used to a particular collection of colors. After happily using Steve Purcell’s Tomorrow theme for many years, I decided to push it a little /warmer/. + #+begin_src emacs-lisp -(use-package color-theme-sanityinc-tomorrow) + (use-package flexoki-themes + :config + (load-theme 'flexoki-themes-dark t) + + (defun ha-flexoki-themes-update () + "Slight tweaks to the flexoki-themes. + I found the background a tad too stark." + (if (eq flexoki-themes-set-theme 'dark) + (progn + (set-face-attribute 'default nil :background "#161514") + (set-face-attribute 'region nil :background "#bc5215") + (set-face-attribute 'org-block nil :background "#1b1a19") + (set-face-attribute 'org-block-begin-line nil :background "#1d1c1b") + (set-face-attribute 'org-block-begin-line nil :background "#1d1c1b")) + + (set-face-attribute 'region nil :background "#da702c") + (set-face-attribute 'org-block-begin-line nil :foreground "#fffcf0"))) + + :custom + (flexoki-themes-set-theme 'dark) + (flexoki-themes-use-bold-keywords t) + (flexoki-themes-use-bold-builtins t) + (flexoki-themes-use-italic-comments t) + + :hook (flexoki-themes-after-load-themes . ha-flexoki-themes-update)) #+end_src + Most of the time, Emacs is on my desk is a darkened room, so I choose the dark theme: #+begin_src emacs-lisp -(defun laptop-inside () - (interactive) - (load-theme 'sanityinc-tomorrow-night t) - (set-face-attribute 'region nil :background "#000096") - (set-face-attribute 'mode-line nil :background "black") - (set-face-attribute 'mode-line-inactive nil :background "#444444")) + (defun laptop-inside () + "Customize the theme for inside programming." + (interactive) + (load-theme 'flexoki-themes-dark t) + (ha-word-processor-fonts)) #+end_src But, when feeling adventurous, I /sometimes/ take my laptop outside: #+begin_src emacs-lisp -(defun laptop-in-the-sun () - (interactive) - (load-theme 'sanityinc-tomorrow-day t) - (set-face-attribute 'region nil :background "orange1") + (defun laptop-in-the-sun () + "Customize the theme for outside programming." + (interactive) + (load-theme 'flexoki-themes-light t) + (ha-word-processor-fonts)) +#+end_src + +I’ve been playing around with making the current window more pronounced. +This isn’t needed as much with the [[*Window Dimmer][Window Dimmer]] feature, but if I do, this would be the settings: + +#+begin_src emacs-lisp :tangle no (set-face-attribute 'mode-line nil :background "#cccccc") - (set-face-attribute 'mode-line-inactive nil :background "#888888")) + (set-face-attribute 'mode-line-inactive nil :background "#888888") #+end_src Oh, and turn off the line highlighting: #+begin_src emacs-lisp -(global-hl-line-mode -1) + (global-hl-line-mode -1) #+end_src And of course, the default is /inside/ where it is dark and safe: #+begin_src emacs-lisp -(laptop-inside) + (laptop-inside) #+end_src * Full Size Frame Taken from [[https://emacsredux.com/blog/2020/12/04/maximize-the-emacs-frame-on-startup/][this essay]], I figured I would start the initial frame automatically in fullscreen, but not any subsequent frames (as this could be part of the capturing system). diff --git a/ha-org-word-processor.org b/ha-org-word-processor.org index 316d86d..baf3afd 100644 --- a/ha-org-word-processor.org +++ b/ha-org-word-processor.org @@ -238,54 +238,46 @@ This is now fine and ffantastic! * Org Beautify I really want to use the Org Beautify package, but it overrides my darker themes (and all I really want is headlines to behave). -First step is to make all Org header levels to use the variable font, and be the same color as the default text: #+begin_src emacs-lisp - (when window-system - (let ((default-color (face-attribute 'default :foreground))) - (dolist (face '(org-level-1 org-level-2 org-level-3 org-level-4 org-level-5 org-level-6 org-level-7 org-level-8)) - (set-face-attribute face nil :height 1.1 - :foreground default-color :weight 'bold - :font ha-variable-header-font)))) -#+end_src + (defun ha-word-processor-fonts () + "Configure `org-mode' fonts and faces." + (interactive) -Next, we just need to change the header sizes: + ;; First step is to make all Org header levels to use the variable + ;; font, and be the same color as the default text: -#+begin_src emacs-lisp - (when window-system + (when window-system + (let ((default-color (face-attribute 'default :foreground))) + (dolist (face '(org-level-1 org-level-2 org-level-3 org-level-4 + org-level-5 org-level-6 org-level-7 org-level-8)) + (set-face-attribute face nil :height 1.1 + :foreground default-color :weight 'bold + :font ha-variable-header-font)))) + + ;; Change the header sizes to show their level visually: (set-face-attribute 'org-level-1 nil :height 2.2) (set-face-attribute 'org-level-2 nil :height 1.8) (set-face-attribute 'org-level-3 nil :height 1.4) - (set-face-attribute 'org-level-4 nil :height 1.2)) -#+end_src + (set-face-attribute 'org-level-4 nil :height 1.2) -While we are at it, let’s make sure the code blocks are using my fixed with font: -#+begin_src emacs-lisp - (when window-system (dolist (face '(org-block org-code org-verbatim org-table org-drawer - org-table org-formula org-special-keyword org-block - org-property-value org-document-info-keyword)) - (set-face-attribute face nil :inherit 'fixed-pitch :height 0.9))) + org-table org-formula org-special-keyword org-block + org-property-value org-document-info-keyword)) + (set-face-attribute face nil :inherit 'fixed-pitch :height 0.9)) - (set-face-attribute 'org-table nil :height 1.0) - (set-face-attribute 'org-formula nil :height 1.0) + ;; While we are at it, let’s make sure the code blocks are using my fixed with font: + (set-face-attribute 'org-table nil :height 1.0) + (set-face-attribute 'org-formula nil :height 1.0) + (set-face-attribute 'org-drawer nil :height 0.8) + (set-face-attribute 'org-property-value nil :height 0.85) + (set-face-attribute 'org-special-keyword nil :height 0.85)) #+end_src -Not sure why the above code removes the color of =org-verbatim=, so let’s make it stand out slightly: + +We call this function when we start: #+begin_src emacs-lisp - (set-face-attribute 'org-verbatim nil :foreground "#aaaacc") -#+end_src -And some slight adjustments to the way blocks are displayed: -#+begin_src emacs-lisp - (set-face-attribute 'org-block-begin-line nil :background "#282828") - (set-face-attribute 'org-block nil :height 0.95) - (set-face-attribute 'org-block-end-line nil :background "#262626") -#+end_src -And decrease the prominence of the property drawers: -#+begin_src emacs-lisp - (set-face-attribute 'org-drawer nil :height 0.8) - (set-face-attribute 'org-property-value nil :height 0.85) - (set-face-attribute 'org-special-keyword nil :height 0.85) + (ha-word-processor-fonts) #+end_src * Org Modern The [[https://github.com/minad/org-modern][org-modern]] project attempts to do a lot of what I was doing in this file. @@ -317,12 +309,10 @@ According to an idea by [[https://jft.home.blog/2019/07/17/use-unicode-symbol-to #+end_src * Padding The [[https://github.com/TonCherAmi/org-padding][org-padding]] project looks places extra space before and after headers and blocks (essentially leading), to create a more word-processor-y experience. Great idea, however, I have spent a lot of extra time entering blank lines before and after my headers and blocks: - #+begin_src emacs-lisp (use-package org-padding :straight (:host github :repo "TonCherAmi/org-padding") - :hook - (org-mode . org-padding-mode) + :hook (org-mode . org-padding-mode) :config (setq org-padding-block-begin-line-padding '(0.5 . 0.3) org-padding-block-end-line-padding '(0.1 . 0.5)