summaryrefslogtreecommitdiff
path: root/blendoit
diff options
context:
space:
mode:
authorBlendoit <blendoit@gmail.com>2020-08-12 18:13:11 -0700
committerBlendoit <blendoit@gmail.com>2020-08-12 18:13:11 -0700
commitde0a93daf707f76a9a0f1a964661fc38729e41b0 (patch)
treec7150c7ef34e5d97c2112c4c103ab300739357de /blendoit
parent0898dcd51db89960e9bd44bed98ca138d51c8969 (diff)
Default font is now Hack.
Diffstat (limited to 'blendoit')
-rw-r--r--blendoit/blendoit-init.org140
-rw-r--r--blendoit/blendoit-init.pdfbin217349 -> 219030 bytes
-rw-r--r--blendoit/themes/blendoit-light-theme.el30
3 files changed, 104 insertions, 66 deletions
diff --git a/blendoit/blendoit-init.org b/blendoit/blendoit-init.org
index acfff23..926cb79 100644
--- a/blendoit/blendoit-init.org
+++ b/blendoit/blendoit-init.org
@@ -1,12 +1,11 @@
#+TITLE: My literate GNU Emacs config
#+AUTHOR: Marius Peter
#+DATE: <2020-07-23 Thu>
+#+EMAIL: blendoit@gmail.com
#+STARTUP: showall customtime
-
-#+SETUPFILE: ~/.emacs.d/templates/documents/personal.org
-
-#+INCLUDE: ~/.emacs.d/templates/documents/personal.org_title
+#+SETUPFILE: ~/.emacs.d/templates/documents/general.org
+#+INCLUDE: ~/.emacs.d/templates/documents/general.org_title
\begin{abstract}
GNU Emacs is most often used as a text editor.
@@ -29,14 +28,6 @@ this is the endgame of \textit{literate programming}.
# (org-babel-load-file "~/.emacs.d/blendoit/test.org")
# #+END_SRC
-* README
-:PROPERTIES:
-:UNNUMBERED: t
-:END:
-
-The =README.org= was exported from the first section of my literate configuration
-file, [[file:blendoit-init.org]].
-
* Document structure
:PROPERTIES:
:UNNUMBERED: t
@@ -44,12 +35,11 @@ file, [[file:blendoit-init.org]].
** Blending Linux and Windows
-The GNU Emacs cabal is attempting to create a complete OS out of a text editor.
-
-Microsoft has a notorious /embrace, extend, extinguish/ approach when it comes
-to rival technologies.
-
-Both are simultaneously possible.
+- The GNU Emacs cabal is attempting to create a complete OS out of a text
+ editor.
+- Microsoft has a notorious /embrace, extend, extinguish/ approach when it
+ comes to rival technologies.
+- Both are simultaneously possible.
* TODO First-time setup
@@ -189,11 +179,30 @@ mode.
(global-set-key (kbd "C-`") 'delete-other-windows)
(global-set-key (kbd "C-s") 'save-buffer)
(global-set-key (kbd "C-b") 'ibuffer-sidebar-toggle-sidebar)
- (global-set-key (kbd "C-o") 'menu-find-file-existing)
(global-set-key (kbd "C-r") 'counsel-recentf)
; (global-set-key (kbd "C-n") 'make-frame) ; 7aram!
#+END_SRC
+*** Graphical file open
+
+Open file with ~C-o~.
+
+#+BEGIN_SRC emacs-lisp
+ (global-set-key (kbd "C-o") 'menu-find-file-existing)
+#+END_SRC
+
+We trick Emacs into opening file dialog with ~C-o~ instead of prompting for a file
+in minibuffer.
+
+#+BEGIN_SRC emacs-lisp
+(defadvice find-file-read-args (around find-file-read-args-always-use-dialog-box act)
+ "Simulate invoking menu item as if by the mouse; see `use-dialog-box'."
+ (let ((last-nonmenu-event nil))
+ ad-do-it))
+#+END_SRC
+
+*** Exit behaviours
+
The following bindings lead to more natural exit behaviors.
#+BEGIN_SRC emacs-lisp
@@ -211,7 +220,7 @@ The following bindings lead to more natural exit behaviors.
** Mouse zoom
The typical binding on both GNU/Linux and MS Windows is adequate here: ~C-=~ to
-zoom, ~C--~ to unzoom.
+zoom in, ~C--~ to zoom out.
#+BEGIN_SRC emacs-lisp
(global-set-key (kbd "C--") 'text-scale-decrease)
@@ -322,9 +331,12 @@ First, we hide markup symbols for *bold*, /italic/, _underlined_ and +strikethro
text, and ensure our document appears indented upon loading:[fn::It /appears/
indented, but the underlying plaintext file does not contain tab characters!]
+For the time being, I will in fact display emphasis markers, because hiding
+them corrupts tables.
+
#+NAME: org-basic
#+BEGIN_SRC emacs-lisp
- (setq org-hide-emphasis-markers t)
+;; (setq org-hide-emphasis-markers t)
(setq org-startup-indented t)
#+END_SRC
@@ -347,7 +359,9 @@ normally found in Word:
- Of lists!
- (Rendered with pretty bullets in Emacs)
-*** Org-bullets
+*** ~org-bullets~
+
+No need for ~org-bullets~. MS Windows garbles the 3^{rd} level bullet.
The following prettifies Org mode heading bullets:
@@ -369,7 +383,7 @@ The following prettifies Org mode heading bullets:
The agenda displays a chronological list of headings across all agenda files
for which the heading or body contain a matching =org-time-stamp=.[fn::An
-=org-time-stamp= can be inserted with =C-c .= (period)]
+~org-time-stamp~ can be inserted with ~C-c .~ (period)]
#+BEGIN_SRC emacs-lisp
(global-set-key (kbd "C-c a") 'org-agenda-list)
@@ -483,7 +497,7 @@ LaTeX \rightarrow PDF.
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate)
#+END_SRC
-** gnuplot
+** ~gnuplot~
#+BEGIN_SRC emacs-lisp
(use-package gnuplot)
@@ -515,7 +529,10 @@ LaTeX \rightarrow PDF.
; (local-set-key (quote mouse-2) (quote ibuffer-mouse-toggle-mark))))
#+END_SRC
-** Which-key
+** TODO Sidebar
+Get inspiration from ~ibuffer-sidebar~ and create a better sidebar.
+
+** ~which-key~
#+BEGIN_SRC emacs-lisp
(use-package which-key
@@ -528,14 +545,14 @@ LaTeX \rightarrow PDF.
)
#+END_SRC
-** Company
+** ~company~
#+NAME: company
#+BEGIN_SRC emacs-lisp
; (add-hook 'after-init-hook 'global-company-mode)
#+END_SRC
-** Flycheck
+** ~flycheck~
#+NAME: flycheck
#+BEGIN_SRC emacs-lisp
@@ -543,13 +560,13 @@ LaTeX \rightarrow PDF.
:init (global-flycheck-mode))
#+END_SRC
-** CSV
+** ~csv-mode~
#+BEGIN_SRC emacs-lisp
(use-package csv-mode)
#+END_SRC
-** JSON
+** ~json-mode~
Oí, Jason!
@@ -557,21 +574,21 @@ Oí, Jason!
(use-package json-mode)
#+END_SRC
-** Magit
+** ~magit~
#+BEGIN_SRC emacs-lisp
(use-package magit
:bind ("C-c g" . magit-status))
#+END_SRC
-** PDF-tools
+** ~pdf-tools~
#+BEGIN_SRC emacs-lisp
(use-package pdf-tools)
;; (pdf-tools-install)
#+END_SRC
-** Dashboard
+** ~dashboard~
We replace the standard welcome screen with our own.
@@ -586,7 +603,7 @@ We replace the standard welcome screen with our own.
(setq dashboard-banner-logo-title "A modern professional text editor."))
#+END_SRC
-** rainbow
+** ~rainbow-mode~
This highlights hexadecimal numbers which look like colors, in that same color.
@@ -597,7 +614,7 @@ This highlights hexadecimal numbers which look like colors, in that same color.
(add-hook 'prog-mode-hook 'rainbow-mode))
#+END_SRC
-** Projectile
+** ~projectile~
This enables us to better manage our =.git= projects.
@@ -608,6 +625,12 @@ This enables us to better manage our =.git= projects.
(setq projectile-completion-system 'ivy))
#+END_SRC
+** ~all-the-icons~
+
+#+BEGIN_SRC emacs-lisp
+(use-package all-the-icons)
+#+END_SRC
+
** Better parentheses
#+BEGIN_SRC emacs-lisp
@@ -624,35 +647,50 @@ This enables us to better manage our =.git= projects.
* Cosmetics
-** Faces & cursors
+** Cursors
-In order to imitate other modern text editors, we'll resort to a blinking bar
+In order to imitate other modern text editors, we resort to a blinking bar
cursor. We choose red, the most captivating color, because the cursor is
arguably the region on our screen:
1. most often looked at;
2. most often searched when lost.
-The default cursor already blinks.
-
*** Default cursor
-In files containing only fixed-pitch fonts (i.e. files containing only code),
+In files containing only ~fixed-pitch~ fonts (i.e. files containing only code),
the cursor becomes a high-visibility box.
+In files containing a mix of ~variable-pitch~ and ~fixed-pitch~ fonts, the
+cursor is a more MS Word-like bar.
+
#+BEGIN_SRC emacs-lisp
(setq-default cursor-type (quote box))
+(setq-default mixed-pitch-variable-pitch-cursor (quote bar))
#+END_SRC
-*** Mixed pitch in Org mode
+** Faces
+
+- ~default~: Hack
+ - Legible, modern monospace font
+ - Strict, sharp, uncompromising
+- ~fixed-pitch~: Hack
+- ~variable-pitch~: Liberation Sans
+ - Libre alternative to Arial
+- ~org-block~: Hermit
+ - Slightly wider than Hack
+ - More opinionated shapes
+ - Very legible parentheses
+
+*** ~mixed-pitch~
-Fixed-pitch and variable-pitch fonts will be used intelligently in all hooked
+Fixed-pitch and variable-pitch faces will be used intelligently in all hooked
modes.
#+BEGIN_SRC emacs-lisp
(use-package mixed-pitch
:hook ((org-mode . mixed-pitch-mode)
- (Info-mode . mixed-pitch-mode)))
+ (Info-mode . mixed-pitch-mode)))
#+END_SRC
** Initial frame
@@ -668,17 +706,13 @@ GNU/Linux. Frame transparency increases when focus is lost.
** Theme
+My custom themes.
+
#+BEGIN_SRC emacs-lisp
(setq custom-theme-directory "~/.emacs.d/blendoit/themes/")
(load-theme 'blendoit-light)
#+END_SRC
-** All the icons
-
-#+BEGIN_SRC emacs-lisp
-(use-package all-the-icons)
-#+END_SRC
-
* Editing preferences
These customizations enhance editor usability.
@@ -707,15 +741,13 @@ Disable minibuffer scroll bar.
Originally, I wished to inhibit certain entries in the GUI menus. Not worth the
effort at this time.
-~menu-bar-mode~ is inhibited if on Linux.
-
#+BEGIN_SRC emacs-lisp
(setq menu-bar-mode t)
#+END_SRC
** Coding standards
-This is just a better default.
+This is just a better default. Don't @ me.
#+BEGIN_SRC emacs-lisp
(setq c-default-style "linux"
@@ -753,6 +785,12 @@ Automatically break lines longer than =fill-column=.
(run-at-time nil (* 5 60) 'recentf-save-list)
#+END_SRC
+** ~pop-up-frames~
+
+#+BEGIN_SRC emacs-lisp
+; (setq pop-up-frames (quote graphic-only))
+#+END_SRC
+
* Late setup
** Profiling --- stop
diff --git a/blendoit/blendoit-init.pdf b/blendoit/blendoit-init.pdf
index 7d20fb5..99ca243 100644
--- a/blendoit/blendoit-init.pdf
+++ b/blendoit/blendoit-init.pdf
Binary files differ
diff --git a/blendoit/themes/blendoit-light-theme.el b/blendoit/themes/blendoit-light-theme.el
index d9b93f4..6f1d59b 100644
--- a/blendoit/themes/blendoit-light-theme.el
+++ b/blendoit/themes/blendoit-light-theme.el
@@ -1,21 +1,20 @@
(deftheme blendoit-light
- "Created 2020-08-11.")
+ "Created 2020-08-12.")
(custom-theme-set-faces
'blendoit-light
- '(fixed-pitch ((t (:family "Dejavu Sans Mono"))))
'(variable-pitch ((t (:family "Liberation Sans"))))
'(escape-glyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown"))))
'(homoglyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown"))))
'(minibuffer-prompt ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "medium blue"))))
'(highlight ((t (:underline nil :foreground "#ffffff" :background "#454545"))))
'(region ((t (:background "light gray"))))
- '(shadow ((t (:foreground "dark gray"))))
+ '(shadow ((t (:foreground "dark slate gray"))))
'(secondary-selection ((((class color) (min-colors 88) (background light)) (:background "yellow1")) (((class color) (min-colors 88) (background dark)) (:background "SkyBlue4")) (((class color) (min-colors 16) (background light)) (:background "yellow")) (((class color) (min-colors 16) (background dark)) (:background "SkyBlue4")) (((class color) (min-colors 8)) (:foreground "black" :background "cyan")) (t (:inverse-video t))))
'(trailing-whitespace ((((class color) (background light)) (:background "red1")) (((class color) (background dark)) (:background "red1")) (t (:inverse-video t))))
'(font-lock-builtin-face ((((class grayscale) (background light)) (:weight bold :foreground "LightGray")) (((class grayscale) (background dark)) (:weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "dark slate blue")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Orchid")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 8)) (:weight bold :foreground "blue")) (t (:weight bold))))
'(font-lock-comment-delimiter-face ((t (:foreground "dim gray" :inherit font-lock-comment-face))))
- '(font-lock-comment-face ((t (:inherit variable-pitch :foreground "slate gray" :slant italic))))
+ '(font-lock-comment-face ((t (:slant italic :foreground "slate gray" :inherit variable-pitch))))
'(font-lock-constant-face ((t (:foreground "dark cyan"))))
'(font-lock-function-name-face ((((class color) (min-colors 88) (background light)) (:foreground "Blue1")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Blue")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue")) (((class color) (min-colors 8)) (:weight bold :foreground "blue")) (t (:weight bold :inverse-video t))))
'(font-lock-keyword-face ((t (:foreground "DodgerBlue4"))))
@@ -42,30 +41,31 @@
'(match ((((class color) (min-colors 88) (background light)) (:background "yellow1")) (((class color) (min-colors 88) (background dark)) (:background "RoyalBlue3")) (((class color) (min-colors 8) (background light)) (:foreground "black" :background "yellow")) (((class color) (min-colors 8) (background dark)) (:foreground "white" :background "blue")) (((type tty) (class mono)) (:inverse-video t)) (t (:background "gray"))))
'(next-error ((t (:inherit region))))
'(query-replace ((t (:inherit (isearch)))))
- '(org-table ((t (:box (:line-width 2 :color "gainsboro" :style released-button)))))
'(org-formula ((t (:inherit org-table))))
'(org-meta-line ((t (:foreground "DodgerBlue3" :family "Hermit"))))
'(org-document-title ((t (:width normal :height 2.0 :weight bold :slant normal :underline nil :inherit default))))
- '(org-level-1 ((t (:inherit fixed-pitch :height 1.6 :weight bold))))
- '(org-level-2 ((t (:inherit fixed-pitch :height 1.4 :weight bold))))
- '(org-level-3 ((t (:inherit fixed-pitch :weight bold :height 1.2))))
- '(org-level-4 ((t (:inherit fixed-pitch :weight bold :height 1.1))))
- '(org-date ((t (:family "Liberation Serif" :slant italic :foreground "DodgerBlue3" :inherit link))))
+ '(org-level-1 ((t (:weight bold :height 1.6 :inherit fixed-pitch))))
+ '(org-level-2 ((t (:weight bold :height 1.4 :inherit fixed-pitch))))
+ '(org-level-3 ((t (:height 1.2 :weight bold :inherit fixed-pitch))))
+ '(org-level-4 ((t (:height 1.1 :weight bold :inherit fixed-pitch))))
+ '(org-date ((t (:inherit link :foreground "DodgerBlue3" :slant italic :family "Liberation Serif"))))
'(org-footnote ((t (:foreground "DodgerBlue3" :inherit link))))
- '(org-block ((t (:inherit nil :family "Hermit"))))
'(org-tag ((t (:inherit link :weight bold :foreground "DodgerBlue3"))))
- '(org-document-info ((t (:inherit org-meta-line))))
'(link ((t (:foreground "blue" :underline t))))
'(org-document-info-keyword ((t (:inherit org-meta-line))))
'(dashboard-heading ((t (:inherit font-lock-keyword-face))))
'(org-todo ((t (:foreground "Red1" :box 2 :weight bold))))
'(org-done ((t (:foreground "ForestGreen" :box 2 :weight bold))))
- '(org-code ((t (:inherit default :background "light grey" :foreground "black"))))
+ '(org-code ((t (:background "light grey" :foreground "black"))))
'(org-checkbox-statistics-todo ((t (:inherit org-todo :box nil))))
'(org-checkbox-statistics-done ((t (:inherit org-done :box nil))))
'(org-verbatim ((t (:inherit shadow))))
'(font-lock-doc-face ((t (:inherit font-lock-string-face))))
- '(default ((t (:background "white" :foreground "black" :height 120 :family "Liberation Mono"))))
- '(cursor ((t (:background "orange red")))))
+ '(cursor ((t (:background "red"))))
+ '(org-document-info ((t (:weight bold :inherit variable-pitch))))
+ '(fixed-pitch ((t (:family "Hack"))))
+ '(org-table ((t (:box (:line-width 1 :color "light slate gray") :foreground "dark slate gray" :inherit fixed-pitch))))
+ '(org-block ((t (:family "Hermit"))))
+ '(default ((t (:background "white" :foreground "black" :height 120 :family "Hermit")))))
(provide-theme 'blendoit-light)
Copyright 2019--2024 Marius PETER