diff options
| author | Craig Jennings <c@cjennings.net> | 2025-11-03 18:01:24 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-11-03 18:01:24 -0600 |
| commit | c0c4b176ace7910cbc1a71b5ec473873b6d821be (patch) | |
| tree | bbd78f1449630a9a6a5db8ad025205df5dc824a9 /modules/user-constants.el | |
| parent | 9e75fea0cf16c72dfd490b0dcb726e6c7bd023bb (diff) | |
feat: Complete modeline overhaul with custom segments and interactive features
Replaced mood-line with a custom, minimal modeline using only built-in
Emacs functionality to avoid native compilation issues.
**Architecture:**
- Named segment system using defvar-local for easy reordering
- Emacs 30 built-in right-alignment (mode-line-format-right-align)
- All segments marked as risky-local-variable for proper evaluation
**Features:**
- Color-coded buffer names (green=writeable, red=read-only, gold=overwrite)
- VC branch with git symbol (U+E0A0) and state-based coloring
- Position format: L:line C:col
- Help-echo tooltips on all segments
- Mouse click handlers for interactive actions
- String truncation in narrow windows (< 100 chars)
- Active-window-only display for branch and misc-info
**Interactive Actions:**
- Buffer name: mouse-1 = prev-buffer, mouse-3 = next-buffer
- Major mode: mouse-1 = describe-mode
- Git branch: mouse-1 = vc-diff, mouse-3 = vc-root-diff
**Bug Fixes:**
- Disabled async native compilation to prevent "Selecting deleted buffer" errors
- Fixed difftastic loading by changing :demand to :defer
- Abstracted buffer status colors to user-constants.el for reuse
Inspired by Prot's modeline design patterns.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'modules/user-constants.el')
| -rw-r--r-- | modules/user-constants.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/user-constants.el b/modules/user-constants.el index bcb34bcc..ba52cec2 100644 --- a/modules/user-constants.el +++ b/modules/user-constants.el @@ -38,6 +38,15 @@ Example: (setq cj/debug-modules '(org-agenda mail)) (defvar user-mail-address "c@cjennings.net" "The user's email address.") +;; ---------------------------- Buffer Status Colors --------------------------- + +(defconst cj/buffer-status-colors + '((read-only . "#f06a3f") ; red – buffer is read-only + (overwrite . "#c48702") ; gold – overwrite mode + (normal . "#64aa0f")) ; green – insert & read/write + "Alist mapping buffer states to their colors. +Used by cursor color, modeline, and other UI elements.") + ;; ------------------------ Directory And File Constants ----------------------- ;; DIRECTORIES |
