summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rw-r--r--.config/emacs/.gitignore1
-rw-r--r--.config/emacs/custom.el20
-rw-r--r--.config/emacs/early-init.el5
-rw-r--r--.config/emacs/init.el4
-rw-r--r--.config/emacs/modules/mm-completion.el2
-rw-r--r--.config/emacs/modules/mm-darwin.el8
-rw-r--r--.config/emacs/modules/mm-editing.el8
-rw-r--r--.config/emacs/modules/mm-humanwave.el2
-rw-r--r--.config/emacs/modules/mm-keybindings.el14
-rw-r--r--.config/emacs/modules/mm-modeline.el93
-rw-r--r--.config/emacs/modules/mm-theme.el59
-rw-r--r--.config/emacs/modules/mm-window.el9
-rw-r--r--.config/emacs/site-lisp/smart-tabs-mode.el23
-rw-r--r--.config/emacs/themes/mango-dark-theme.el174
-rw-r--r--.config/emacs/themes/mango-light-theme.el175
15 files changed, 379 insertions, 218 deletions
diff --git a/.config/emacs/.gitignore b/.config/emacs/.gitignore
new file mode 100644
index 0000000..2979f8f
--- /dev/null
+++ b/.config/emacs/.gitignore
@@ -0,0 +1 @@
+/custom.el \ No newline at end of file
diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el
deleted file mode 100644
index 198e881..0000000
--- a/.config/emacs/custom.el
+++ /dev/null
@@ -1,20 +0,0 @@
-;;; -*- lexical-binding: t -*-
-(custom-set-variables
- ;; custom-set-variables was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- '(package-selected-packages nil)
- '(package-vc-selected-packages
- '((vue-ts-mode :url "https://github.com/8uff3r/vue-ts-mode.git"
- :branch "main" :vc-backend Git)
- (gsp-ts-mode :url "https://git.thomasvoss.com/gsp-ts-mode"
- :branch "master" :vc-backend Git)
- (xcompose-mode :url "https://git.thomasvoss.com/xcompose-mode"
- :branch "master" :vc-backend Git))))
-(custom-set-faces
- ;; custom-set-faces was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- )
diff --git a/.config/emacs/early-init.el b/.config/emacs/early-init.el
index 0fbff0f..eec0048 100644
--- a/.config/emacs/early-init.el
+++ b/.config/emacs/early-init.el
@@ -36,9 +36,6 @@
;;; Useful Constants
-(defconst mm-darwin-p (eq system-type 'darwin)
- "This variable is non-nil if Emacs is running on a Darwin system.")
-
(defconst mm-humanwave-p (file-exists-p "~/.humanwavep")
"This variable is non-nil if Emacs is running on a Humanwave system.")
@@ -51,7 +48,7 @@
use-short-answers t
inhibit-splash-screen t
inhibit-startup-buffer-menu t)
-(if mm-darwin-p
+(if (eq system-type 'darwin)
(progn
(add-to-list 'default-frame-alist '(fullscreen . maximized))
(when (featurep 'ns)
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 9a21ff1..f1574e4 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -188,13 +188,13 @@ the buffer without saving it."
(require 'mm-documentation)
(require 'mm-editing)
(require 'mm-keybindings)
-;; (require 'mm-modeline)
+(require 'mm-modeline)
(require 'mm-projects)
(require 'mm-search)
(require 'mm-tetris)
(require 'mm-theme)
(require 'mm-window)
-(when mm-darwin-p
+(when (eq system-type 'darwin)
(require 'mm-darwin))
(when mm-humanwave-p
(require 'mm-humanwave))
diff --git a/.config/emacs/modules/mm-completion.el b/.config/emacs/modules/mm-completion.el
index bd83693..2e6e2e8 100644
--- a/.config/emacs/modules/mm-completion.el
+++ b/.config/emacs/modules/mm-completion.el
@@ -27,7 +27,7 @@
(defun mm-completion-sw-try-completion (string table pred point)
"Return STRING if it matches any candidates."
- (when (mm-completion-space-all-completions string table pred point)
+ (when (mm-completion-sw-all-completions string table pred point)
(cons string point)))
(use-package icomplete
diff --git a/.config/emacs/modules/mm-darwin.el b/.config/emacs/modules/mm-darwin.el
index 6284a8f..bf6fd8b 100644
--- a/.config/emacs/modules/mm-darwin.el
+++ b/.config/emacs/modules/mm-darwin.el
@@ -22,9 +22,9 @@
;;; Set Modifier Keys
-(setopt mac-option-key-is-meta nil
- mac-command-key-is-meta t)
-(setopt mac-option-modifier 'none
- mac-command-modifier 'meta)
+(setopt mac-option-key-is-meta t
+ mac-command-key-is-meta nil)
+(setopt mac-option-modifier 'meta
+ mac-command-modifier 'none)
(provide 'mm-darwin)
diff --git a/.config/emacs/modules/mm-editing.el b/.config/emacs/modules/mm-editing.el
index 5b6c7a4..b876147 100644
--- a/.config/emacs/modules/mm-editing.el
+++ b/.config/emacs/modules/mm-editing.el
@@ -373,4 +373,12 @@ is as described by `emmet-expand-line'."
(use-package subword
:hook prog-mode)
+
+;;; Make Camel-Case More Readable
+
+(use-package glasses-mode
+ :hook prog-mode
+ :custom
+ (glasses-separate-parentheses-p nil))
+
(provide 'mm-editing)
diff --git a/.config/emacs/modules/mm-humanwave.el b/.config/emacs/modules/mm-humanwave.el
index 9af567e..5bb0f86 100644
--- a/.config/emacs/modules/mm-humanwave.el
+++ b/.config/emacs/modules/mm-humanwave.el
@@ -113,7 +113,7 @@ the behaviour of the INCLUDE-ALL-P argument to
(barf-if-buffer-read-only)
(list
default-directory
- (mm-humanwave-project-read-file-name current-prefix-arg)))
+ (mm-humanwave-project-read-file-name current-prefix-arg))))
(let ((path (file-name-sans-extension
(file-relative-name target-file base-directory))))
(unless (string-match-p "/" path)
diff --git a/.config/emacs/modules/mm-keybindings.el b/.config/emacs/modules/mm-keybindings.el
index c0f4957..c6894e4 100644
--- a/.config/emacs/modules/mm-keybindings.el
+++ b/.config/emacs/modules/mm-keybindings.el
@@ -50,7 +50,7 @@ COMMANDS the first command is remapped to the second command."
;; PKG-EXTERN
(use-package kkp
:ensure t
- :unless (or (display-graphic-p) mm-humanwave-p)
+ :unless (display-graphic-p)
:hook (tty-setup . global-kkp-mode))
@@ -99,7 +99,9 @@ COMMANDS the first command is remapped to the second command."
mark-sexp ef-mark-entire-sexp
mark-word ef-mark-entire-word
open-line ef-open-line
- yank ef-yank)
+ yank ef-yank
+
+ vc-dir vc-dir-root)
(with-eval-after-load 'cc-vars
(setopt c-backspace-function #'backward-delete-char))
@@ -111,6 +113,9 @@ COMMANDS the first command is remapped to the second command."
(keymap-global-unset "C-x C-l" :remove) ; ‘downcase-region’
(keymap-global-unset "C-x C-u" :remove) ; ‘upcase-region’
+(with-eval-after-load 'diff-mode
+ (keymap-unset diff-mode-map "M-o" :remove)) ; ‘diff-goto-source’
+
;; The following conflicts with ‘ace-window’
(use-package mhtml-mode
:after ace-window
@@ -157,9 +162,8 @@ COMMANDS the first command is remapped to the second command."
;;; Other Bindings
(with-eval-after-load 'project
- (with-eval-after-load 'grab
- (mm-keybindings-keymap-set project-prefix-map
- "G" #'project-git-grab))
+ (mm-keybindings-keymap-set project-prefix-map
+ "G" #'project-git-grab)
(when mm-humanwave-p
(mm-keybindings-keymap-set project-prefix-map
diff --git a/.config/emacs/modules/mm-modeline.el b/.config/emacs/modules/mm-modeline.el
new file mode 100644
index 0000000..a2e240f
--- /dev/null
+++ b/.config/emacs/modules/mm-modeline.el
@@ -0,0 +1,93 @@
+(defface mm-modeline-modified
+ '((t :inherit font-lock-warning-face :weight bold))
+ "Face for unsaved changes in the modeline.")
+
+(defface mm-modeline-read-only
+ '((t :inherit font-lock-comment-face :weight bold))
+ "Face for read-only status in the modeline.")
+
+(defface mm-modeline-narrowed
+ '((t :inherit font-lock-string-face :weight bold))
+ "Face for narrowed buffer status.")
+
+(defface mm-modeline-overwrite
+ '((t :inherit font-lock-builtin-face :weight bold))
+ "Face for overwrite mode status.")
+
+(defface mm-modeline-region
+ '((t :inherit region :weight bold))
+ "Face for the active region line counter.")
+
+(defface mm-modeline-vc
+ '((t :inherit font-lock-type-face :weight bold))
+ "Face for version control status in the modeline.")
+
+(defface mm-modeline-position
+ '((t :inherit font-lock-constant-face))
+ "Face for the cursor position.")
+
+(defface mm-modeline-major-mode
+ '((t :inherit font-lock-keyword-face :weight bold))
+ "Face for the major mode.")
+
+;; Emacs 30: Tell the right-align feature to align to the window edge
+(setq-default mode-line-right-align-edge 'window)
+
+(setq-default mode-line-format
+ '(
+ "%e" ; Prints memory/eval error messages if they occur
+
+ ;; 3. Read-only & 7. Unsaved changes
+ (:eval
+ (cond
+ (buffer-read-only
+ (propertize " RO " 'face 'mm-modeline-read-only))
+ ((buffer-modified-p)
+ (propertize " ** " 'face 'mm-modeline-modified))
+ (t
+ (propertize " -- " 'face 'shadow))))
+
+ ;; Buffer Name (Added for basic usability)
+ " "
+ (:propertize "%b" face bold)
+
+ ;; Version Control (VC) Status
+ (:eval
+ (when vc-mode
+ (propertize (substring-no-properties vc-mode) 'face 'mm-modeline-vc)))
+ " "
+
+ ;; 4. Narrowing Status
+ (:eval
+ (when (buffer-narrowed-p)
+ (propertize " Narrowed " 'face 'mm-modeline-narrowed)))
+
+ ;; 5. Overwrite Mode Status
+ (:eval
+ (when overwrite-mode
+ (propertize " OVR " 'face 'mm-modeline-overwrite)))
+
+ ;; 6. Active Region Line Count
+ (:eval
+ (when (use-region-p)
+ (let ((lines (count-lines (region-beginning) (region-end))))
+ (propertize (if (= lines 1)
+ "1 line selected "
+ (format "%d lines selected " lines))
+ 'face 'mm-modeline-region))))
+
+ ;; --- EMACS 30 MAGIC ---
+ ;; Everything after this symbol is pushed to the right margin!
+ mode-line-format-right-align
+
+ ;; 1. Major Mode
+ (:propertize " %m " face mm-modeline-major-mode)
+
+ ;; Separator
+ " | "
+
+ ;; 2. Cursor Position (Line & Column)
+ (:propertize "%l:%c " face mm-modeline-position)
+ ))
+
+(provide 'mm-modeline)
diff --git a/.config/emacs/modules/mm-theme.el b/.config/emacs/modules/mm-theme.el
index dc56012..f6aaa6e 100644
--- a/.config/emacs/modules/mm-theme.el
+++ b/.config/emacs/modules/mm-theme.el
@@ -2,30 +2,38 @@
;;; Auto Theme Switching
-(defun mm-theme-switch-theme (darkp)
+(defun mm-theme-switch-theme (style)
"Switch to a light or dark theme."
(mapc #'disable-theme custom-enabled-themes)
- (load-theme (if darkp 'mango-dark 'mango-light) :no-confirm))
-
-(defun mm-theme-dbus-theme-handler (namespace key value)
- "Listen for Freedesktop color-scheme changes and switch themes."
- (when (and (string= namespace "org.freedesktop.appearance")
- (string= key "color-scheme"))
- (let* ((value (car value))
- (darkp (eq value 1)))
- (mm-theme-switch-theme darkp))))
-
-(use-package dbus
- :demand t
- :config
- (when (dbus-ping :session "org.freedesktop.portal.Desktop" 100)
- (dbus-register-signal
- :session
- "org.freedesktop.portal.Desktop"
- "/org/freedesktop/portal/desktop"
- "org.freedesktop.portal.Settings"
- "SettingChanged"
- #'mm-theme-dbus-theme-handler)))
+ (load-theme (pcase style
+ ('light 'mango-light)
+ ('dark 'mango-dark))
+ :no-confirm))
+
+(pcase system-type
+ ('darwin
+ (add-hook 'ns-system-appearance-change-functions
+ #'mm-theme-switch-theme))
+ ('gnu/linux
+ (defun mm-theme-dbus-switch-theme-hook (namespace key value)
+ "Listen for Freedesktop color-scheme changes and switch themes."
+ (when (and (string= namespace "org.freedesktop.appearance")
+ (string= key "color-scheme"))
+ (let* ((value (car value))
+ (style (if (eq value 1) 'dark 'light)))
+ (mm-theme-switch-theme style))))
+
+ (use-package dbus
+ :demand t
+ :config
+ (when (dbus-ping :session "org.freedesktop.portal.Desktop" 100)
+ (dbus-register-signal
+ :session
+ "org.freedesktop.portal.Desktop"
+ "/org/freedesktop/portal/desktop"
+ "org.freedesktop.portal.Settings"
+ "SettingChanged"
+ #'mm-theme-dbus-switch-theme-hook)))))
;;; Disable Cursor Blink
@@ -46,8 +54,9 @@
This is a plist containing a font name, -weight, and -height.")
(defvar mm-theme-proportional-font
- ;; TODO: SF font?
- `(,(if mm-darwin-p "Microsoft Sans Serif" "SF Pro Text")
+ `(,(if (eq system-type 'darwin)
+ "Microsoft Sans Serif"
+ "SF Pro Text")
:weight regular :height 162)
"The default proportional font.
This is a plist containing a font name, -weight, and -height.")
@@ -149,7 +158,7 @@ Also see `mm-theme-ligatures-alist'."
:if (and (display-graphic-p)
(or (seq-contains-p (split-string system-configuration-features)
"HARFBUZZ")
- mm-darwin-p))
+ (eq system-type 'darwin)))
:hook prog-mode
:config
(mm-theme-update-ligatures))
diff --git a/.config/emacs/modules/mm-window.el b/.config/emacs/modules/mm-window.el
index dcbf5b6..2573009 100644
--- a/.config/emacs/modules/mm-window.el
+++ b/.config/emacs/modules/mm-window.el
@@ -76,4 +76,13 @@
(aw-keys (cl-loop for x from ?A to ?Z collect x))
(aw-translate-char-function #'upcase))
+
+;;; Tab Bar Configuration
+
+(use-package tab-bar
+ :custom
+ (tab-bar-separator "")
+ (tab-bar-new-button-show nil)
+ (tab-bar-close-button-show nil))
+
(provide 'mm-window)
diff --git a/.config/emacs/site-lisp/smart-tabs-mode.el b/.config/emacs/site-lisp/smart-tabs-mode.el
index 3177cee..14d6964 100644
--- a/.config/emacs/site-lisp/smart-tabs-mode.el
+++ b/.config/emacs/site-lisp/smart-tabs-mode.el
@@ -36,7 +36,7 @@
;;; Commentary:
-;; This package provide a semantic way of using tab characters in
+;; This package provides a semantic way of using tab characters in
;; source code: tabs for indentation, spaces for alignment.
;;
;; It is derived from <http://www.emacswiki.org/emacs/SmartTabs>
@@ -203,10 +203,10 @@ Smarttabs is enabled in mode hook.")
(defmacro smart-tabs-mode/no-tabs-mode-advice (function)
`(unless (ad-find-advice ',function 'around 'smart-tabs)
- (defadvice ,function (around smart-tabs activate)
+ (define-advice ,function (:around (orig-fun &rest args) smart-tabs)
(if smart-tabs-mode
- (let ((indent-tabs-mode nil)) ad-do-it)
- ad-do-it))))
+ (let ((indent-tabs-mode nil)) (apply orig-fun args))
+ (apply orig-fun args)))))
;;;###autoload
(define-minor-mode smart-tabs-mode
@@ -224,16 +224,15 @@ Smarttabs is enabled in mode hook.")
(unless
(ad-find-advice 'indent-according-to-mode 'around 'smart-tabs)
- (defadvice indent-according-to-mode (around smart-tabs activate)
+ (define-advice indent-according-to-mode (:around (orig-fun &rest args) smart-tabs)
(if smart-tabs-mode
(let ((indent-tabs-mode indent-tabs-mode))
(if (memq indent-line-function
'(indent-relative
indent-relative-maybe))
(setq indent-tabs-mode nil))
- ad-do-it)
- ad-do-it)))
- ))
+ (apply orig-fun args))
+ (apply orig-fun args))))))
;;;###autoload
(defun smart-tabs-mode-enable ()
@@ -243,7 +242,7 @@ Smarttabs is enabled in mode hook.")
;;;###autoload
(defmacro smart-tabs-advice (function offset)
`(progn
- (defadvice ,function (around smart-tabs activate)
+ (define-advice ,function (:around (orig-fun &rest args) smart-tabs)
(cond
((and smart-tabs-mode indent-tabs-mode (eq ,offset tab-width))
(save-excursion
@@ -254,15 +253,15 @@ Smarttabs is enabled in mode hook.")
(let ((tab-width fill-column)
(,offset fill-column))
(unwind-protect
- (progn ad-do-it))))
+ (progn (apply orig-fun args)))))
(t
- ad-do-it)))))
+ (apply orig-fun args))))))
;;;###autoload
(defun smart-tabs-insinuate (&rest languages)
"Enable smart-tabs-mode for LANGUAGES.
LANGUAGES is a list of SYMBOL or NAME as defined in
-'smart-tabs-insinuate-alist' alist or a language using standard named
+`smart-tabs-insinuate-alist' alist or a language using standard named
indent function and indent level.
"
(mapc (lambda (lang)
diff --git a/.config/emacs/themes/mango-dark-theme.el b/.config/emacs/themes/mango-dark-theme.el
index 07059d6..2af3f4d 100644
--- a/.config/emacs/themes/mango-dark-theme.el
+++ b/.config/emacs/themes/mango-dark-theme.el
@@ -7,26 +7,24 @@ were exactly to my liking. It’s about time I had a theme to call my
own.")
(defconst mango-dark-theme-colors-alist
- '((foreground . ("#C5C8C6" "color-251" "white"))
- (background . ("#2B303B" "color-236" "black"))
- (background-cool . ("#363C4A" "color-237" "black"))
- (background-dark . ("#1D2635" "color-234" "black"))
- (background-faint . ("#414859" "color-238" "brightblack"))
- (middleground . ("#4F5561" "color-239" "brightblack"))
- (disabled . ("#999999" "color-246" "brightblack"))
- (celestial-blue . ("#569CD6" "color-74" "brightblue"))
- (dark-red . ("#841A11" "color-88" "red"))
- (khaki . ("#F0E68C" "color-228" "yellow"))
- (lime . ("#B8F182" "color-156" "green"))
- (magenta . ("#ED97F5" "color-213" "magenta"))
- (pale-azure . ("#9CDCFE" "color-117" "cyan"))
- (red . ("#E60026" "color-160" "brightred"))
- (salmon . ("#F1B282" "color-216" "brightyellow"))
- (violet . ("#E57AE5" "color-176" "brightmagenta")))
+ '((fg-main . ("#D1D5D8" "color-251" "white"))
+ (fg-muted . ("#939CA8" "color-246" "brightblack"))
+ (bg-dim . ("#1D232F" "color-234" "black"))
+ (bg-main . ("#2B303B" "color-236" "black"))
+ (bg-alt . ("#363C4A" "color-237" "black"))
+ (bg-hl . ("#414859" "color-238" "brightblack"))
+ (bg-region . ("#4F5561" "color-239" "brightblack"))
+ (blue . ("#569CD6" "color-74" "brightblue"))
+ (cyan . ("#7DC1E6" "color-117" "cyan"))
+ (green . ("#A6E22E" "color-156" "green"))
+ (yellow . ("#E5D070" "color-228" "yellow"))
+ (orange . ("#ECA671" "color-216" "brightyellow"))
+ (red . ("#F24E4E" "color-160" "brightred"))
+ (red-dark . ("#A42A22" "color-88" "red"))
+ (magenta . ("#E183E8" "color-213" "magenta"))
+ (violet . ("#C678DD" "color-176" "brightmagenta")))
"The color palette used throughout `mango-dark-theme'.
-Each color is mapped to a list of colors of the form
-(GUI-HEX 256-COLOR 16-COLOR) for use in true-color, 256-color, and
-16-color modes.")
+Colors are grouped functionally for structured assignment across faces.")
(defsubst mango-dark-theme-color (name &optional display)
"Get the color value of NAME for the given DISPLAY.
@@ -70,78 +68,110 @@ automatically mapped to their correct display colors."
;; Standard Stuff
`(default
,(mango-dark-theme-spec
- :foreground 'foreground
- :background 'background))
+ :foreground 'fg-main
+ :background 'bg-main))
`(fringe
((t (:inherit default))))
+ ;; Modeline
+ `(mm-modeline-modified
+ ,(mango-dark-theme-spec
+ :foreground 'red
+ :weight 'bold))
+ `(mm-modeline-read-only
+ ,(mango-dark-theme-spec
+ :foreground 'yellow
+ :weight 'semi-bold))
+ `(mm-modeline-narrowed
+ ,(mango-dark-theme-spec
+ :foreground 'green
+ :weight 'bold))
+ `(mm-modeline-overwrite
+ ,(mango-dark-theme-spec
+ :foreground 'magenta
+ :weight 'bold))
+ `(mm-modeline-region
+ ,(mango-dark-theme-spec
+ :background 'bg-region
+ :weight 'bold))
+ `(mm-modeline-position
+ ,(mango-dark-theme-spec
+ :foreground 'cyan
+ :weight 'bold))
+ `(mm-modeline-major-mode
+ ,(mango-dark-theme-spec
+ :foreground 'violet
+ :weight 'bold))
+ `(mm-modeline-vc
+ ,(mango-dark-theme-spec
+ :foreground 'green
+ :weight 'bold))
+
+ ;; Tab Bar
+ `(tab-bar
+ ,(mango-dark-theme-spec
+ :background 'bg-alt
+ :foreground 'fg-main))
+ `(tab-bar-tab
+ ,(mango-dark-theme-spec
+ :background 'bg-main
+ :foreground 'fg-main
+ :weight 'bold
+ :underline `( :color ,(mango-dark-theme-color 'blue 'gui)
+ :style line
+ :position -1)))
+ `(tab-bar-tab-inactive
+ ,(mango-dark-theme-spec
+ :background 'bg-dim
+ :foreground 'fg-muted))
+
;; Lines
`(hl-line
,(mango-dark-theme-spec
- :background 'background-faint))
+ :background 'bg-hl))
`(region
,(mango-dark-theme-spec
- :background 'middleground))
+ :background 'bg-region))
`(header-line
,(mango-dark-theme-spec
- :background 'middleground))
+ :background 'bg-region))
`(mode-line-active
- ((t ( :box ,(mango-dark-theme-color 'foreground 'gui)
+ ((t ( :box ,(mango-dark-theme-color 'fg-main 'gui)
:inherit header-line))))
`(mode-line-inactive
,(mango-dark-theme-spec
- :background 'background-cool
+ :background 'bg-alt
+ :box 'bg-hl
:weight 'light))
`(window-divider
,(mango-dark-theme-spec
- :foreground 'background-cool))
+ :foreground 'bg-alt))
`(window-divider-first-pixel
,(mango-dark-theme-spec
- :foreground 'background-cool))
+ :foreground 'bg-alt))
`(window-divider-last-pixel
,(mango-dark-theme-spec
- :foreground 'background-cool))
+ :foreground 'bg-alt))
;; Line Numbers
`(line-number
,(mango-dark-theme-spec
- :foreground 'background-faint
- :background 'background))
+ :foreground 'bg-hl
+ :background 'bg-main))
`(line-number-current-line
,(mango-dark-theme-spec
- :foreground 'salmon
- :background 'background
+ :foreground 'orange
+ :background 'bg-main
:weight 'bold))
;; Documentation
`(font-lock-comment-face
,(mango-dark-theme-spec
- :foreground 'khaki
+ :foreground 'yellow
:weight 'semi-bold))
`(font-lock-doc-face
,(mango-dark-theme-spec
- :foreground 'disabled))
-
- ;; Modeline
- `(mm-modeline-overwrite-face
- ((t (:weight bold))))
- `(mm-modeline-readonly-face
- ((t (:weight bold))))
- `(mm-modeline-buffer-name-face
- ((t (:inherit font-lock-constant-face))))
- `(mm-modeline-buffer-modified-face
- ((t (:inherit shadow))))
- `(mm-modeline-major-mode-name-face
- ((t (:weight bold))))
- `(mm-modeline-major-mode-symbol-face
- ((t (:inherit shadow))))
- `(mm-modeline-git-branch-face
- ((t (:inherit font-lock-constant-face))))
- `(mm-modeline-narrow-face
- ,(mango-dark-theme-spec
- :background 'dark-red
- :box 'dark-red
- :weight 'bold))
+ :foreground 'fg-muted))
;; Core Language
`(font-lock-builtin-face
@@ -151,12 +181,12 @@ automatically mapped to their correct display colors."
:foreground 'violet))
`(font-lock-type-face
,(mango-dark-theme-spec
- :foreground 'celestial-blue))
+ :foreground 'blue))
;; Function-likes
`(font-lock-function-name-face
,(mango-dark-theme-spec
- :foreground 'khaki))
+ :foreground 'yellow))
`(font-lock-preprocessor-face
,(mango-dark-theme-spec
:foreground 'magenta
@@ -168,14 +198,14 @@ automatically mapped to their correct display colors."
:weight bold))))
`(font-lock-variable-name-face
,(mango-dark-theme-spec
- :foreground 'pale-azure))
+ :foreground 'cyan))
;; Other literals
`(help-key-binding
((t (:inherit font-lock-constant-face))))
`(font-lock-number-face
,(mango-dark-theme-spec
- :foreground 'salmon))
+ :foreground 'orange))
;; Org Mode
`(org-quote
@@ -183,16 +213,16 @@ automatically mapped to their correct display colors."
:slant italic))))
`(org-code
,(mango-dark-theme-spec
- :foreground 'salmon))
+ :foreground 'orange))
`(org-verbatim
,(mango-dark-theme-spec
- :foreground 'lime))
+ :foreground 'green))
`(org-block
,(mango-dark-theme-spec
- :background 'background-cool))
+ :background 'bg-alt))
`(org-hide
,(mango-dark-theme-spec
- :foreground 'background))
+ :foreground 'bg-main))
;; Info Page
`(Info-quoted
@@ -205,16 +235,16 @@ automatically mapped to their correct display colors."
((t (:inherit hl-line))))
`(magit-diff-hunk-heading
,(mango-dark-theme-spec
- :background 'background-cool))
+ :background 'bg-alt))
`(magit-diff-hunk-heading-highlight
,(mango-dark-theme-spec
- :background 'middleground))
+ :background 'bg-region))
`(git-commit-summary
,(mango-dark-theme-spec
- :foreground 'khaki))
+ :foreground 'yellow))
`(git-commit-overlong-summary
,(mango-dark-theme-spec
- :foreground 'foreground
+ :foreground 'fg-main
:background 'red
:weight 'bold))
@@ -230,21 +260,21 @@ automatically mapped to their correct display colors."
:weight bold))))
`(marginalia-documentation
,(mango-dark-theme-spec
- :foreground 'disabled
+ :foreground 'fg-muted
:underline nil))
;; Tempel
`(tempel-default
,(mango-dark-theme-spec
:slant 'italic
- :background 'middleground))
+ :background 'bg-region))
`(tempel-field
,(mango-dark-theme-spec
:slant 'italic
- :background 'middleground))
+ :background 'bg-region))
`(tempel-form
,(mango-dark-theme-spec
:slant 'italic
- :background 'middleground)))
+ :background 'bg-region)))
(provide-theme 'mango-dark)
diff --git a/.config/emacs/themes/mango-light-theme.el b/.config/emacs/themes/mango-light-theme.el
index 693a0b3..816dbbc 100644
--- a/.config/emacs/themes/mango-light-theme.el
+++ b/.config/emacs/themes/mango-light-theme.el
@@ -7,26 +7,24 @@ were exactly to my liking. It’s about time I had a theme to call my
own.")
(defconst mango-light-theme-colors-alist
- '((foreground . ("#3B4252" "color-238" "black"))
- (background . ("#ECEFF4" "color-255" "white"))
- (background-cool . ("#E5E9F0" "color-254" "white"))
- (background-dark . ("#FAFBFC" "color-231" "brightwhite"))
- (background-faint . ("#D8DEE9" "color-253" "brightwhite"))
- (middleground . ("#C8D0E0" "color-252" "brightwhite"))
- (disabled . ("#9BA6B5" "color-247" "brightblack"))
- (celestial-blue . ("#1B61CE" "color-26" "blue"))
- (dark-red . ("#A12027" "color-124" "red"))
- (khaki . ("#8A6C23" "color-94" "yellow"))
- (lime . ("#358A2A" "color-28" "green"))
- (magenta . ("#9A35B3" "color-127" "magenta"))
- (pale-azure . ("#0A74B8" "color-31" "cyan"))
- (red . ("#D22129" "color-160" "brightred"))
- (salmon . ("#D1570B" "color-166" "brightyellow"))
- (violet . ("#7A3B9E" "color-97" "magenta")))
+ '((fg-main . ("#2E3440" "color-237" "black"))
+ (fg-muted . ("#6B7A8F" "color-243" "brightblack"))
+ (bg-main . ("#FAFBFC" "color-231" "brightwhite"))
+ (bg-alt . ("#ECEFF4" "color-255" "white"))
+ (bg-dim . ("#E5E9F0" "color-254" "white"))
+ (bg-hl . ("#D8DEE9" "color-253" "brightwhite"))
+ (bg-region . ("#C8D0E0" "color-252" "brightwhite"))
+ (blue . ("#1856B8" "color-26" "blue"))
+ (cyan . ("#006B8F" "color-31" "cyan"))
+ (green . ("#286620" "color-28" "green"))
+ (yellow . ("#735610" "color-94" "yellow"))
+ (orange . ("#B84C09" "color-166" "brightyellow"))
+ (red . ("#B51A22" "color-160" "brightred"))
+ (red-dark . ("#A12027" "color-124" "red"))
+ (magenta . ("#8828A1" "color-127" "magenta"))
+ (violet . ("#6B338A" "color-97" "magenta")))
"The color palette used throughout `mango-light-theme'.
-Each color is mapped to a list of colors of the form
-(GUI-HEX 256-COLOR 16-COLOR) for use in true-color, 256-color, and
-16-color modes.")
+Colors are grouped functionally for structured assignment across faces.")
(defsubst mango-light-theme-color (name &optional display)
"Get the color value of NAME for the given DISPLAY.
@@ -70,78 +68,111 @@ automatically mapped to their correct display colors."
;; Standard Stuff
`(default
,(mango-light-theme-spec
- :foreground 'foreground
- :background 'background))
+ :foreground 'fg-main
+ :background 'bg-main))
`(fringe
((t (:inherit default))))
+ ;; Modeline
+ `(mm-modeline-modified
+ ,(mango-light-theme-spec
+ :foreground 'red
+ :weight 'bold))
+ `(mm-modeline-read-only
+ ,(mango-light-theme-spec
+ :foreground 'yellow
+ :weight 'bold))
+ `(mm-modeline-narrowed
+ ,(mango-light-theme-spec
+ :foreground 'blue
+ :weight 'bold))
+ `(mm-modeline-overwrite
+ ,(mango-light-theme-spec
+ :foreground 'magenta
+ :weight 'bold))
+ `(mm-modeline-region
+ ,(mango-light-theme-spec
+ :foreground 'fg-main
+ :background 'bg-region
+ :weight 'bold))
+ `(mm-modeline-position
+ ,(mango-light-theme-spec
+ :foreground 'cyan
+ :weight 'bold))
+ `(mm-modeline-major-mode
+ ,(mango-light-theme-spec
+ :foreground 'violet
+ :weight 'bold))
+ `(mm-modeline-vc
+ ,(mango-light-theme-spec
+ :foreground 'green
+ :weight 'bold))
+
+ ;; Tab Bar
+ `(tab-bar
+ ,(mango-light-theme-spec
+ :background 'bg-alt
+ :foreground 'fg-main))
+ `(tab-bar-tab
+ ,(mango-light-theme-spec
+ :background 'bg-main
+ :foreground 'fg-main
+ :weight 'bold
+ :underline `( :color ,(mango-light-theme-color 'blue 'gui)
+ :style line
+ :position -1)))
+ `(tab-bar-tab-inactive
+ ,(mango-light-theme-spec
+ :background 'bg-dim
+ :foreground 'fg-muted))
+
;; Lines
`(hl-line
,(mango-light-theme-spec
- :background 'background-faint))
+ :background 'bg-hl))
`(region
,(mango-light-theme-spec
- :background 'middleground))
+ :background 'bg-region))
`(header-line
,(mango-light-theme-spec
- :background 'middleground))
+ :background 'bg-region))
`(mode-line-active
- ((t ( :box ,(mango-light-theme-color 'foreground 'gui)
+ ((t ( :box ,(mango-light-theme-color 'fg-main 'gui)
:inherit header-line))))
`(mode-line-inactive
,(mango-light-theme-spec
- :background 'background-cool
+ :background 'bg-dim
+ :box 'bg-hl
:weight 'light))
`(window-divider
,(mango-light-theme-spec
- :foreground 'background-cool))
+ :foreground 'bg-dim))
`(window-divider-first-pixel
,(mango-light-theme-spec
- :foreground 'background-cool))
+ :foreground 'bg-dim))
`(window-divider-last-pixel
,(mango-light-theme-spec
- :foreground 'background-cool))
+ :foreground 'bg-dim))
;; Line Numbers
`(line-number
,(mango-light-theme-spec
- :foreground 'background-faint
- :background 'background))
+ :foreground 'bg-hl
+ :background 'bg-main))
`(line-number-current-line
,(mango-light-theme-spec
- :foreground 'salmon
- :background 'background
+ :foreground 'orange
+ :background 'bg-main
:weight 'bold))
;; Documentation
`(font-lock-comment-face
,(mango-light-theme-spec
- :foreground 'khaki
+ :foreground 'yellow
:weight 'semi-bold))
`(font-lock-doc-face
,(mango-light-theme-spec
- :foreground 'disabled))
-
- ;; Modeline
- `(mm-modeline-overwrite-face
- ((t (:weight bold))))
- `(mm-modeline-readonly-face
- ((t (:weight bold))))
- `(mm-modeline-buffer-name-face
- ((t (:inherit font-lock-constant-face))))
- `(mm-modeline-buffer-modified-face
- ((t (:inherit shadow))))
- `(mm-modeline-major-mode-name-face
- ((t (:weight bold))))
- `(mm-modeline-major-mode-symbol-face
- ((t (:inherit shadow))))
- `(mm-modeline-git-branch-face
- ((t (:inherit font-lock-constant-face))))
- `(mm-modeline-narrow-face
- ,(mango-light-theme-spec
- :background 'dark-red
- :box 'dark-red
- :weight 'bold))
+ :foreground 'fg-muted))
;; Core Language
`(font-lock-builtin-face
@@ -151,12 +182,12 @@ automatically mapped to their correct display colors."
:foreground 'violet))
`(font-lock-type-face
,(mango-light-theme-spec
- :foreground 'celestial-blue))
+ :foreground 'blue))
;; Function-likes
`(font-lock-function-name-face
,(mango-light-theme-spec
- :foreground 'khaki))
+ :foreground 'yellow))
`(font-lock-preprocessor-face
,(mango-light-theme-spec
:foreground 'magenta
@@ -168,14 +199,14 @@ automatically mapped to their correct display colors."
:weight bold))))
`(font-lock-variable-name-face
,(mango-light-theme-spec
- :foreground 'pale-azure))
+ :foreground 'cyan))
;; Other literals
`(help-key-binding
((t (:inherit font-lock-constant-face))))
`(font-lock-number-face
,(mango-light-theme-spec
- :foreground 'salmon))
+ :foreground 'orange))
;; Org Mode
`(org-quote
@@ -183,16 +214,16 @@ automatically mapped to their correct display colors."
:slant italic))))
`(org-code
,(mango-light-theme-spec
- :foreground 'salmon))
+ :foreground 'orange))
`(org-verbatim
,(mango-light-theme-spec
- :foreground 'lime))
+ :foreground 'green))
`(org-block
,(mango-light-theme-spec
- :background 'background-cool))
+ :background 'bg-dim))
`(org-hide
,(mango-light-theme-spec
- :foreground 'background))
+ :foreground 'bg-main))
;; Info Page
`(Info-quoted
@@ -205,16 +236,16 @@ automatically mapped to their correct display colors."
((t (:inherit hl-line))))
`(magit-diff-hunk-heading
,(mango-light-theme-spec
- :background 'background-cool))
+ :background 'bg-dim))
`(magit-diff-hunk-heading-highlight
,(mango-light-theme-spec
- :background 'middleground))
+ :background 'bg-region))
`(git-commit-summary
,(mango-light-theme-spec
- :foreground 'khaki))
+ :foreground 'yellow))
`(git-commit-overlong-summary
,(mango-light-theme-spec
- :foreground 'foreground
+ :foreground 'fg-main
:background 'red
:weight 'bold))
@@ -230,21 +261,21 @@ automatically mapped to their correct display colors."
:weight bold))))
`(marginalia-documentation
,(mango-light-theme-spec
- :foreground 'disabled
+ :foreground 'fg-muted
:underline nil))
;; Tempel
`(tempel-default
,(mango-light-theme-spec
:slant 'italic
- :background 'middleground))
+ :background 'bg-region))
`(tempel-field
,(mango-light-theme-spec
:slant 'italic
- :background 'middleground))
+ :background 'bg-region))
`(tempel-form
,(mango-light-theme-spec
:slant 'italic
- :background 'middleground)))
+ :background 'bg-region)))
(provide-theme 'mango-light)