diff options
| -rw-r--r-- | config.el | 60 | ||||
| -rw-r--r-- | config.org | 60 | ||||
| -rw-r--r-- | lisp/croc-ui.el | 37 | ||||
| -rw-r--r-- | lisp/denote-menu.el | 30 | ||||
| -rw-r--r-- | lisp/feed-ui.el | 14 | ||||
| -rw-r--r-- | lisp/my-mode-line.el | 42 | ||||
| -rw-r--r-- | lisp/sync-ui.el | 17 | ||||
| -rw-r--r-- | themes/tinty-theme.el | 138 |
8 files changed, 221 insertions, 177 deletions
@@ -291,6 +291,10 @@ Selects the compilation window so the cursor lands in it." (defun my/helix-ignore-key () (interactive)) +(defconst my/helix-emacs-prefix-keys + (list ?\C-c ?\C-x) + "Prefix keys that should fall through to normal Emacs keymaps.") + (defun my/helix-make-fallback-keymap (block-characters) (let ((keymap (make-keymap))) (set-char-table-range @@ -310,8 +314,15 @@ Selects the compilation window so the cursor lands in it." (event-convert-list (append modifiers (list character)))) #'my/helix-ignore-key))) + (dolist (key my/helix-emacs-prefix-keys) + (set-char-table-range (cadr keymap) key nil)) keymap)) +(defun my/helix-let-emacs-prefixes-through (&rest keymaps) + (dolist (keymap keymaps) + (dolist (key my/helix-emacs-prefix-keys) + (define-key keymap (vector key) nil)))) + (defvar my/helix-normal-fallback-keymap (my/helix-make-fallback-keymap t)) @@ -348,10 +359,19 @@ Selects the compilation window so the cursor lands in it." my/helix-terminal-insert-state-keymap (alist-get helix--current-state helix--state-to-keymap-alist))) +(defvar my/helix-preserve-local-map-modes + '(magit-mode magit-section-mode magit-blame-read-only-mode) + "Modes whose local keymaps should stay behind Helix mode overrides.") + +(defun my/helix-preserve-local-map-p () + (seq-some #'derived-mode-p my/helix-preserve-local-map-modes)) + (defun my/helix-refresh-overriding-maps () (let* ((state helix--current-state) (state-mode (alist-get state helix-state-mode-alist)) (base-keymap (my/helix-state-base-keymap)) + (local-keymap (when (my/helix-preserve-local-map-p) + (current-local-map))) overrides) (dolist (priority '(4 3 2 1)) (let (matches) @@ -366,9 +386,15 @@ Selects the compilation window so the cursor lands in it." (push (cons state-mode - (if overrides - (make-composed-keymap overrides base-keymap) - base-keymap)) + (cond + ((and overrides local-keymap) + (make-composed-keymap overrides + (make-composed-keymap local-keymap base-keymap))) + (overrides + (make-composed-keymap overrides base-keymap)) + (local-keymap + (make-composed-keymap local-keymap base-keymap)) + (t base-keymap))) minor-mode-overriding-map-alist))) (defun my/helix-refresh-all-buffers () @@ -424,7 +450,8 @@ Selects the compilation window so the cursor lands in it." 'vterm-mode 'eat-mode 'eshell-mode - 'shell-mode)) + 'shell-mode + 'agent-shell-mode)) (defun my/helix-set-line-numbers (style) (if (my/helix-line-numbers-disabled-p) @@ -432,7 +459,7 @@ Selects the compilation window so the cursor lands in it." (setq display-line-numbers style))) (use-package helix - :ensure nil + :ensure (:wait t) :demand t :hook ((helix-normal-mode . (lambda () (my/helix-set-line-numbers 'relative))) (helix-insert-mode . (lambda () (my/helix-set-line-numbers t)))) @@ -458,6 +485,9 @@ Selects the compilation window so the cursor lands in it." (my/helix-install-fallback-keymap helix-insert-state-keymap my/helix-insert-fallback-keymap) + (my/helix-let-emacs-prefixes-through + helix-normal-state-keymap + helix-insert-state-keymap) (helix-define-key 'normal (kbd "C-u") #'my/helix-scroll-half-page-up) (helix-define-key 'normal (kbd "C-d") #'my/helix-scroll-half-page-down) (helix-define-key 'normal (kbd "C-i") #'xref-go-forward) @@ -493,6 +523,7 @@ Selects the compilation window so the cursor lands in it." (helix-define-key 'insert (kbd "C-x") #'completion-at-point) (helix-define-key 'insert (kbd "C-r") #'insert-register) (helix-define-key 'insert (kbd "M-x") #'helm-M-x) + (helix-define-key 'insert (kbd "M-SPC") 'helix-space-map) (helix-define-key 'insert (kbd "C-w") #'backward-kill-word) (helix-define-key 'insert (kbd "M-DEL") #'backward-kill-word) (helix-define-key 'insert (kbd "M-d") #'kill-word) @@ -523,12 +554,14 @@ Selects the compilation window so the cursor lands in it." (helix-jj-setup 0.2)) (use-package embrace + :ensure (:wait t) :defer t :hook ((org-mode . embrace-org-mode-hook) (emacs-lisp-mode . embrace-emacs-lisp-mode-hook)) :bind (("C-," . embrace-commander))) (use-package multiple-cursors + :ensure (:wait t) :defer t) (with-eval-after-load 'helix @@ -905,6 +938,8 @@ Selects the compilation window so the cursor lands in it." ("/" . isearch-forward) ("n" . isearch-repeat-forward) ("N" . isearch-repeat-backward) + ("RET" . magit-visit-thing) + ("<return>" . magit-visit-thing) ("q" . magit-mode-bury-buffer) ("S-SPC" . magit-diff-show-or-scroll-up) ("S-DEL" . magit-diff-show-or-scroll-down) @@ -942,7 +977,9 @@ Selects the compilation window so the cursor lands in it." ("[" . magit-section-backward-sibling) ("]" . magit-section-forward-sibling) ("TAB" . magit-section-toggle) - ("S-TAB" . magit-section-cycle-global))) + ("<tab>" . magit-section-toggle) + ("S-TAB" . magit-section-cycle-global) + ("<backtab>" . magit-section-cycle-global))) (helix-define-key 'normal (kbd (car binding)) @@ -1828,6 +1865,7 @@ Temporarily disables notifications during the fetch." (use-package agent-shell :ensure t + :hook (agent-shell-mode . my/disable-line-numbers) :config (advice-add 'shell-maker-submit :after #'my/agent-shell-autoscroll) (dolist (rule (my/agent-shell-display-buffer-rules)) @@ -1841,6 +1879,10 @@ Temporarily disables notifications during the fetch." (setq agent-shell-activity-group-header-label-function #'agent-shell-activity-group-descriptive-label) + (with-eval-after-load 'helix + (helix-define-key 'normal (kbd "RET") #'agent-shell-submit 'agent-shell-mode) + (helix-define-key 'normal (kbd "<return>") #'agent-shell-submit 'agent-shell-mode) + (my/helix-refresh-all-buffers)) ;; Work around agent-shell's `window-system' guard so clipboard images ;; work in terminal Emacs (`emacs -nw'). The underlying save routine @@ -1989,12 +2031,11 @@ Temporarily disables notifications during the fetch." :demand t :custom (age-program "rage") - (age-default-identity "~/.config/age/keys.txt") + (age-default-identity "~/.config/passage/identities") (age-default-recipient '("age188928acysrh9zpc3rk6q4lqmf3qlpjx3s26m6k3p6kah63gcws7sx3jeej" "age1mhvdwh6cvd70hm5dcptc4xca2xnkf383g6706ful6kmrudwdysvq0eytym")) :config - (setenv "PINENTRY_PROGRAM" "pinentry-gnome3") (setenv "PASSAGE_DIR" (expand-file-name "~/pass")) (age-file-enable)) @@ -2040,7 +2081,8 @@ TITLE names the new denote-style file in ~/org." :ensure (:wait t)) (use-package s - :ensure (:wait t)) + :ensure nil + :demand t) (use-package with-editor :ensure (:wait t)) @@ -337,6 +337,10 @@ Selects the compilation window so the cursor lands in it." (defun my/helix-ignore-key () (interactive)) +(defconst my/helix-emacs-prefix-keys + (list ?\C-c ?\C-x) + "Prefix keys that should fall through to normal Emacs keymaps.") + (defun my/helix-make-fallback-keymap (block-characters) (let ((keymap (make-keymap))) (set-char-table-range @@ -356,8 +360,15 @@ Selects the compilation window so the cursor lands in it." (event-convert-list (append modifiers (list character)))) #'my/helix-ignore-key))) + (dolist (key my/helix-emacs-prefix-keys) + (set-char-table-range (cadr keymap) key nil)) keymap)) +(defun my/helix-let-emacs-prefixes-through (&rest keymaps) + (dolist (keymap keymaps) + (dolist (key my/helix-emacs-prefix-keys) + (define-key keymap (vector key) nil)))) + (defvar my/helix-normal-fallback-keymap (my/helix-make-fallback-keymap t)) @@ -394,10 +405,19 @@ Selects the compilation window so the cursor lands in it." my/helix-terminal-insert-state-keymap (alist-get helix--current-state helix--state-to-keymap-alist))) +(defvar my/helix-preserve-local-map-modes + '(magit-mode magit-section-mode magit-blame-read-only-mode) + "Modes whose local keymaps should stay behind Helix mode overrides.") + +(defun my/helix-preserve-local-map-p () + (seq-some #'derived-mode-p my/helix-preserve-local-map-modes)) + (defun my/helix-refresh-overriding-maps () (let* ((state helix--current-state) (state-mode (alist-get state helix-state-mode-alist)) (base-keymap (my/helix-state-base-keymap)) + (local-keymap (when (my/helix-preserve-local-map-p) + (current-local-map))) overrides) (dolist (priority '(4 3 2 1)) (let (matches) @@ -412,9 +432,15 @@ Selects the compilation window so the cursor lands in it." (push (cons state-mode - (if overrides - (make-composed-keymap overrides base-keymap) - base-keymap)) + (cond + ((and overrides local-keymap) + (make-composed-keymap overrides + (make-composed-keymap local-keymap base-keymap))) + (overrides + (make-composed-keymap overrides base-keymap)) + (local-keymap + (make-composed-keymap local-keymap base-keymap)) + (t base-keymap))) minor-mode-overriding-map-alist))) (defun my/helix-refresh-all-buffers () @@ -470,7 +496,8 @@ Selects the compilation window so the cursor lands in it." 'vterm-mode 'eat-mode 'eshell-mode - 'shell-mode)) + 'shell-mode + 'agent-shell-mode)) (defun my/helix-set-line-numbers (style) (if (my/helix-line-numbers-disabled-p) @@ -478,7 +505,7 @@ Selects the compilation window so the cursor lands in it." (setq display-line-numbers style))) (use-package helix - :ensure nil + :ensure (:wait t) :demand t :hook ((helix-normal-mode . (lambda () (my/helix-set-line-numbers 'relative))) (helix-insert-mode . (lambda () (my/helix-set-line-numbers t)))) @@ -504,6 +531,9 @@ Selects the compilation window so the cursor lands in it." (my/helix-install-fallback-keymap helix-insert-state-keymap my/helix-insert-fallback-keymap) + (my/helix-let-emacs-prefixes-through + helix-normal-state-keymap + helix-insert-state-keymap) (helix-define-key 'normal (kbd "C-u") #'my/helix-scroll-half-page-up) (helix-define-key 'normal (kbd "C-d") #'my/helix-scroll-half-page-down) (helix-define-key 'normal (kbd "C-i") #'xref-go-forward) @@ -539,6 +569,7 @@ Selects the compilation window so the cursor lands in it." (helix-define-key 'insert (kbd "C-x") #'completion-at-point) (helix-define-key 'insert (kbd "C-r") #'insert-register) (helix-define-key 'insert (kbd "M-x") #'helm-M-x) + (helix-define-key 'insert (kbd "M-SPC") 'helix-space-map) (helix-define-key 'insert (kbd "C-w") #'backward-kill-word) (helix-define-key 'insert (kbd "M-DEL") #'backward-kill-word) (helix-define-key 'insert (kbd "M-d") #'kill-word) @@ -569,12 +600,14 @@ Selects the compilation window so the cursor lands in it." (helix-jj-setup 0.2)) (use-package embrace + :ensure (:wait t) :defer t :hook ((org-mode . embrace-org-mode-hook) (emacs-lisp-mode . embrace-emacs-lisp-mode-hook)) :bind (("C-," . embrace-commander))) (use-package multiple-cursors + :ensure (:wait t) :defer t) #+end_src @@ -957,6 +990,8 @@ Selects the compilation window so the cursor lands in it." ("/" . isearch-forward) ("n" . isearch-repeat-forward) ("N" . isearch-repeat-backward) + ("RET" . magit-visit-thing) + ("<return>" . magit-visit-thing) ("q" . magit-mode-bury-buffer) ("S-SPC" . magit-diff-show-or-scroll-up) ("S-DEL" . magit-diff-show-or-scroll-down) @@ -994,7 +1029,9 @@ Selects the compilation window so the cursor lands in it." ("[" . magit-section-backward-sibling) ("]" . magit-section-forward-sibling) ("TAB" . magit-section-toggle) - ("S-TAB" . magit-section-cycle-global))) + ("<tab>" . magit-section-toggle) + ("S-TAB" . magit-section-cycle-global) + ("<backtab>" . magit-section-cycle-global))) (helix-define-key 'normal (kbd (car binding)) @@ -1944,6 +1981,7 @@ let's give agent-shell another try (use-package agent-shell :ensure t + :hook (agent-shell-mode . my/disable-line-numbers) :config (advice-add 'shell-maker-submit :after #'my/agent-shell-autoscroll) (dolist (rule (my/agent-shell-display-buffer-rules)) @@ -1957,6 +1995,10 @@ let's give agent-shell another try (setq agent-shell-activity-group-header-label-function #'agent-shell-activity-group-descriptive-label) + (with-eval-after-load 'helix + (helix-define-key 'normal (kbd "RET") #'agent-shell-submit 'agent-shell-mode) + (helix-define-key 'normal (kbd "<return>") #'agent-shell-submit 'agent-shell-mode) + (my/helix-refresh-all-buffers)) ;; Work around agent-shell's `window-system' guard so clipboard images ;; work in terminal Emacs (`emacs -nw'). The underlying save routine @@ -2146,12 +2188,11 @@ automatically encrypted before save and can be decrypted in-place with :demand t :custom (age-program "rage") - (age-default-identity "~/.config/age/keys.txt") + (age-default-identity "~/.config/passage/identities") (age-default-recipient '("age188928acysrh9zpc3rk6q4lqmf3qlpjx3s26m6k3p6kah63gcws7sx3jeej" "age1mhvdwh6cvd70hm5dcptc4xca2xnkf383g6706ful6kmrudwdysvq0eytym")) :config - (setenv "PINENTRY_PROGRAM" "pinentry-gnome3") (setenv "PASSAGE_DIR" (expand-file-name "~/pass")) (age-file-enable)) #+end_src @@ -2205,7 +2246,8 @@ somehow passage depends on with-editor, don't ask me why. :ensure (:wait t)) (use-package s - :ensure (:wait t)) + :ensure nil + :demand t) (use-package with-editor :ensure (:wait t)) diff --git a/lisp/croc-ui.el b/lisp/croc-ui.el index c75d4b2..50c8b9a 100644 --- a/lisp/croc-ui.el +++ b/lisp/croc-ui.el @@ -31,7 +31,7 @@ ;; RET log w copy code Q qr x kill ;; X clear done n/p next/prev g refresh q quit ;; -;; Evil: normal state gets j/k plus the same one-key actions. +;; Helix: normal state gets j/k plus the same one-key actions. ;;; Code: @@ -971,28 +971,21 @@ stay square; MARGIN (default 4) modules of quiet zone wrap the code." (face-remap-set-base 'hl-line 'croc-ui-selected) (hl-line-mode 1)) -(declare-function evil-set-initial-state "evil") -(declare-function evil-define-key* "evil-core") -(with-eval-after-load 'evil - (evil-set-initial-state 'croc-ui-mode 'normal) - ;; `evil-define-key' is a macro: calling it from a file byte-compiled - ;; without evil loaded yields (invalid-function evil-define-key). - ;; `evil-define-key*' is the function underneath and is always safe. - (evil-define-key* 'normal croc-ui-mode-map - (kbd "j") #'croc-ui-next - (kbd "k") #'croc-ui-previous - (kbd "RET") #'croc-ui-open-log - (kbd "s") #'croc-ui-send-files - (kbd "d") #'croc-ui-send-directory - (kbd "t") #'croc-ui-send-text - (kbd "r") #'croc-ui-receive - (kbd "w") #'croc-ui-copy-code - (kbd "Q") #'croc-ui-toggle-qr - (kbd "x") #'croc-ui-kill - (kbd "X") #'croc-ui-clear-done - (kbd "g") #'croc-ui-refresh - (kbd "q") #'quit-window)) +(with-eval-after-load 'helix + (helix-define-key 'normal "j" #'croc-ui-next 'croc-ui-mode) + (helix-define-key 'normal "k" #'croc-ui-previous 'croc-ui-mode) + (helix-define-key 'normal "RET" #'croc-ui-open-log 'croc-ui-mode) + (helix-define-key 'normal "s" #'croc-ui-send-files 'croc-ui-mode) + (helix-define-key 'normal "d" #'croc-ui-send-directory 'croc-ui-mode) + (helix-define-key 'normal "t" #'croc-ui-send-text 'croc-ui-mode) + (helix-define-key 'normal "r" #'croc-ui-receive 'croc-ui-mode) + (helix-define-key 'normal "w" #'croc-ui-copy-code 'croc-ui-mode) + (helix-define-key 'normal "Q" #'croc-ui-toggle-qr 'croc-ui-mode) + (helix-define-key 'normal "x" #'croc-ui-kill 'croc-ui-mode) + (helix-define-key 'normal "X" #'croc-ui-clear-done 'croc-ui-mode) + (helix-define-key 'normal "g" #'croc-ui-refresh 'croc-ui-mode) + (helix-define-key 'normal "q" #'quit-window 'croc-ui-mode)) ;;; § 9 Entry points diff --git a/lisp/denote-menu.el b/lisp/denote-menu.el index e4e9a06..eb1c76c 100644 --- a/lisp/denote-menu.el +++ b/lisp/denote-menu.el @@ -5,11 +5,11 @@ ;;; Commentary: -;; A keyboard-first, evil-native browser for Denote notes built on vui.el. +;; A keyboard-first browser for Denote notes built on vui.el. ;; Lists notes from `denote-directory' (silo-aware) in a borderless table with ;; live filtering, column sorting, and one-key actions. Ships its own ;; `denote-menu-mode' derived from `vui-mode' and registers normal-state -;; keys with evil when it is available. +;; keys with helix when it is available. ;;; Code: @@ -319,22 +319,18 @@ across re-renders. :group 'denote-menu (hl-line-mode 1)) -(declare-function evil-set-initial-state "evil") -(declare-function evil-define-key "evil") -(with-eval-after-load 'evil - (evil-set-initial-state 'denote-menu-mode 'normal) - (evil-define-key 'normal denote-menu-mode-map - (kbd "RET") #'denote-menu-open-at-point - (kbd "o") #'denote-menu-open-at-point - (kbd "/") #'denote-menu-filter - (kbd "c") #'denote-menu-clear-filter - (kbd "s") #'denote-menu-cycle-sort - (kbd "S") #'denote-menu-toggle-sort-direction - (kbd "e") #'denote-menu-export-to-dired - (kbd "n") #'denote-menu-new-note - (kbd "r") #'denote-menu-refresh - (kbd "q") #'vui-quit)) +(with-eval-after-load 'helix + (helix-define-key 'normal "RET" #'denote-menu-open-at-point 'denote-menu-mode) + (helix-define-key 'normal "o" #'denote-menu-open-at-point 'denote-menu-mode) + (helix-define-key 'normal "/" #'denote-menu-filter 'denote-menu-mode) + (helix-define-key 'normal "c" #'denote-menu-clear-filter 'denote-menu-mode) + (helix-define-key 'normal "s" #'denote-menu-cycle-sort 'denote-menu-mode) + (helix-define-key 'normal "S" #'denote-menu-toggle-sort-direction 'denote-menu-mode) + (helix-define-key 'normal "e" #'denote-menu-export-to-dired 'denote-menu-mode) + (helix-define-key 'normal "n" #'denote-menu-new-note 'denote-menu-mode) + (helix-define-key 'normal "r" #'denote-menu-refresh 'denote-menu-mode) + (helix-define-key 'normal "q" #'vui-quit 'denote-menu-mode)) ;;;###autoload (defun denote-menu () diff --git a/lisp/feed-ui.el b/lisp/feed-ui.el index ed15fba..b5ef3f4 100644 --- a/lisp/feed-ui.el +++ b/lisp/feed-ui.el @@ -762,14 +762,12 @@ above and the actions row below." "Major mode for the feed.org vui client." (hl-line-mode 1)) -(with-eval-after-load 'evil - (evil-set-initial-state 'feed-ui-mode 'normal) - (evil-define-key 'normal feed-ui-mode-map - (kbd "RET") #'feed-ui-open-thread-at-point - "r" #'feed-ui-reply-at-point - "m" #'feed-ui-mute-at-point - "g" #'feed-ui-sync - "q" #'feed-ui-back-or-quit)) +(with-eval-after-load 'helix + (helix-define-key 'normal "RET" #'feed-ui-open-thread-at-point 'feed-ui-mode) + (helix-define-key 'normal "r" #'feed-ui-reply-at-point 'feed-ui-mode) + (helix-define-key 'normal "m" #'feed-ui-mute-at-point 'feed-ui-mode) + (helix-define-key 'normal "g" #'feed-ui-sync 'feed-ui-mode) + (helix-define-key 'normal "q" #'feed-ui-back-or-quit 'feed-ui-mode)) ;;;###autoload (defun feed () diff --git a/lisp/my-mode-line.el b/lisp/my-mode-line.el index b3179fa..b6fe532 100644 --- a/lisp/my-mode-line.el +++ b/lisp/my-mode-line.el @@ -2,33 +2,13 @@ (require 'mode-line-maker) -(defface my/mode-line-evil-normal +(defface my/mode-line-helix-normal '((t (:background "#89b4fa" :foreground "#1e1e2e" :weight bold))) - "Face for the evil normal state indicator.") + "Face for the helix normal state indicator.") -(defface my/mode-line-evil-insert +(defface my/mode-line-helix-insert '((t (:background "#a6e3a1" :foreground "#1e1e2e" :weight bold))) - "Face for the evil insert state indicator.") - -(defface my/mode-line-evil-visual - '((t (:background "#cba6f7" :foreground "#1e1e2e" :weight bold))) - "Face for the evil visual state indicator.") - -(defface my/mode-line-evil-replace - '((t (:background "#f38ba8" :foreground "#1e1e2e" :weight bold))) - "Face for the evil replace state indicator.") - -(defface my/mode-line-evil-operator - '((t (:background "#fab387" :foreground "#1e1e2e" :weight bold))) - "Face for the evil operator state indicator.") - -(defface my/mode-line-evil-motion - '((t (:background "#94e2d5" :foreground "#1e1e2e" :weight bold))) - "Face for the evil motion state indicator.") - -(defface my/mode-line-evil-emacs - '((t (:background "#b4befe" :foreground "#1e1e2e" :weight bold))) - "Face for the evil emacs state indicator.") + "Face for the helix insert state indicator.") (defface my/mode-line-irc-face '((t (:foreground "#94e2d5" :weight bold))) @@ -94,12 +74,12 @@ the project root, falling back to the plain buffer name." (ignore-errors (nerd-icons-icon-for-file buffer-file-name))) (ignore-errors (nerd-icons-icon-for-mode major-mode))))) -(defun my/mode-line-evil-state () - "Colored single-letter indicator for the current evil state." - (when (and (boundp 'evil-state) evil-state) - (let* ((tag (upcase (substring (symbol-name evil-state) 0 1))) - (face (intern-soft (format "my/mode-line-evil-%s" evil-state)))) - (propertize (format " %s " tag) 'face (or face 'my/mode-line-evil-normal))))) +(defun my/mode-line-helix-state () + "Colored single-letter indicator for the current helix state." + (when (and (boundp 'helix--current-state) helix--current-state) + (let* ((tag (upcase (substring (symbol-name helix--current-state) 0 1))) + (face (intern-soft (format "my/mode-line-helix-%s" helix--current-state)))) + (propertize (format " %s " tag) 'face (or face 'my/mode-line-helix-normal))))) (defun my/mode-line-buffer-state () "Buffer state icon: lock (read-only), pencil-alert (modified), save (saved)." @@ -163,7 +143,7 @@ the bottom mode-line is hidden." (setq-default mode-line-format nil) (setq-default header-line-format (mode-line-maker - '((:eval (my/mode-line-evil-state)) " " + '((:eval (my/mode-line-helix-state)) " " (:eval (my/mode-line-buffer-state)) mode-line-remote " " (:eval (my/mode-line-buffer-icon)) " " (:eval (propertize (my/mode-line-buffer-name) diff --git a/lisp/sync-ui.el b/lisp/sync-ui.el index e8ee3d7..36a8815 100644 --- a/lisp/sync-ui.el +++ b/lisp/sync-ui.el @@ -31,7 +31,7 @@ ;; t auto/ask a add repo d remove g refresh ;; n/p next/prev q quit ;; -;; Evil: normal state gets j/k plus the same one-key actions. +;; Helix: normal state gets j/k plus the same one-key actions. ;;; Code: @@ -916,18 +916,11 @@ A ⁺ marks a remote that has no copy of the branch yet." (face-remap-set-base 'hl-line 'sync-ui-selected) (hl-line-mode 1)) -(declare-function evil-set-initial-state "evil") -(declare-function evil-define-key* "evil-core") -(with-eval-after-load 'evil - (evil-set-initial-state 'sync-ui-mode 'normal) - ;; `evil-define-key' is a macro: calling it from a file byte-compiled - ;; without evil loaded yields (invalid-function evil-define-key). - ;; `evil-define-key*' is the function underneath and is always safe. - (evil-define-key* 'normal sync-ui-mode-map - (kbd "j") #'sync-ui-next - (kbd "k") #'sync-ui-previous - (kbd "RET") #'sync-ui-magit)) +(with-eval-after-load 'helix + (helix-define-key 'normal "j" #'sync-ui-next 'sync-ui-mode) + (helix-define-key 'normal "k" #'sync-ui-previous 'sync-ui-mode) + (helix-define-key 'normal "RET" #'sync-ui-magit 'sync-ui-mode)) ;;; § 8 Entry points diff --git a/themes/tinty-theme.el b/themes/tinty-theme.el index e322d68..0787317 100644 --- a/themes/tinty-theme.el +++ b/themes/tinty-theme.el @@ -19,67 +19,67 @@ (deftheme tinty "Noctalia theme with proper color contrast.") (let* (;; Tinted8 UI surface colors - (ui-bg "#1e1e2e") - (ui-fg "#cdd6f4") - (ui-fg-dim "#a6adc8") + (ui-bg "#d9e0ee") + (ui-fg "#1e1e2e") + (ui-fg-dim "#b7bfce") ;; 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 "#a6adc8") - (ui-line-highlight "#232336") - (ui-bg-dark "#181825") - (ui-bg-light "#45475a") + (ui-border "#b7bfce") + (ui-line-highlight "#cdd3e0") + (ui-bg-dark "#45475a") + (ui-bg-light "#585b70") ;; Tinted8 UI accent/status colors - (ui-accent "#94e2d5") - (ui-link "#89b4fa") - (ui-info "#fab387") - (ui-error "#f38ba8") - (ui-success "#a6e3a1") - (ui-warning "#f9e2af") + (ui-accent "#179299") + (ui-link "#1e66f5") + (ui-info "#fe640b") + (ui-error "#d20f39") + (ui-success "#40a02b") + (ui-warning "#df8e1d") ;; Tinted8 UI container colors (for BACKGROUNDS only) - (ui-selection-bg "#45475a") - (ui-selection-fg "#cdd6f4") - (ui-button-bg "#45475a") - (ui-button-fg "#cdd6f4") - (ui-tooltip-bg "#313244") - (ui-tooltip-fg "#cdd6f4") - (ui-active-text-bg "#9399b2") - (ui-active-text-fg "#cdd6f4") - (ui-search-bg "#94e2d5") - (ui-search-fg "#1e1e2e") + (ui-selection-bg "#b7bfce") + (ui-selection-fg "#1e1e2e") + (ui-button-bg "#585b70") + (ui-button-fg "#d9e0ee") + (ui-tooltip-bg "#c4cbd9") + (ui-tooltip-fg "#1e1e2e") + (ui-active-text-bg "#6c7086") + (ui-active-text-fg "#d9e0ee") + (ui-search-bg "#179299") + (ui-search-fg "#d9e0ee") ;; Tinted8 syntax colors ;; Comments use dim foreground instead of the raw syntax-comment gray, ;; which becomes almost invisible in light variants. - (syntax-comment "#a6adc8") - (syntax-constant "#fab387") - (syntax-function "#89b4fa") - (syntax-keyword "#cba6f7") - (syntax-string "#a6e3a1") - (syntax-type "#f9e2af") + (syntax-comment "#b7bfce") + (syntax-constant "#fe640b") + (syntax-function "#1e66f5") + (syntax-keyword "#8839ef") + (syntax-string "#40a02b") + (syntax-type "#df8e1d") ;; Give variables/imported names a distinct hue instead of blending into ;; the default foreground. - (syntax-variable "#aa69f7") - (syntax-warning "#f6c5d3") - (syntax-preprocessor "#488dfd") - (syntax-annotation "#f9e2af") - (syntax-attribute "#c7dafa") - (syntax-number "#fab387") - (syntax-operator "#89dceb") + (syntax-variable "#670be0") + (syntax-warning "#f02e58") + (syntax-preprocessor "#0248d4") + (syntax-annotation "#df8e1d") + (syntax-attribute "#598ef8") + (syntax-number "#fe640b") + (syntax-operator "#04a5e5") ;; Raw palette colors for rainbow headings, delimiters, terminal faces, ;; and anywhere else we need a predictable hue cycle. - (pal-red "#f38ba8") - (pal-orange "#fab387") - (pal-yellow "#f9e2af") - (pal-green "#a6e3a1") - (pal-cyan "#94e2d5") - (pal-blue "#89b4fa") - (pal-magenta "#cba6f7") - (pal-gray "#9399b2") - (pal-white "#cdd6f4") - (pal-black "#1e1e2e")) + (pal-red "#d20f39") + (pal-orange "#fe640b") + (pal-yellow "#df8e1d") + (pal-green "#40a02b") + (pal-cyan "#179299") + (pal-blue "#1e66f5") + (pal-magenta "#8839ef") + (pal-gray "#6c7086") + (pal-white "#1e1e2e") + (pal-black "#d9e0ee")) (custom-theme-set-faces 'tinty @@ -290,13 +290,13 @@ ;; === 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 "#f38ba8" :background "#f38ba8")))) - `(term-color-green ((t (:foreground "#a6e3a1" :background "#a6e3a1")))) - `(term-color-yellow ((t (:foreground "#f9e2af" :background "#f9e2af")))) - `(term-color-blue ((t (:foreground "#89b4fa" :background "#89b4fa")))) - `(term-color-magenta ((t (:foreground "#cba6f7" :background "#cba6f7")))) - `(term-color-cyan ((t (:foreground "#94e2d5" :background "#94e2d5")))) - `(term-color-white ((t (:foreground "#cdd6f4" :background "#cdd6f4")))) + `(term-color-red ((t (:foreground "#d20f39" :background "#d20f39")))) + `(term-color-green ((t (:foreground "#40a02b" :background "#40a02b")))) + `(term-color-yellow ((t (:foreground "#df8e1d" :background "#df8e1d")))) + `(term-color-blue ((t (:foreground "#1e66f5" :background "#1e66f5")))) + `(term-color-magenta ((t (:foreground "#8839ef" :background "#8839ef")))) + `(term-color-cyan ((t (:foreground "#179299" :background "#179299")))) + `(term-color-white ((t (:foreground "#1e1e2e" :background "#1e1e2e")))) ;; === EShell === `(eshell-prompt ((t (:foreground ,ui-accent :weight bold)))) @@ -509,14 +509,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 "#45475a" :background "#45475a")))) - `(ansi-color-bright-red ((t (:foreground "#f6c5d3" :background "#f6c5d3")))) - `(ansi-color-bright-green ((t (:foreground "#d4efd2" :background "#d4efd2")))) - `(ansi-color-bright-yellow ((t (:foreground "#fcf6e9" :background "#fcf6e9")))) - `(ansi-color-bright-blue ((t (:foreground "#c7dafa" :background "#c7dafa")))) - `(ansi-color-bright-magenta ((t (:foreground "#ece0fb" :background "#ece0fb")))) - `(ansi-color-bright-cyan ((t (:foreground "#c6ede6" :background "#c6ede6")))) - `(ansi-color-bright-white ((t (:foreground "#bac2de" :background "#bac2de")))) + `(ansi-color-bright-black ((t (:foreground "#b7bfce" :background "#b7bfce")))) + `(ansi-color-bright-red ((t (:foreground "#f02e58" :background "#f02e58")))) + `(ansi-color-bright-green ((t (:foreground "#57cb3d" :background "#57cb3d")))) + `(ansi-color-bright-yellow ((t (:foreground "#e8a951" :background "#e8a951")))) + `(ansi-color-bright-blue ((t (:foreground "#598ef8" :background "#598ef8")))) + `(ansi-color-bright-magenta ((t (:foreground "#aa72f4" :background "#aa72f4")))) + `(ansi-color-bright-cyan ((t (:foreground "#18cbd5" :background "#18cbd5")))) + `(ansi-color-bright-white ((t (:foreground "#45475a" :background "#45475a")))) ;; === Anzu === `(anzu-replace-highlight ((t (:background ,ui-line-highlight :foreground ,ui-error :weight bold :strike-through t)))) @@ -1167,14 +1167,14 @@ ;; === Term (extended) === `(term ((t (:foreground ,ui-fg :background ,ui-bg)))) `(term-bold ((t (:weight bold)))) - `(term-color-bright-black ((t (:foreground "#45475a" :background "#45475a")))) - `(term-color-bright-red ((t (:foreground "#f6c5d3" :background "#f6c5d3")))) - `(term-color-bright-green ((t (:foreground "#d4efd2" :background "#d4efd2")))) - `(term-color-bright-yellow ((t (:foreground "#fcf6e9" :background "#fcf6e9")))) - `(term-color-bright-blue ((t (:foreground "#c7dafa" :background "#c7dafa")))) - `(term-color-bright-magenta ((t (:foreground "#ece0fb" :background "#ece0fb")))) - `(term-color-bright-cyan ((t (:foreground "#c6ede6" :background "#c6ede6")))) - `(term-color-bright-white ((t (:foreground "#bac2de" :background "#bac2de")))) + `(term-color-bright-black ((t (:foreground "#b7bfce" :background "#b7bfce")))) + `(term-color-bright-red ((t (:foreground "#f02e58" :background "#f02e58")))) + `(term-color-bright-green ((t (:foreground "#57cb3d" :background "#57cb3d")))) + `(term-color-bright-yellow ((t (:foreground "#e8a951" :background "#e8a951")))) + `(term-color-bright-blue ((t (:foreground "#598ef8" :background "#598ef8")))) + `(term-color-bright-magenta ((t (:foreground "#aa72f4" :background "#aa72f4")))) + `(term-color-bright-cyan ((t (:foreground "#18cbd5" :background "#18cbd5")))) + `(term-color-bright-white ((t (:foreground "#45475a" :background "#45475a")))) ;; === Transient === `(transient-heading ((t (:foreground ,pal-blue :weight bold)))) |
