summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.org155
-rw-r--r--themes/tinty-theme.el126
2 files changed, 168 insertions, 113 deletions
diff --git a/config.org b/config.org
index 5617358..88509cf 100644
--- a/config.org
+++ b/config.org
@@ -830,56 +830,54 @@ Not necessary but an eyecandy to look at!
#+begin_src emacs-lisp
(use-package markdown-mode
:ensure t
- :hook (markdown-mode . nb/markdown-unhighlight)
- :init
- (setq-default abbrev-mode t)
+ :mode (("README\\.md\\'" . gfm-mode)
+ ("\\.md\\'" . markdown-mode)
+ ("\\.markdown\\'" . markdown-mode))
+ :hook (markdown-mode . abbrev-mode)
+ :custom
+ ;; Use markdown-mode's display properties only: the source text is never
+ ;; replaced, and markup can always be restored with SPC m v.
+ (markdown-hide-markup t)
+ ;; Let the full markup toggle reveal link destinations as well.
+ (markdown-hide-urls nil)
+ (markdown-header-scaling t)
+ (markdown-header-scaling-values '(1.6 1.3 1.15 1.08 1.0 1.0))
+ (markdown-fontify-code-blocks-natively t)
+ (markdown-asymmetric-header t)
+ (markdown-indent-on-enter 'indent-and-new-item)
+ (markdown-make-gfm-checkboxes-buttons t)
+ (markdown-gfm-uppercase-checkbox nil)
+ (markdown-enable-math t)
+ (markdown-list-item-bullets '("●" "○" "◆" "◇"))
+ (markdown-blockquote-display-char '("▌" ">"))
+ (markdown-hr-display-char '(?─ ?-))
:config
- (defvar nb/current-line '(0 . 0)
- "(start . end) of current line in current buffer")
- (make-variable-buffer-local 'nb/current-line)
-
- (defun nb/unhide-current-line (limit)
- "Font-lock function"
- (let ((start (max (point) (car nb/current-line)))
- (end (min limit (cdr nb/current-line))))
- (when (< start end)
- (remove-text-properties start end
- '(invisible t display "" composition ""))
- (goto-char limit)
- t)))
-
- (defun nb/refontify-on-linemove ()
- "Post-command-hook"
- (let* ((start (line-beginning-position))
- (end (line-beginning-position 2))
- (needs-update (not (equal start (car nb/current-line)))))
- (setq nb/current-line (cons start end))
- (when needs-update
- ;; FIX: Verwende jit-lock-refontify statt font-lock-fontify-block
- (jit-lock-refontify start end))))
-
- (defun nb/markdown-unhighlight ()
- "Enable markdown concealling"
- (interactive)
- (markdown-toggle-markup-hiding 'toggle)
- (font-lock-add-keywords nil '((nb/unhide-current-line)) t)
- ;; FIX: Stelle sicher dass jit-lock aktiv ist
- (jit-lock-register #'font-lock-fontify-region)
- (add-hook 'post-command-hook #'nb/refontify-on-linemove nil t))
+ (defun my/markdown-apply-minimal-faces (&optional _theme)
+ "Apply the quiet, theme-adaptive typography used by Org buffers."
+ (let ((foreground (face-attribute 'default :foreground nil t))
+ (muted (face-attribute 'shadow :foreground nil t)))
+ (dolist (spec '((markdown-header-face-1 1.60 medium)
+ (markdown-header-face-2 1.30 semibold)
+ (markdown-header-face-3 1.15 semibold)
+ (markdown-header-face-4 1.08 semibold)
+ (markdown-header-face-5 1.00 medium)))
+ (set-face-attribute (car spec) nil
+ :family "SF Pro Display"
+ :height (cadr spec)
+ :weight (caddr spec)
+ :foreground foreground))
+ (set-face-attribute 'markdown-header-face-6 nil
+ :family "SF Pro Display" :height 1.0
+ :weight 'regular :foreground muted)
+ (set-face-attribute 'markdown-header-delimiter-face nil
+ :height 0.9 :weight 'normal :foreground muted)
+ (set-face-attribute 'markdown-markup-face nil :foreground muted)))
- :custom-face
- (markdown-header-delimiter-face ((t (:foreground "#616161" :height 0.9))))
- (markdown-header-face-1 ((t (:family "SF Pro Display" :height 1.65 :foreground "#A3BE8C" :weight bold :inherit markdown-header-face))))
- (markdown-header-face-2 ((t (:family "SF Pro Display" :height 1.45 :foreground "#EBCB8B" :weight bold :inherit markdown-header-face))))
- (markdown-header-face-3 ((t (:family "SF Pro Display" :height 1.3 :foreground "#D08770" :weight semibold :inherit markdown-header-face))))
- (markdown-header-face-4 ((t (:family "SF Pro Display" :height 1.2 :foreground "#BF616A" :weight semibold :inherit markdown-header-face))))
- (markdown-header-face-5 ((t (:family "SF Pro Display" :height 1.12 :foreground "#b48ead" :weight medium :inherit markdown-header-face))))
- (markdown-header-face-6 ((t (:family "SF Pro Display" :height 1.08 :foreground "#5e81ac" :weight medium :inherit markdown-header-face))))
- (markdown-code-face ((t (:inherit fixed-pitch))))
- (markdown-inline-code-face ((t (:inherit fixed-pitch))))
- (markdown-pre-face ((t (:inherit fixed-pitch)))))
+ (add-hook 'enable-theme-functions #'my/markdown-apply-minimal-faces)
+ (my/markdown-apply-minimal-faces))
#+end_src
+
** agent-shell
let's give agent-shell another try
@@ -1219,7 +1217,7 @@ Use =org-modern= only for quiet structural markers in Org files. GTD labels, tim
#+begin_src emacs-lisp
#+end_src
-** kitty-graphics
+** COMMENT kitty-graphics
Display inline images in terminal Emacs via the Kitty graphics protocol.
Only activates when running in a Kitty terminal (not in GUI Emacs).
@@ -2941,13 +2939,14 @@ BODY is the xonsh script. PARAMS may include :dir and :cmdline."
:ensure t
:commands (olivetti-mode)
:preface
- (defun my/org-writing-layout ()
- "Use a centered, comfortably spaced writing layout in Org buffers."
+ (defun my/prose-writing-layout ()
+ "Use a centered, comfortably spaced prose-writing layout."
(setq-local olivetti-body-width 88
line-spacing 0.14)
(display-line-numbers-mode -1)
(olivetti-mode 1))
- :hook (org-mode . my/org-writing-layout)
+ :hook ((org-mode . my/prose-writing-layout)
+ (markdown-mode . my/prose-writing-layout))
:custom
(olivetti-style nil) ; Use window margins (fringes disabled in early-init)
(olivetti-margin-width 10) ; No side margins
@@ -4612,6 +4611,62 @@ place. `C-c C-c' commits, `C-c C-k' aborts."
(evil-set-initial-state 'messages-buffer-mode 'normal)
#+end_src
+** markdown-mode
+
+#+begin_src emacs-lisp
+(defvar my/markdown-leader-map (make-sparse-keymap))
+(defvar my/markdown-command-map (make-sparse-keymap))
+(defvar my/markdown-insert-map (make-sparse-keymap))
+(defvar my/markdown-table-map (make-sparse-keymap))
+
+;; Recreate these maps on reload so removed bindings cannot linger.
+(setq my/markdown-leader-map (make-sparse-keymap)
+ my/markdown-command-map (make-sparse-keymap)
+ my/markdown-insert-map (make-sparse-keymap)
+ my/markdown-table-map (make-sparse-keymap))
+(set-keymap-parent my/markdown-leader-map my/leader-map)
+(keymap-set my/markdown-leader-map "m" my/markdown-command-map)
+(keymap-set my/markdown-command-map "v" #'markdown-toggle-markup-hiding)
+(keymap-set my/markdown-command-map "p" #'markdown-toggle-inline-images)
+(keymap-set my/markdown-command-map "j" #'imenu)
+(keymap-set my/markdown-command-map "b" #'markdown-cycle)
+(keymap-set my/markdown-command-map "x" #'markdown-toggle-gfm-checkbox)
+(keymap-set my/markdown-command-map "i" my/markdown-insert-map)
+(keymap-set my/markdown-command-map "t" my/markdown-table-map)
+(keymap-set my/markdown-insert-map "h" #'markdown-insert-header-dwim)
+(keymap-set my/markdown-insert-map "l" #'markdown-insert-link)
+(keymap-set my/markdown-insert-map "i" #'markdown-insert-image)
+(keymap-set my/markdown-insert-map "q" #'markdown-insert-blockquote)
+(keymap-set my/markdown-insert-map "c" #'markdown-insert-code)
+(keymap-set my/markdown-insert-map "C" #'markdown-insert-gfm-code-block)
+(keymap-set my/markdown-insert-map "f" #'markdown-insert-footnote)
+(keymap-set my/markdown-insert-map "r" #'markdown-insert-hr)
+(keymap-set my/markdown-table-map "i" #'markdown-insert-table)
+(keymap-set my/markdown-table-map "a" #'markdown-table-align)
+(keymap-set my/markdown-table-map "r" #'markdown-table-insert-row)
+(keymap-set my/markdown-table-map "R" #'markdown-table-delete-row)
+(keymap-set my/markdown-table-map "c" #'markdown-table-insert-column)
+(keymap-set my/markdown-table-map "C" #'markdown-table-delete-column)
+
+(with-eval-after-load 'markdown-mode
+ (evil-define-key '(normal visual) markdown-mode-map
+ (kbd "SPC") my/markdown-leader-map
+ (kbd "RET") #'markdown-follow-thing-at-point)
+ (evil-define-key 'normal markdown-mode-map
+ (kbd "M-<up>") #'markdown-move-up
+ (kbd "M-<down>") #'markdown-move-down
+ (kbd "M-<left>") #'markdown-promote
+ (kbd "M-<right>") #'markdown-demote)
+ (evil-define-key 'insert markdown-mode-map
+ (kbd "M-SPC") my/markdown-leader-map))
+
+(with-eval-after-load 'which-key
+ (which-key-add-keymap-based-replacements
+ my/markdown-leader-map "m" "markdown")
+ (which-key-add-keymap-based-replacements
+ my/markdown-command-map "i" "insert" "t" "table"))
+#+end_src
+
** org-mode
#+begin_src emacs-lisp
diff --git a/themes/tinty-theme.el b/themes/tinty-theme.el
index 2aee854..a95e684 100644
--- a/themes/tinty-theme.el
+++ b/themes/tinty-theme.el
@@ -65,67 +65,67 @@
(deftheme tinty "Noctalia theme with proper color contrast.")
(let* (;; Tinted8 UI surface colors
- (ui-bg "#282a36")
+ (ui-bg "#22212c")
(ui-fg "#f8f8f2")
- (ui-fg-dim "#6272a4")
+ (ui-fg-dim "#babaab")
;; Use dim foreground for borders/muted chrome so they stay visible in
;; light variants (the raw border color is nearly white on latte).
- (ui-border "#6272a4")
- (ui-line-highlight "#353747")
- (ui-bg-dark "#191a21")
- (ui-bg-light "#343746")
+ (ui-border "#babaab")
+ (ui-line-highlight "#454158")
+ (ui-bg-dark "#201f2e")
+ (ui-bg-light "#36334c")
;; Tinted8 UI accent/status colors
- (ui-accent "#bd93f9")
- (ui-link "#8be9fd")
- (ui-info "#8be9fd")
- (ui-error "#ff5555")
- (ui-success "#50fa7b")
- (ui-warning "#ffb86c")
+ (ui-accent "#b4befe")
+ (ui-link "#80ffea")
+ (ui-info "#8a75f0")
+ (ui-error "#ff9580")
+ (ui-success "#8aff80")
+ (ui-warning "#ffca80")
;; Tinted8 UI container colors (for BACKGROUNDS only)
- (ui-selection-bg "#44475a")
+ (ui-selection-bg "#454158")
(ui-selection-fg "#f8f8f2")
- (ui-button-bg "#343746")
+ (ui-button-bg "#2b293d")
(ui-button-fg "#f8f8f2")
- (ui-tooltip-bg "#343746")
+ (ui-tooltip-bg "#201f2e")
(ui-tooltip-fg "#f8f8f2")
- (ui-active-text-bg "#44475a")
- (ui-active-text-fg "#ffffff")
- (ui-search-bg "#ffb86c")
- (ui-search-fg "#282a36")
+ (ui-active-text-bg "#454158")
+ (ui-active-text-fg "#ededde")
+ (ui-search-bg "#201f2e")
+ (ui-search-fg "#ededde")
;; Tinted8 syntax colors
;; Comments use dim foreground instead of the raw syntax-comment gray,
;; which becomes almost invisible in light variants.
- (syntax-comment "#6272a4")
- (syntax-constant "#ffb86c")
- (syntax-function "#50fa7b")
- (syntax-keyword "#ff79c6")
- (syntax-string "#f1fa8c")
- (syntax-type "#8be9fd")
+ (syntax-comment "#babaab")
+ (syntax-constant "#ffca80")
+ (syntax-function "#8aff80")
+ (syntax-keyword "#ff80bf")
+ (syntax-string "#ffff80")
+ (syntax-type "#80ffea")
;; Give variables/imported names a distinct hue instead of blending into
;; the default foreground.
(syntax-variable "#f8f8f2")
- (syntax-warning "#ff6e6e")
- (syntax-preprocessor "#9954fb")
- (syntax-annotation "#f1fa8c")
- (syntax-attribute "#8be9fd")
- (syntax-number "#ffb86c")
- (syntax-operator "#8be9fd")
+ (syntax-warning "#ff9580")
+ (syntax-preprocessor "#8a75f0")
+ (syntax-annotation "#ffff80")
+ (syntax-attribute "#80ffea")
+ (syntax-number "#ffca80")
+ (syntax-operator "#80ffea")
;; Raw palette colors for rainbow headings, delimiters, terminal faces,
;; and anywhere else we need a predictable hue cycle.
- (pal-red "#ff5555")
- (pal-orange "#ffb86c")
- (pal-yellow "#f1fa8c")
- (pal-green "#50fa7b")
- (pal-cyan "#8be9fd")
- (pal-blue "#bd93f9")
- (pal-magenta "#ff79c6")
- (pal-gray "#6272a4")
+ (pal-red "#ff9580")
+ (pal-orange "#ffca80")
+ (pal-yellow "#ffff80")
+ (pal-green "#8aff80")
+ (pal-cyan "#80ffea")
+ (pal-blue "#9580ff")
+ (pal-magenta "#ff80bf")
+ (pal-gray "#7970a9")
(pal-white "#f8f8f2")
- (pal-black "#21222c")
+ (pal-black "#22212c")
(h1 (if tinty-scale-headings tinty-height-1 1.0))
(h2 (if tinty-scale-headings tinty-height-2 1.0))
(h3 (if tinty-scale-headings tinty-height-3 1.0))
@@ -344,12 +344,12 @@
;; === Terminal colors - mapped to the palette so they stay correct in both variants ===
`(term-color-black ((t (:foreground ,ui-bg-dark :background ,ui-bg-dark))))
- `(term-color-red ((t (:foreground "#ff5555" :background "#ff5555"))))
- `(term-color-green ((t (:foreground "#50fa7b" :background "#50fa7b"))))
- `(term-color-yellow ((t (:foreground "#f1fa8c" :background "#f1fa8c"))))
- `(term-color-blue ((t (:foreground "#bd93f9" :background "#bd93f9"))))
- `(term-color-magenta ((t (:foreground "#ff79c6" :background "#ff79c6"))))
- `(term-color-cyan ((t (:foreground "#8be9fd" :background "#8be9fd"))))
+ `(term-color-red ((t (:foreground "#ff9580" :background "#ff9580"))))
+ `(term-color-green ((t (:foreground "#8aff80" :background "#8aff80"))))
+ `(term-color-yellow ((t (:foreground "#ffff80" :background "#ffff80"))))
+ `(term-color-blue ((t (:foreground "#9580ff" :background "#9580ff"))))
+ `(term-color-magenta ((t (:foreground "#ff80bf" :background "#ff80bf"))))
+ `(term-color-cyan ((t (:foreground "#80ffea" :background "#80ffea"))))
`(term-color-white ((t (:foreground "#f8f8f2" :background "#f8f8f2"))))
;; === EShell ===
@@ -556,14 +556,14 @@
`(ansi-color-magenta ((t (:foreground ,pal-magenta :background ,pal-magenta))))
`(ansi-color-cyan ((t (:foreground ,pal-cyan :background ,pal-cyan))))
`(ansi-color-white ((t (:foreground ,pal-white :background ,pal-white))))
- `(ansi-color-bright-black ((t (:foreground "#6272a4" :background "#6272a4"))))
- `(ansi-color-bright-red ((t (:foreground "#ff6e6e" :background "#ff6e6e"))))
- `(ansi-color-bright-green ((t (:foreground "#69ff94" :background "#69ff94"))))
- `(ansi-color-bright-yellow ((t (:foreground "#ffffa5" :background "#ffffa5"))))
- `(ansi-color-bright-blue ((t (:foreground "#d6acff" :background "#d6acff"))))
- `(ansi-color-bright-magenta ((t (:foreground "#ff92df" :background "#ff92df"))))
- `(ansi-color-bright-cyan ((t (:foreground "#a4ffff" :background "#a4ffff"))))
- `(ansi-color-bright-white ((t (:foreground "#ffffff" :background "#ffffff"))))
+ `(ansi-color-bright-black ((t (:foreground "#36334c" :background "#36334c"))))
+ `(ansi-color-bright-red ((t (:foreground "#ff9580" :background "#ff9580"))))
+ `(ansi-color-bright-green ((t (:foreground "#8aff80" :background "#8aff80"))))
+ `(ansi-color-bright-yellow ((t (:foreground "#ffff80" :background "#ffff80"))))
+ `(ansi-color-bright-blue ((t (:foreground "#9580ff" :background "#9580ff"))))
+ `(ansi-color-bright-magenta ((t (:foreground "#ff80bf" :background "#ff80bf"))))
+ `(ansi-color-bright-cyan ((t (:foreground "#80ffea" :background "#80ffea"))))
+ `(ansi-color-bright-white ((t (:foreground "#ededde" :background "#ededde"))))
;; === Anzu ===
`(anzu-replace-highlight ((t (:background ,ui-line-highlight :foreground ,ui-error :weight bold :strike-through t))))
@@ -632,7 +632,7 @@
`(custom-variable-tag ((t (:foreground ,ui-accent :underline t :extend unspecified))))
`(custom-visibility ((t (:foreground ,ui-link :height 0.8 :underline t))))
- ;; === Built-in packages (batppuccin-inspired additions) ===
+ ;; === Built-in package additions ===
`(anzu-match-1 ((t (:foreground ,ui-bg :background ,pal-blue))))
`(anzu-match-2 ((t (:foreground ,ui-bg :background ,pal-cyan))))
`(anzu-match-3 ((t (:foreground ,ui-bg :background ,pal-orange))))
@@ -1353,14 +1353,14 @@
;; === Term (extended) ===
`(term ((t (:foreground ,ui-fg :background ,ui-bg))))
`(term-bold ((t (:weight bold))))
- `(term-color-bright-black ((t (:foreground "#6272a4" :background "#6272a4"))))
- `(term-color-bright-red ((t (:foreground "#ff6e6e" :background "#ff6e6e"))))
- `(term-color-bright-green ((t (:foreground "#69ff94" :background "#69ff94"))))
- `(term-color-bright-yellow ((t (:foreground "#ffffa5" :background "#ffffa5"))))
- `(term-color-bright-blue ((t (:foreground "#d6acff" :background "#d6acff"))))
- `(term-color-bright-magenta ((t (:foreground "#ff92df" :background "#ff92df"))))
- `(term-color-bright-cyan ((t (:foreground "#a4ffff" :background "#a4ffff"))))
- `(term-color-bright-white ((t (:foreground "#ffffff" :background "#ffffff"))))
+ `(term-color-bright-black ((t (:foreground "#36334c" :background "#36334c"))))
+ `(term-color-bright-red ((t (:foreground "#ff9580" :background "#ff9580"))))
+ `(term-color-bright-green ((t (:foreground "#8aff80" :background "#8aff80"))))
+ `(term-color-bright-yellow ((t (:foreground "#ffff80" :background "#ffff80"))))
+ `(term-color-bright-blue ((t (:foreground "#9580ff" :background "#9580ff"))))
+ `(term-color-bright-magenta ((t (:foreground "#ff80bf" :background "#ff80bf"))))
+ `(term-color-bright-cyan ((t (:foreground "#80ffea" :background "#80ffea"))))
+ `(term-color-bright-white ((t (:foreground "#ededde" :background "#ededde"))))
;; === Transient ===
`(transient-heading ((t (:foreground ,ui-accent :weight bold))))