Shuffling my fonts ... yet again.
This commit is contained in:
parent
631bdecab1
commit
fcb1fdb11d
5 changed files with 56 additions and 35 deletions
22
README.org
22
README.org
|
@ -1,8 +1,8 @@
|
||||||
#+title: My Emacs Configuration
|
#+TITLE: My Emacs Configuration
|
||||||
#+author: Howard X. Abrams
|
#+AUTHOR: Howard X. Abrams
|
||||||
#+date: 2021-11-01
|
#+DATE: 2021-11-01
|
||||||
#+filetags: emacs readme
|
#+FILETAGS: emacs readme
|
||||||
#+startup: inlineimages
|
#+STARTUP: inlineimages
|
||||||
** Introduction
|
** Introduction
|
||||||
I’ve crafted my Emacs configuration, I cheekily call /hamacs/, in a literate programming model, heavily inspired by my recent journey into [[https://www.youtube.com/watch?v=LKegZI9vWUU][Henrik Lissner's]] [[https://github.com/hlissner/doom-emacs][Doom Emacs]] and [[https://www.spacemacs.org/][Spacemacs]]. While I used both extensively, I decided I would /roll my own/ as Emacs people like myself, tend to be /control freaks/ (at least a little bit).
|
I’ve crafted my Emacs configuration, I cheekily call /hamacs/, in a literate programming model, heavily inspired by my recent journey into [[https://www.youtube.com/watch?v=LKegZI9vWUU][Henrik Lissner's]] [[https://github.com/hlissner/doom-emacs][Doom Emacs]] and [[https://www.spacemacs.org/][Spacemacs]]. While I used both extensively, I decided I would /roll my own/ as Emacs people like myself, tend to be /control freaks/ (at least a little bit).
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Using [[https://howardism.org/Technical/Emacs/literate-devops.html][literate pro
|
||||||
|
|
||||||
I’ve separated my configuration into /chapters/ around particular subjects, applications and programming languages. This feature allows you, dear reader, to jump our to items of interest, but allows me to /selectively load/ individual chapters. For instance, if I’m not doing much with Ruby at work, I can remove that chapter from the list in my [[file:bootstrap.org::*Load the Rest][bootstrap]]. I also don’t load my [[file:ha-display.org][UI configuration]] when I am using the Terminal (doesn’t happen much, actually).
|
I’ve separated my configuration into /chapters/ around particular subjects, applications and programming languages. This feature allows you, dear reader, to jump our to items of interest, but allows me to /selectively load/ individual chapters. For instance, if I’m not doing much with Ruby at work, I can remove that chapter from the list in my [[file:bootstrap.org::*Load the Rest][bootstrap]]. I also don’t load my [[file:ha-display.org][UI configuration]] when I am using the Terminal (doesn’t happen much, actually).
|
||||||
|
|
||||||
Hit me up with questions on Mastodon: [[https://emacs.ch/@howard][@howard@emacs.ch]].
|
Hit me up with questions on Mastodon: [[https://emacs.ch/@howard][@howard@pdx.social]].
|
||||||
|
|
||||||
If you want to try the entire process, after installing Emacs (see my instructions for [[file:README-MacOS.org][both MacOS]] and [[file:README-Linux.org][Linux]]), clone this repo with:
|
If you want to try the entire process, after installing Emacs (see my instructions for [[file:README-MacOS.org][both MacOS]] and [[file:README-Linux.org][Linux]]), clone this repo with:
|
||||||
#+begin_src sh
|
#+begin_src sh
|
||||||
|
@ -29,15 +29,15 @@ To create [[file:~/.emacs.d/init.el][~/.emacs.d/init.el]] which starts the proce
|
||||||
- [[file:bootstrap.org][Bootstrap]] :: configures =straight= and loads basic libraries the rest of the code depends on. It then loads the following files in order.
|
- [[file:bootstrap.org][Bootstrap]] :: configures =straight= and loads basic libraries the rest of the code depends on. It then loads the following files in order.
|
||||||
- [[file:ha-config.org][Configuration]] :: contains /most/ of my configuration, setting up my sequence key menus, evil, etc.
|
- [[file:ha-config.org][Configuration]] :: contains /most/ of my configuration, setting up my sequence key menus, evil, etc.
|
||||||
- [[file:ha-evil.org][Evilness]] :: configuration for using VI, er, ~vim~ keybindings in Emacs.
|
- [[file:ha-evil.org][Evilness]] :: configuration for using VI, er, ~vim~ keybindings in Emacs.
|
||||||
- [[file:ha-general.org][Leader]] :: using the ~SPC~ to kick off a hierarchal order of functions.
|
- [[file:ha-general.org][Leader]] :: using the ~SPC~ to kick off a hierarchical order of functions.
|
||||||
- [[file:ha-display.org][GUI Display]] :: sets up the visual aspects of an Emacs GUI, including themes and fonts.
|
- [[file:ha-display.org][GUI Display]] :: sets up the visual aspects of an Emacs GUI, including font specification and [[file:ha-theme.org][my theme]].
|
||||||
- [[file:ha-dashboard.org][Dashboard]] :: sets up initial window layout of the =main= project with a dashboard.
|
- [[file:ha-dashboard.org][Dashboard]] :: sets up initial window layout of the =main= project with a dashboard.
|
||||||
- [[file:ha-data.org][Data]] :: functions for dealing with a buffer-full of data.
|
- [[file:ha-data.org][Data]] :: functions for dealing with a buffer-full of data.
|
||||||
|
|
||||||
** Org Mode Configuration
|
** Org Mode Configuration
|
||||||
- [[file:ha-org.org][Initial Org Configuration]] :: configures the basics for org-mode formatted files. Specific features come from their own files.
|
- [[file:ha-org.org][Initial Org Configuration]] :: configures the basics for org-mode formatted files. Specific features come from their own files.
|
||||||
- [[file:ha-org-word-processor.org][Word Processing]] :: attempts to make Org files /visually/ look like a word processor, including turning off the colors for headers, and instead increasing their size.
|
- [[file:ha-org-word-processor.org][Word Processing]] :: attempts to make Org files /visually/ look like a word processor, including turning off the colors for headers, and instead increasing their size.
|
||||||
- [[file:ha-org-literate.org][Literate Programming]] :: functions to support literate programming techniques. I use this most prevalently with this Emacs configuration.
|
- [[file:ha-org-literate.org][Literate Programming]] :: functions to support literate programming techniques. I use this with my Emacs configuration.
|
||||||
- [[file:ha-org-clipboard.org][Clipboard]] :: automatically converting HTML from a clipboard into Org-formatted content.
|
- [[file:ha-org-clipboard.org][Clipboard]] :: automatically converting HTML from a clipboard into Org-formatted content.
|
||||||
- [[file:ha-org-journaling.org][Journaling]] :: for writing journal entries and tasks.
|
- [[file:ha-org-journaling.org][Journaling]] :: for writing journal entries and tasks.
|
||||||
- [[file:ha-org-publishing.org][Publishing]] :: code for publishing my website, [[http://howardism.org][www.howardism.org]].
|
- [[file:ha-org-publishing.org][Publishing]] :: code for publishing my website, [[http://howardism.org][www.howardism.org]].
|
||||||
|
@ -82,3 +82,7 @@ Other functions and files come from essays written on [[http://www.howardism.org
|
||||||
#+options: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
|
#+options: num:nil toc:nil todo:nil tasks:nil tags:nil date:nil
|
||||||
#+options: skip:nil author:nil email:nil creator:nil timestamp:nil
|
#+options: skip:nil author:nil email:nil creator:nil timestamp:nil
|
||||||
#+infojs_opt: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
|
#+infojs_opt: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# jinx-local-words: "bitlbee rcirc supe"
|
||||||
|
# End:
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#+title: General Emacs Configuration
|
#+TITLE: General Emacs Configuration
|
||||||
#+author: Howard X. Abrams
|
#+AUTHOR: Howard X. Abrams
|
||||||
#+date: 2020-09-10
|
#+DATE: 2020-09-10
|
||||||
#+tags: emacs
|
#+FILETAGS: emacs
|
||||||
|
#+STARTUP: inlineimages
|
||||||
|
|
||||||
A literate programming file for configuring Emacs.
|
A literate programming file for configuring Emacs.
|
||||||
|
|
||||||
|
@ -24,12 +25,15 @@ A literate programming file for configuring Emacs.
|
||||||
;;
|
;;
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;
|
;;
|
||||||
;; Basic configuration of Emacs. Start early in the loading sequence.
|
;; Basic Emacs configuration settings, ran near the beginning of the
|
||||||
|
;; loading sequence.
|
||||||
;;
|
;;
|
||||||
;;; Code:
|
;;; Code:
|
||||||
#+end_src
|
#+end_src
|
||||||
* Basic Configuration
|
* Basic Configuration
|
||||||
I begin configuration of Emacs that isn’t /package-specific/. For instance, I hate to fat-finger a single letter that could stop Emacs:
|
I begin configuration of Emacs that isn’t /package-specific/.
|
||||||
|
|
||||||
|
I hate to fat-finger a single letter that could stop Emacs:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq confirm-kill-emacs 'yes-or-no-p)
|
(setq confirm-kill-emacs 'yes-or-no-p)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
|
@ -22,6 +22,12 @@ A literate programming file to configure the Emacs UI.
|
||||||
;; ~/src/hamacs/ha-display.org
|
;; ~/src/hamacs/ha-display.org
|
||||||
;; Using `find-file-at-point', and tangle the file to recreate this one .
|
;; Using `find-file-at-point', and tangle the file to recreate this one .
|
||||||
;;
|
;;
|
||||||
|
;;; Commentary:
|
||||||
|
;;
|
||||||
|
;; Configuration settings related to graphical display. Ran when the setting
|
||||||
|
;; `display-graphic-p' is non-nil. Change the fonts, colors and ligatures;
|
||||||
|
;; settings unavailable when ran from a Terminal emulator.
|
||||||
|
;;
|
||||||
;;; Code:
|
;;; Code:
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -288,19 +294,27 @@ brew tap homebrew/cask-fonts
|
||||||
brew install --cask font-hack-nerd-font
|
brew install --cask font-hack-nerd-font
|
||||||
#+end_src
|
#+end_src
|
||||||
** Specifying a Font
|
** Specifying a Font
|
||||||
My /current/ favorite font is actually the top list of fonts that may be installed on my system:
|
|
||||||
|
My /current/ favorite /coding/ font changes often…call me /font-curious/. Since I may/may not have each font installed, I make a list, and pick the first one installed, so I order them:
|
||||||
|
|
||||||
|
- While I like Microsoft’s [[https://github.com/microsoft/cascadia-code][Cascadia]], I’m using [[https://github.com/eliheuer/caskaydia-cove][Caskaydia Cove]] from our beloved [[https://www.nerdfonts.com/font-downloads][NerdFonts]] as it has:
|
||||||
|
- A dot in the 0
|
||||||
|
- Good distinguishing aspects between parens, brackets and braces
|
||||||
|
- Medium level of ligatures, like -> for arrows, but triple === signs don’t make three lines
|
||||||
|
- Less serifs mean less letters
|
||||||
|
- [[https://github.com/emersion/nanum-gothic-coding][Nanum Gothic Coding]] won the [[https://www.codingfont.com][CodingFont Challenge]] for me, like Hack (a fav) but with ligatures
|
||||||
|
- [[https://github.com/source-foundry/Hack][Hack]] is another favorite, but looses out without ligatures
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defvar ha-fixed-font
|
(defvar ha-fixed-font
|
||||||
(when window-system
|
(when window-system
|
||||||
(or
|
(or
|
||||||
(seq-first
|
(seq-first
|
||||||
(seq-filter (lambda (font) (when (x-list-fonts font) font))
|
(seq-filter (lambda (font) (when (x-list-fonts font) font))
|
||||||
'("CaskaydiaCove Nerd Font" ; finally found it
|
'("CaskaydiaCove Nerd Font" ; Best Nerd-based font
|
||||||
;; funky font with litagures and a dotted 0
|
"NanumGothicCoding" ; Winner of codingfont.com
|
||||||
"Cascadia Code PL"
|
"Hack Nerd Font" ; no litagures!?
|
||||||
;; clean font, but no litagures!?
|
"FiraCode Nerd Font" ; has too much ligatures
|
||||||
"Hack Nerd Font"
|
|
||||||
"FiraCode Nerd Font" ; has litagures
|
|
||||||
"Cousine Nerd Font"
|
"Cousine Nerd Font"
|
||||||
"Iosevka Nerd Font"
|
"Iosevka Nerd Font"
|
||||||
"FantasqueSansMono Nerd Font"
|
"FantasqueSansMono Nerd Font"
|
||||||
|
@ -311,21 +325,19 @@ My /current/ favorite font is actually the top list of fonts that may be install
|
||||||
"My fixed width font based on what I have installed.")
|
"My fixed width font based on what I have installed.")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
I probably don't need to have such a ranking system, as chances are good I have them all installed.
|
While I like [[https://www.brailleinstitute.org/freefont/][Atkinson Hyperlegible]] a lot (oh, and [[https://fontesk.com/xcharter-typeface/][Literata]]), I found that [[https://supernotes.app/open-source/sn-pro][SN Pro]] is great for headers as well as matches my monospace font, [[https://github.com/eliheuer/caskaydia-cove/][Caskaydia Cove]].
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defvar ha-variable-font
|
(defvar ha-variable-font
|
||||||
(when window-system
|
(when window-system
|
||||||
(or
|
(or
|
||||||
(seq-first
|
(seq-first
|
||||||
(seq-filter (lambda (font) (when (x-list-fonts font) font))
|
(seq-filter (lambda (font) (when (x-list-fonts font) font))
|
||||||
'("Atkinson Hyperlegible"
|
'("SN Pro"
|
||||||
"SN Pro" ; https://supernotes.app/open-source/sn-pro
|
"Atkinson Hyperlegible"
|
||||||
"Literata" ; Clean, readable with litagures
|
"Literata"
|
||||||
;; Next best can be downloaded here:
|
|
||||||
;; https://fontesk.com/xcharter-typeface/
|
|
||||||
"XCharter"
|
"XCharter"
|
||||||
"Charter"
|
"Charter"
|
||||||
;; Interesting idea: "Iosevka Comfy Motion Duo"
|
|
||||||
"Serif")))
|
"Serif")))
|
||||||
(warn "Cannot find a Serif Font. Install Source Sans Pro."))))
|
(warn "Cannot find a Serif Font. Install Source Sans Pro."))))
|
||||||
|
|
||||||
|
|
|
@ -252,6 +252,7 @@ Color definition injects the /named/ lists defined above (using Org’s =noweb=
|
||||||
)
|
)
|
||||||
"A list of named colors available in theme.")
|
"A list of named colors available in theme.")
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Theme Support
|
* Theme Support
|
||||||
Stole the following macro from Zenburn, which converts color references defined above, but only within the body of the macro. Sweet way to trim down a lot of boilerplate:
|
Stole the following macro from Zenburn, which converts color references defined above, but only within the body of the macro. Sweet way to trim down a lot of boilerplate:
|
||||||
|
|
||||||
|
@ -344,13 +345,13 @@ Let’s make a /theme/:
|
||||||
`(header-line ((t (:foreground ,almond :background ,inactive :extend t))))
|
`(header-line ((t (:foreground ,almond :background ,inactive :extend t))))
|
||||||
`(help-key-binding ((t (:foreground ,gray-80 :weight ultra-bold))))
|
`(help-key-binding ((t (:foreground ,gray-80 :weight ultra-bold))))
|
||||||
`(bold ((t (:foreground ,gray-90 :weight ultra-bold))))
|
`(bold ((t (:foreground ,gray-90 :weight ultra-bold))))
|
||||||
`(italics ((t (:foreground ,gray-95))))
|
`(italics ((t (:foreground ,gray-95 :slant italic))))
|
||||||
`(bold-italic ((t (:foreground "white"))))
|
`(bold-italic ((t (:foreground "white" :slant italic :weight ultra-bold))))
|
||||||
|
|
||||||
`(link ((t (:foreground ,link-color))))
|
`(link ((t (:foreground ,link-color))))
|
||||||
`(link-visited ((t (:foreground ,visited-color))))
|
`(link-visited ((t (:foreground ,visited-color))))
|
||||||
|
|
||||||
`(font-lock-comment-face ((t (:foreground ,gray-60))))
|
`(font-lock-comment-face ((t (:foreground ,gray-60 :slant italic))))
|
||||||
`(font-lock-comment-delimiter-face ((t (:foreground ,gray-50))))
|
`(font-lock-comment-delimiter-face ((t (:foreground ,gray-50))))
|
||||||
`(font-lock-string-face ((t (:foreground ,gray-75))))
|
`(font-lock-string-face ((t (:foreground ,gray-75))))
|
||||||
`(font-lock-type-face ((t (:foreground ,green-lt))))
|
`(font-lock-type-face ((t (:foreground ,green-lt))))
|
||||||
|
|
|
@ -68,9 +68,9 @@ cat > "$HAMACS_DEST/init.el" <<EOF
|
||||||
;;
|
;;
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;
|
;;
|
||||||
;; This is my Emacs Bootloader. Simply put, I initialize the package management
|
;; This is my Emacs Bootloader. Simply put, I initialize the package
|
||||||
;; system, and then tangle my literate files. This simple idea came from
|
;; management system, and then tangle my literate files. This simple
|
||||||
;; https://github.com/susamn/dotfiles
|
;; idea came from https://github.com/susamn/dotfiles
|
||||||
;;
|
;;
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue