[Emacs Lisp] Personal ~/.emacs.d/ configuration folder.
Mode line changes color upon entering normal mode
Changed files
.gitignore
@@ -1,6 +1,10 @@
1
1
# .gitignore
2
2
.#*
3
3
'#*
4
Added:
*.html
5
Added:
*.tex
6
Added:
*.pdf
4
7
elpa/**
5
8
auto-save-list/**
6
9
transient/**
10
Added:
ido.last
README.org
@@ -1,18 +1,13 @@
1
Removed:
#+TITLE: Marius Peter's GNU Emacs configuration files
1
Added:
#+TITLE: GNU Emacs Configuration
2
2
#+AUTHOR: Marius Peter
3
3
4
4
* Installation
5
Removed:
5
Added:
6
6
** Linux
7
Removed:
1. Backup your current =~/.emacs.d=:
8
Removed:
#+BEGIN_SRC bash
9
Removed:
mv ~/.emacs.d ~/.emacs.d.bkp
10
Removed:
#+END_SRC
7
Added:
1. Backup your current =~/.emacs.d= with the following command:
8
Added:
=mv ~/.emacs.d ~/.emacs.d.bkp=
11
9
2. Clone my configuration folder to your home directory:
12
Removed:
#+BEGIN_SRC bash
13
Removed:
cd ~
14
Removed:
git clone https://github.com/Blendoit/.emacs.d.git
15
Removed:
#+END_SRC
10
Added:
=cd ~= followed by =git clone https://github.com/Blendoit/.emacs.d.git=
16
11
17
12
* Main Files
18
13
@@ -23,7 +18,7 @@
23
18
- You may delete its content initially.
24
19
- By default, all customization options available in Emacs' GUI that can be saved with =Options - Save Options= are saved here.
25
20
- Useful to fool around with GUI customization options, without breaking our manually written code.
26
Removed:
21
Added:
27
22
** =init_blendoit.el=
28
23
- Load my personal configuration files.
29
24
blendoit-ucla-theme.el
@@ -1,5 +1,5 @@
1
1
(deftheme blendoit-ucla
2
Removed:
"Derived from UCLA's official brand colors: http://brand.ucla.edu/identity/colors")
2
Added:
"Created 2019-09-03.")
3
3
4
4
(custom-theme-set-faces
5
5
'blendoit-ucla
@@ -11,10 +11,10 @@
11
11
'(minibuffer-prompt ((t (:foreground "#FFD100"))))
12
12
'(highlight ((t (:background "#FFD100" :foreground "#003B5C"))))
13
13
'(region ((t (:background "#C3D7EE" :distant-foreground "#003B5C"))))
14
Removed:
'(shadow ((((class color grayscale) (min-colors 88) (background light)) (:foreground "grey50")) (((class color grayscale) (min-colors 88) (background dark)) (:foreground "grey70")) (((class color) (min-colors 8) (background light)) (:foreground "green")) (((class color) (min-colors 8) (background dark)) (:foreground "yellow"))))
14
Added:
'(shadow ((t (:foreground "grey70"))))
15
15
'(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))))
16
16
'(trailing-whitespace ((((class color) (background light)) (:background "red1")) (((class color) (background dark)) (:background "red1")) (t (:inverse-video t))))
17
Removed:
'(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))))
17
Added:
'(font-lock-builtin-face ((t (:foreground "LightSteelBlue"))))
18
18
'(font-lock-comment-delimiter-face ((default (:inherit (font-lock-comment-face)))))
19
19
'(font-lock-comment-face ((t (:foreground "#FFD100"))))
20
20
'(font-lock-constant-face ((((class grayscale) (background light)) (:underline (:color foreground-color :style line) :weight bold :foreground "LightGray")) (((class grayscale) (background dark)) (:underline (:color foreground-color :style line) :weight bold :foreground "Gray50")) (((class color) (min-colors 88) (background light)) (:foreground "dark cyan")) (((class color) (min-colors 88) (background dark)) (:foreground "Aquamarine")) (((class color) (min-colors 16) (background light)) (:foreground "CadetBlue")) (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine")) (((class color) (min-colors 8)) (:foreground "magenta")) (t (:underline (:color foreground-color :style line) :weight bold))))
@@ -29,7 +29,6 @@
29
29
'(font-lock-type-face ((((class grayscale) (background light)) (:weight bold :foreground "Gray90")) (((class grayscale) (background dark)) (:weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "ForestGreen")) (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen")) (((class color) (min-colors 16) (background light)) (:foreground "ForestGreen")) (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen")) (((class color) (min-colors 8)) (:foreground "green")) (t (:underline (:color foreground-color :style line) :weight bold))))
30
30
'(font-lock-variable-name-face ((((class grayscale) (background light)) (:slant italic :weight bold :foreground "Gray90")) (((class grayscale) (background dark)) (:slant italic :weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "sienna")) (((class color) (min-colors 88) (background dark)) (:foreground "LightGoldenrod")) (((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod")) (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod")) (((class color) (min-colors 8)) (:weight light :foreground "yellow")) (t (:slant italic :weight bold))))
31
31
'(font-lock-warning-face ((t (:inherit (error)))))
32
Removed:
'(button ((t (:background "white" :foreground "#003B5C"))))
33
32
'(link ((((class color) (min-colors 88) (background light)) (:underline (:color foreground-color :style line) :foreground "RoyalBlue3")) (((class color) (background light)) (:underline (:color foreground-color :style line) :foreground "blue")) (((class color) (min-colors 88) (background dark)) (:underline (:color foreground-color :style line) :foreground "cyan1")) (((class color) (background dark)) (:underline (:color foreground-color :style line) :foreground "cyan")) (t (:inherit (underline)))))
34
33
'(link-visited ((default (:inherit (link))) (((class color) (background light)) (:foreground "magenta4")) (((class color) (background dark)) (:foreground "violet"))))
35
34
'(fringe ((t (:background "#8BB8E8"))))
init.el
@@ -1,7 +1,9 @@
1
1
(require 'package)
2
2
(package-initialize)
3
3
4
Removed:
;; Load settings automatically created by GNU Emacs customize commands
4
Added:
;; Load settings created automatically by GNU Emacs Custom.
5
Added:
;; (For example, any clickable option/toggle is saved here.)
6
Added:
;; Useful for fooling around with A-x customize-group <package>.
5
7
(setq custom-file "~/.emacs.d/init_emacs.el")
6
8
(load custom-file)
7
9
init_blendoit.el
@@ -1,12 +1,29 @@
1
1
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
2
2
3
Removed:
;; Who are we kidding.
4
3
(require 'evil-leader) ;; All hail our evil leader!
5
4
(global-evil-leader-mode) ;; The evil leader has gone global...
6
5
(load "~/.emacs.d/init_evil-leader-keys.el") ;; My custom evil-leader key bindings.
7
6
(require 'evil) ;; Let's follow in our leader's footsteps and become evil ourselves.
8
7
(evil-mode 1)
9
8
9
Added:
;; TODO
10
Added:
;; Change color of mode line upon entering and leaving evil-mode.
11
Added:
;;(setq original-background (face-attribute 'mode-line :background))
12
Added:
;;(setq normal-state-background "#FF4F00")
13
Added:
;;(if evil-mode
14
Added:
;; (set-face-attribute 'mode-line nil :background normal-state-background)
15
Added:
;; '(set-face-attribute 'mode-line nil :background original-background)
16
Added:
;; )
17
Added:
18
Added:
(setq original-background (face-attribute 'mode-line :background))
19
Added:
(setq normal-state-background "#FF4F00")
20
Added:
(add-hook 'evil-normal-state-entry-hook
21
Added:
(lambda ()
22
Added:
(set-face-attribute 'mode-line nil :background normal-state-background)))
23
Added:
(add-hook 'evil-normal-state-exit-hook
24
Added:
(lambda ()
25
Added:
(set-face-attribute 'mode-line nil :background original-background)))
26
Added:
10
27
;; Interactively Do Things - add powerful features to common Emacs commands.
11
28
(setq ido-enable-flex-matching t)
12
29
(setq ido-everywhere t)
@@ -22,7 +39,7 @@
22
39
(setq auto-save-file-name-transforms
23
40
`((".*" ,temporary-file-directory t)))
24
41
25
Removed:
;; GNU Emacs GUI transparency
42
Added:
;; Emacs GUI transparency
26
43
;;(set-frame-parameter (selected-frame) 'alpha '(<active> . <inactive>))
27
44
;;(set-frame-parameter (selected-frame) 'alpha <both>)
28
45
(set-frame-parameter (selected-frame) 'alpha '(85 . 50))
init_emacs.el
@@ -3,21 +3,37 @@
3
3
;; If you edit it by hand, you could mess it up, so be careful.
4
4
;; Your init file should contain only one such instance.
5
5
;; If there is more than one, they won't work right.
6
Added:
'(blink-cursor-mode t)
6
7
'(custom-enabled-themes (quote (blendoit-ucla)))
7
8
'(custom-safe-themes
8
9
(quote
9
Removed:
("37d9d29b4be64ce7f3bcee989b5b4e410520c44ed61db200dc80518abdf2de5d" "f3c5904d7b27f967f9bc93ef21757e84752b52a3d091a535e32bca4324c95419" default)))
10
Added:
("c0b9ce02572ae56f7e41b8cc05d878af55c804f42a962274e929b196d010998e" "37d9d29b4be64ce7f3bcee989b5b4e410520c44ed61db200dc80518abdf2de5d" "f3c5904d7b27f967f9bc93ef21757e84752b52a3d091a535e32bca4324c95419" default)))
10
11
'(display-line-numbers-type (quote visual))
12
Added:
'(evil-want-C-w-delete nil)
13
Added:
'(evil-want-C-w-in-emacs-state t)
11
14
'(global-display-line-numbers-mode t)
12
15
'(package-selected-packages
13
16
(quote
14
Removed:
(pdf-tools org-bullets magit latex-preview-pane evil-leader)))
17
Added:
(writeroom-mode pdf-tools org-bullets magit latex-preview-pane evil-leader)))
15
18
'(scroll-bar-mode nil)
16
19
'(show-paren-mode t)
17
Removed:
'(tool-bar-mode nil))
20
Added:
'(tool-bar-mode nil)
21
Added:
'(writeroom-global-effects
22
Added:
(quote
23
Added:
(writeroom-set-fullscreen writeroom-set-menu-bar-lines writeroom-set-tool-bar-lines writeroom-set-vertical-scroll-bars writeroom-set-bottom-divider-width writeroom-set-internal-border-width)))
24
Added:
'(writeroom-restore-window-config t))
18
25
(custom-set-faces
19
26
;; custom-set-faces was added by Custom.
20
27
;; If you edit it by hand, you could mess it up, so be careful.
21
28
;; Your init file should contain only one such instance.
22
29
;; If there is more than one, they won't work right.
23
Removed:
'(default ((t (:family "Hack" :foundry "SRC" :slant normal :weight normal :height 174 :width normal)))))
30
Added:
'(default ((t (:family "Hack" :foundry "SRC" :slant normal :weight normal :height 174 :width normal))))
31
Added:
'(org-document-title ((t (:inherit default :weight bold :foreground "white" :family "Verdana" :height 2.0 :underline nil))))
32
Added:
'(org-level-1 ((t (:inherit default :weight bold :foreground "white" :family "Verdana" :height 1.75))))
33
Added:
'(org-level-2 ((t (:inherit default :weight bold :foreground "white" :family "Verdana" :height 1.5))))
34
Added:
'(org-level-3 ((t (:inherit default :weight bold :foreground "white" :family "Verdana" :height 1.25))))
35
Added:
'(org-level-4 ((t (:inherit default :weight bold :foreground "white" :family "Verdana" :height 1.1))))
36
Added:
'(org-level-5 ((t (:inherit default :weight bold :foreground "white" :family "Verdana"))))
37
Added:
'(org-level-6 ((t (:inherit default :weight bold :foreground "white" :family "Verdana"))))
38
Added:
'(org-level-7 ((t (:inherit default :weight bold :foreground "white" :family "Verdana"))))
39
Added:
'(org-level-8 ((t (:inherit default :weight bold :foreground "white" :family "Verdana")))))
init_evil-leader-keys.el
@@ -1,14 +1,16 @@
1
1
;; All hail our evil leader!
2
2
3
Removed:
(evil-leader/set-leader ";")
3
Added:
;; prefix to the following commands in evil-mode
4
Added:
(evil-leader/set-leader ";")
4
5
5
6
(evil-leader/set-key
6
Removed:
"e" 'ido-find-file
7
Removed:
"w" 'save-buffer
8
Removed:
"r" 'eval-buffer
9
Removed:
"b" 'ido-switch-buffer
10
Removed:
"q" 'save-buffers-kill-terminal
11
Removed:
"k" 'kill-buffer-and-window
12
Removed:
"x" 'shell
13
Removed:
"g" 'magit-status
14
Removed:
"d" 'ido-dired)
7
Added:
"e" 'ido-find-file ;; edit a file (TAB steals a buffer for autocompletion)
8
Added:
"f" 'writeroom-mode ;; focus the current buffer
9
Added:
"w" 'save-buffer ;; write
10
Added:
"r" 'eval-buffer ;; reload
11
Added:
"b" 'ido-switch-buffer ;; buffer switch (RET switches to last buffer)
12
Added:
"q" 'save-buffers-kill-terminal ;; quit
13
Added:
"k" 'kill-buffer-and-window ;; kill
14
Added:
"x" 'shell ;; execute
15
Added:
"g" 'magit-status ;; git
16
Added:
"d" 'ido-dired) ;; directory (RET opens current directory)
init_latex.el
@@ -1,17 +0,0 @@
1
Removed:
;; Function obtained from https://wiki.archlinux.org/index.php/Emacs#SyncTeX_support
2
Removed:
3
Removed:
(defcustom tex-my-viewer "zathura --fork -s -x \"emacsclient --eval '(progn (switch-to-buffer (file-name-nondirectory \"'\"'\"%{input}\"'\"'\")) (goto-line %{line}))'\""
4
Removed:
"PDF Viewer for TeX documents. You may want to fork the viewer
5
Removed:
so that it detects when the same document is launched twice, and
6
Removed:
persists when Emacs gets closed.
7
Removed:
8
Removed:
Simple command:
9
Removed:
10
Removed:
zathura --fork
11
Removed:
12
Removed:
We can use
13
Removed:
14
Removed:
emacsclient --eval '(progn (switch-to-buffer (file-name-nondirectory \"%{input}\")) (goto-line %{line}))'
15
Removed:
16
Removed:
to reverse-search a pdf using SyncTeX. Note that the quotes and double-quotes matter and must be escaped appropriately."
17
Removed:
:safe 'stringp)
init_org-mode.el
@@ -1,2 +1,29 @@
1
Added:
;; Org-mode bullets use UTF-8 bullets
1
2
(require 'org-bullets)
2
3
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
4
Added:
5
Added:
;; Long lines will flow and adjust to window.
6
Added:
(add-hook 'org-mode-hook 'visual-line-mode)
7
Added:
;; Hide characters that make text bold/italic/underlined
8
Added:
(setq org-hide-emphasis-markers t)
9
Added:
10
Added:
;; org-mode fonts
11
Added:
(let* ((variable-tuple
12
Added:
(cond ;;((x-list-fonts "Source Sans Pro") '(:font "Source Sans Pro"))
13
Added:
;;((x-list-fonts "Lucida Grande") '(:font "Lucida Grande"))
14
Added:
((x-list-fonts "Verdana") '(:font "Verdana"))
15
Added:
(nil (warn "Cannot find a Sans Serif Font. Install Source Sans Pro."))))
16
Added:
(base-font-color (face-foreground 'default nil 'default))
17
Added:
(headline `(:inherit default :weight bold :foreground ,base-font-color)))
18
Added:
19
Added:
(custom-theme-set-faces
20
Added:
'user
21
Added:
`(org-level-8 ((t (,@headline ,@variable-tuple))))
22
Added:
`(org-level-7 ((t (,@headline ,@variable-tuple))))
23
Added:
`(org-level-6 ((t (,@headline ,@variable-tuple))))
24
Added:
`(org-level-5 ((t (,@headline ,@variable-tuple))))
25
Added:
`(org-level-4 ((t (,@headline ,@variable-tuple :height 1.1))))
26
Added:
`(org-level-3 ((t (,@headline ,@variable-tuple :height 1.25))))
27
Added:
`(org-level-2 ((t (,@headline ,@variable-tuple :height 1.5))))
28
Added:
`(org-level-1 ((t (,@headline ,@variable-tuple :height 1.75))))
29
Added:
`(org-document-title ((t (,@headline ,@variable-tuple :height 2.0 :underline nil))))))