aboutsummaryrefslogtreecommitdiff
path: root/modules/ui-config.el
Commit message (Collapse)AuthorAgeFilesLines
* feat(term): replace vterm with ghostel as the terminal engineCraig Jennings11 hours1-9/+10
| | | | | | | | I swapped the terminal engine from vterm to ghostel (libghostty-vt) everywhere. term-config replaces vterm-config (the F12 terminal, the C-; x menu, tmux history capture), and ai-term replaces ai-vterm (the F9 Claude-agent launcher). ghostel renders the agent TUI without vterm's flicker under heavy streaming, and one engine now covers every terminal workflow. Two behavior changes fall out of the swap. F9 launches in a terminal frame now: ghostel renders in TTY frames, so the old GUI-only guard is gone. Terminal windows no longer dim when unfocused: ghostel resolves its palette into the native module per-terminal, so there's no per-window color hook to dim through the way vterm had. auto-dim drops its vterm color-advice path, the dashboard Terminal button launches ghostel, and the vterm and vterm-toggle packages are removed. The tmux pane-history and copy-mode machinery carried over unchanged. It keys on the pty tty, which ghostel exposes.
* docs(load-graph): classify UI and core-UX modulesCraig Jennings12 days1-1/+10
| | | | | | Fourth classification batch: the modules that shape the first interactive frame — ui-config, ui-theme, ui-navigation, font-config, selection-framework, modeline-config, mousetrap-mode, popper-config, dashboard-config, nerd-icons-config. I annotated each header, added a Batch 4 table to the inventory, and extended the validation allowlist. 33 of 102 modules are now classified. These mostly stay eager: each has a real first-frame reason (theme, font, modeline, completion stack, landing page). No new hidden dependencies. popper-config carries the spec's open question about its enabled/disabled state, noted for the deferral phase.
* refactor(ui): four UI/navigation hygiene fixes from module-by-module re-reviewCraig Jennings2026-05-161-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - popper-config.el: move `(popper-mode +1)` and `(popper-echo-mode +1)` from the use-package `:init` block into `:config`. `:disabled t' on use-package skips `:config' but still runs `:init', so the previous shape enabled popper-mode on every load, including batch / test runs, despite the disabled marker. - modeline-config.el: make `cj/modeline-vc-fetch' fall back when the internal `vc-git--symbolic-ref' is missing. `require' uses `nil 'noerror', the call sits inside an `fboundp' guard, and `ignore-errors' wraps the call itself so an Emacs version that renames or removes the accessor leaves `branch' at `vc-working-revision''s output instead of crashing the modeline. - ui-config.el: guard the cursor-color `post-command-hook' behind `(display-graphic-p)' both at install time and inside the function body. Batch / TTY runs short-circuit cleanly with no per-command overhead. A `server-after-make-frame-hook' catches the daemon case where the first GUI frame is created after ui-config loads and installs the hook lazily. Updates test-ui-config--buffer-cursor-state and test-ui-cursor-color-integration to stub `display-graphic-p' so the work body still runs under batch. - nerd-icons-config.el: drop `:demand t' (`:defer t' now), keeping the `:config' advice install as the natural lazy-on-load path. Add a `with-eval-after-load 'nerd-icons' block as a safety net for the already-loaded case on re-eval; the block uses `advice-member-p' so the advice never stacks.
* chore(ui): disable cursor blinking (keep a solid block)Craig Jennings2026-05-121-0/+4
|
* fix(ui-config): use the writeable cursor color in a live vtermCraig Jennings2026-05-111-6/+23
| | | | | | `vterm-mode' sets `buffer-read-only', so `cj/set-cursor-color-according-to-mode' painted the cursor with the read-only color (orange) whenever point was in a vterm. That includes the live terminal, not just `vterm-copy-mode'. But a live terminal takes input: keystrokes go to the process, not the buffer. So a live vterm now reports `unmodified' instead. `vterm-copy-mode' still reports `read-only': there it really is a read-only Emacs buffer the user navigates, and the orange cursor is the right signal. I pulled the state cond out of `cj/set-cursor-color-according-to-mode' into `cj/--buffer-cursor-state' so it's unit-testable without a real frame or `set-cursor-color'.
* fix(ui): Fix cursor color updates with post-command-hookCraig Jennings2025-11-141-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cursor color was not updating correctly when switching buffers or modifying files. The original implementation used window-buffer-change and other specific hooks, but these were insufficient and internal buffers were interfering with cursor color updates. Root cause: - Cursor color is global (one cursor for all of Emacs) - Previous hooks fired in internal buffer contexts (*Echo Area*, *temp*) - This caused cursor to be set to white (unmodified) even when in read-only buffers like dashboard Solution: - Use post-command-hook which runs after every command in current buffer - Ignore internal buffers (names starting with space) - Cache optimization prevents redundant set-cursor-color calls Behavior now: - Dashboard (read-only): Red cursor - Unmodified file: White cursor - Modified file: Green cursor - After save: White cursor Tests: - Added 9 integration tests in test-ui-cursor-color-integration.el - Tests verify hook installation, buffer switching, modification tracking - All 27 tests passing (18 unit + 9 integration) Integration tests catch issues that unit tests miss: - Unit tests verified state detection logic (✓) - Integration tests verify hooks fire at right times (✓ now) - Integration tests verify real buffer switching behavior (✓ now) Cleanup: - Removed debug code from init.el - Removed debug-cursor-color.el temporary file
* feat(ui): Add buffer modification state to color indicatorsCraig Jennings2025-11-141-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change modeline filename and cursor colors to indicate buffer modification status, not just read-only/overwrite state. Color scheme changes: - White (#ffffff): Unmodified writeable buffer - Green (#64aa0f): Modified writeable buffer (unsaved changes) - Red (#f06a3f): Read-only buffer - Gold (#c48702): Overwrite mode active Previously: All writeable buffers were green regardless of modification Now: White when clean, green when dirty (better visual feedback) Implementation: - Updated cj/buffer-status-colors in user-constants.el: - Changed 'normal' → 'unmodified' (white) - Added new 'modified' state (green) - Updated state detection in modeline-config.el: - Now checks (buffer-modified-p) before defaulting to unmodified - Updated cursor color logic in ui-config.el: - Same state detection as modeline for consistency - Added after-change-functions hook for real-time updates - Added after-save-hook to update on save Priority order (highest to lowest): 1. Read-only (red) - takes precedence over everything 2. Overwrite mode (gold) - takes precedence over modified state 3. Modified (green) - buffer has unsaved changes 4. Unmodified (white) - default for clean writeable buffers Tests: - 18 comprehensive tests in test-ui-buffer-status-colors.el - Tests state detection logic and priority order - Tests color constant definitions and mappings - Tests integration with cursor and modeline - All tests passing
* feat: Fix modeline lag and add org multi-level sort with comprehensive testsCraig Jennings2025-11-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Performance improvement and new feature with full test coverage. ## Changes ### 1. Fix modeline line/column position lag (#A priority) - Replace expensive line-number-at-pos with cached %l/%c format specifiers - Enable line-number-mode explicitly for caching - Result: Instant modeline updates, zero performance overhead - Files: modules/modeline-config.el:81-83, modules/ui-config.el:53 ### 2. Implement multi-level org sorting - New function: cj/org-sort-by-todo-and-priority - Sorts by TODO status (TODO before DONE) AND priority (A→B→C→D) - Uses stable sorting: priority first, then TODO state - Gracefully handles empty sections (no error) - Bound to C-; o o (ordering → org sort) - Files: modules/org-config.el:278-299, modules/custom-ordering.el:253,267 ### 3. Comprehensive ERT test suite (12/12 passing) - Normal cases: Mixed TODO/DONE, multiple of same type, same priority - Boundary cases: Empty sections, single entries, no priorities - Error cases: Non-org-mode buffer - Test file: tests/test-org-sort-by-todo-and-priority.el ### 4. Testing improvements discovered - Disable org-mode hooks to avoid package dependencies in batch mode - org-sort-entries must be called from parent heading - Preserve priority cookie in org-get-heading (t t nil t) - Add condition-case to handle "Nothing to sort" gracefully ### 5. Minor cleanup - Comment out chime-debug setting (org-agenda-config.el:267) - Mark modeline lag task as DONE in todo.org ## Technical Details Modeline optimization: - line-number-at-pos is O(n) where n = current line - %l and %c are O(1) lookups from cached values Org sorting algorithm uses stable sort: 1. Sort by priority (A, B, C, D, unprioritized) 2. Sort by TODO status (preserves priority order within groups) Result: TODO [#A], TODO [#B], DONE [#A], DONE [#B], etc.
* feat: Complete modeline overhaul with custom segments and interactive featuresCraig Jennings2025-11-031-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* refactor: ui-config: replace defcustom with defvar for consistencyCraig Jennings2025-10-201-17/+17
| | | | | | | - Change `defcustom` to `defvar` for transparency variables. - Improve error handling in `cj/set-frame-alpha`. - Optimize cursor color update with efficient hooks. - Defer `nerd-icons` loading for better startup performance.
* changing repositoriesCraig Jennings2025-10-121-0/+141