After a thousand years, I've changed my theme

And fixed a few bugs related to switching between inside and out. :-D
This commit is contained in:
Howard Abrams 2024-06-03 18:40:20 -07:00
parent d1ea08a791
commit fd714ad8a0
2 changed files with 78 additions and 57 deletions

View file

@ -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-lsp-icon t
doom-modeline-percent-position nil) doom-modeline-percent-position nil)
(doom-modeline-mode 1)) (doom-modeline-mode 1))
(use-package doom-themes)
#+end_src #+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]]. 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 #+begin_src emacs-lisp
(use-package dimmer (use-package dimmer
:custom :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") :straight (:host github :repo "protesilaos/pulsar")
:custom :custom
(pulsar-face 'pulsar-generic) (pulsar-face 'pulsar-generic)
(pulsar-delay 0.05) (pulsar-delay 0.15)
:config :config
(dolist (built-in-function '(recenter-top-bottom move-to-window-line-top-bottom reposition-window (dolist (built-in-function '(recenter-top-bottom move-to-window-line-top-bottom reposition-window
@ -132,42 +131,74 @@ And if I cant find the cursor, and dont want to move it to see it, I can h
:bind ("<f8>" . pulsar-pulse-line)) :bind ("<f8>" . pulsar-pulse-line))
#+end_src #+end_src
* Themes * 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 Purcells Tomorrow theme for many years, I decided to push it a little /warmer/.
#+begin_src emacs-lisp #+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 #+end_src
Most of the time, Emacs is on my desk is a darkened room, so I choose the dark theme: Most of the time, Emacs is on my desk is a darkened room, so I choose the dark theme:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun laptop-inside () (defun laptop-inside ()
(interactive) "Customize the theme for inside programming."
(load-theme 'sanityinc-tomorrow-night t) (interactive)
(set-face-attribute 'region nil :background "#000096") (load-theme 'flexoki-themes-dark t)
(set-face-attribute 'mode-line nil :background "black") (ha-word-processor-fonts))
(set-face-attribute 'mode-line-inactive nil :background "#444444"))
#+end_src #+end_src
But, when feeling adventurous, I /sometimes/ take my laptop outside: But, when feeling adventurous, I /sometimes/ take my laptop outside:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun laptop-in-the-sun () (defun laptop-in-the-sun ()
(interactive) "Customize the theme for outside programming."
(load-theme 'sanityinc-tomorrow-day t) (interactive)
(set-face-attribute 'region nil :background "orange1") (load-theme 'flexoki-themes-light t)
(ha-word-processor-fonts))
#+end_src
Ive been playing around with making the current window more pronounced.
This isnt 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 nil :background "#cccccc")
(set-face-attribute 'mode-line-inactive nil :background "#888888")) (set-face-attribute 'mode-line-inactive nil :background "#888888")
#+end_src #+end_src
Oh, and turn off the line highlighting: Oh, and turn off the line highlighting:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(global-hl-line-mode -1) (global-hl-line-mode -1)
#+end_src #+end_src
And of course, the default is /inside/ where it is dark and safe: And of course, the default is /inside/ where it is dark and safe:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(laptop-inside) (laptop-inside)
#+end_src #+end_src
* Full Size Frame * 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). 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).

View file

@ -238,54 +238,46 @@ This is now fine and ffantastic!
* Org Beautify * 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). 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 #+begin_src emacs-lisp
(when window-system (defun ha-word-processor-fonts ()
(let ((default-color (face-attribute 'default :foreground))) "Configure `org-mode' fonts and faces."
(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)) (interactive)
(set-face-attribute face nil :height 1.1
:foreground default-color :weight 'bold
:font ha-variable-header-font))))
#+end_src
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-1 nil :height 2.2)
(set-face-attribute 'org-level-2 nil :height 1.8) (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-3 nil :height 1.4)
(set-face-attribute 'org-level-4 nil :height 1.2)) (set-face-attribute 'org-level-4 nil :height 1.2)
#+end_src
While we are at it, lets 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 (dolist (face '(org-block org-code org-verbatim org-table org-drawer
org-table org-formula org-special-keyword org-block org-table org-formula org-special-keyword org-block
org-property-value org-document-info-keyword)) org-property-value org-document-info-keyword))
(set-face-attribute face nil :inherit 'fixed-pitch :height 0.9))) (set-face-attribute face nil :inherit 'fixed-pitch :height 0.9))
(set-face-attribute 'org-table nil :height 1.0) ;; While we are at it, lets make sure the code blocks are using my fixed with font:
(set-face-attribute 'org-formula nil :height 1.0) (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 #+end_src
Not sure why the above code removes the color of =org-verbatim=, so lets make it stand out slightly:
We call this function when we start:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(set-face-attribute 'org-verbatim nil :foreground "#aaaacc") (ha-word-processor-fonts)
#+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)
#+end_src #+end_src
* Org Modern * 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. 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 #+end_src
* Padding * 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: 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 #+begin_src emacs-lisp
(use-package org-padding (use-package org-padding
:straight (:host github :repo "TonCherAmi/org-padding") :straight (:host github :repo "TonCherAmi/org-padding")
:hook :hook (org-mode . org-padding-mode)
(org-mode . org-padding-mode)
:config :config
(setq org-padding-block-begin-line-padding '(0.5 . 0.3) (setq org-padding-block-begin-line-padding '(0.5 . 0.3)
org-padding-block-end-line-padding '(0.1 . 0.5) org-padding-block-end-line-padding '(0.1 . 0.5)