diff options
| -rw-r--r-- | config.org | 40 | ||||
| -rw-r--r-- | themes/tinty-theme.el | 71 |
2 files changed, 100 insertions, 11 deletions
@@ -2534,11 +2534,10 @@ Auto switch silos (different workspaces/folders) based on preconfigured director (company-idle-delay nil) ;; (company-minimum-prefix-length 2) (company-require-match nil) - (company-transformers '(my/company-limit-candidates)) - (company-backends '(company-capf)) - :config - (defun my/company-limit-candidates (candidates) - (seq-take candidates 4))) + ;; Limit the visible menu, not the candidate set. Truncating candidates + ;; here made valid mu4e contacts and IRC nicks impossible to select. + (company-tooltip-limit 4) + (company-backends '(company-capf))) #+end_src * which-key @@ -5034,6 +5033,26 @@ reset is unnecessary, so do the handler resolution ourselves and skip :ensure nil :defer t :commands (mu4e mu4e-compose-new) + :init + (defun my/mu4e-ensure-running-for-compose () + "Start mu4e in the background before constructing a draft. +This makes its asynchronous contact cache available even when a draft is +opened directly with `mu4e-compose-new'." + (require 'mu4e) + (unless (bound-and-true-p mu4e--started) + (mu4e t))) + + (defun my/mu4e-compose-tab () + "Complete a contact in address fields, otherwise run `message-tab'." + (interactive) + (if (mu4e--compose-complete-contact-field) + (company-complete) + (message-tab))) + + (add-hook 'mu4e-compose-pre-hook #'my/mu4e-ensure-running-for-compose) + (with-eval-after-load 'mu4e-compose + (keymap-set mu4e-compose-mode-map "TAB" #'my/mu4e-compose-tab) + (keymap-set mu4e-compose-mode-map "<tab>" #'my/mu4e-compose-tab)) :config (setq mu4e-mu-binary (executable-find "mu")) @@ -5568,6 +5587,7 @@ opening another file in same project does not re-notify." (use-package clatter :ensure (:host github :repo "parenworks/clatter.el") :commands (clatter clatter-quick-connect) + :hook (clatter-mode . my/clatter-company-mode) :custom (clatter-message-order 'oldest-first) (clatter-notify-enabled t) @@ -5592,6 +5612,16 @@ opening another file in same project does not re-notify." :sasl plain :bouncer t))) :config + (defvar-keymap my/clatter-company-mode-map + "TAB" #'company-complete + "<tab>" #'company-complete) + + (define-minor-mode my/clatter-company-mode + "Use Company for explicit completion in Clatter buffers." + :init-value nil + :lighter nil + :keymap my/clatter-company-mode-map) + (require 'gnutls) (clatter-setup) (clatter-dcc-setup) diff --git a/themes/tinty-theme.el b/themes/tinty-theme.el index a95e684..90a0617 100644 --- a/themes/tinty-theme.el +++ b/themes/tinty-theme.el @@ -78,7 +78,7 @@ ;; Tinted8 UI accent/status colors (ui-accent "#b4befe") (ui-link "#80ffea") - (ui-info "#8a75f0") + (ui-info "#8c78f0") (ui-error "#ff9580") (ui-success "#8aff80") (ui-warning "#ffca80") @@ -108,7 +108,7 @@ ;; the default foreground. (syntax-variable "#f8f8f2") (syntax-warning "#ff9580") - (syntax-preprocessor "#8a75f0") + (syntax-preprocessor "#8c78f0") (syntax-annotation "#ffff80") (syntax-attribute "#80ffea") (syntax-number "#ffca80") @@ -123,9 +123,9 @@ (pal-cyan "#80ffea") (pal-blue "#9580ff") (pal-magenta "#ff80bf") - (pal-gray "#7970a9") + (pal-gray "#8a83b4") (pal-white "#f8f8f2") - (pal-black "#22212c") + (pal-black "#8a898f") (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)) @@ -556,7 +556,7 @@ `(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 "#36334c" :background "#36334c")))) + `(ansi-color-bright-black ((t (:foreground "#8a8997" :background "#8a8997")))) `(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")))) @@ -772,6 +772,18 @@ `(shr-selected-link ((t (:foreground ,ui-warning :underline t)))) `(shr-code ((t (:foreground ,ui-info :background ,ui-bg-dark)))) `(shr-mark ((t (:foreground ,ui-search-fg :background ,ui-search-bg)))) + ;; Shrface otherwise derives its hyperlink faces from a dark-theme + ;; palette, which makes protocol-specific links unreadable in Elfeed and + ;; EWW when a light scheme is active. + `(shrface-href-face ((t (:foreground ,ui-link :underline t)))) + `(shrface-href-other-face ((t (:foreground ,ui-link :underline t)))) + `(shrface-href-http-face ((t (:foreground ,ui-link :underline t)))) + `(shrface-href-https-face ((t (:foreground ,ui-link :underline t)))) + `(shrface-href-ftp-face ((t (:foreground ,ui-link :underline t)))) + `(shrface-href-file-face ((t (:foreground ,ui-link :underline t)))) + `(shrface-href-mailto-face ((t (:foreground ,ui-link :underline t)))) + `(shrface-code ((t (:foreground ,ui-info :background ,ui-bg-dark)))) + `(shrface-verbatim ((t (:foreground ,ui-accent :background ,ui-bg-dark)))) `(vundo-branch-stem ((t (:foreground ,ui-border)))) `(vundo-diff-highlight ((t (:foreground ,ui-warning :weight bold)))) `(vundo-highlight ((t (:foreground ,ui-accent :weight bold)))) @@ -1353,7 +1365,7 @@ ;; === Term (extended) === `(term ((t (:foreground ,ui-fg :background ,ui-bg)))) `(term-bold ((t (:weight bold)))) - `(term-color-bright-black ((t (:foreground "#36334c" :background "#36334c")))) + `(term-color-bright-black ((t (:foreground "#8a8997" :background "#8a8997")))) `(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")))) @@ -1582,6 +1594,39 @@ `(mu4e-column-faces-flags ((t (:foreground ,ui-link)))) `(mu4e-column-faces-to-from ((t (:foreground ,ui-accent)))) + ;; === Clatter === + ;; Clatter's defaults are intentionally tuned for dark backgrounds. Keep + ;; its semantics, but source every foreground from the active Tinty + ;; palette so messages and nicknames remain legible in light schemes. + `(clatter-timestamp ((t (:foreground ,ui-fg-dim)))) + `(clatter-nick ((t (:weight bold)))) + `(clatter-my-nick ((t (:foreground ,ui-accent :weight bold)))) + `(clatter-action ((t (:foreground ,ui-success :slant italic)))) + `(clatter-notice ((t (:foreground ,ui-warning)))) + `(clatter-reaction ((t (:foreground ,ui-warning)))) + `(clatter-system ((t (:foreground ,ui-fg-dim)))) + `(clatter-error ((t (:foreground ,ui-error :weight bold)))) + `(clatter-prompt ((t (:foreground ,ui-accent :weight bold)))) + `(clatter-mention ((t (:foreground ,ui-error :weight bold)))) + `(clatter-channel ((t (:foreground ,ui-link)))) + `(clatter-muted-reaction ((t (:foreground ,ui-fg-dim :strike-through t)))) + `(clatter-hl-keyword ((t (:foreground ,ui-search-fg :background ,ui-search-bg :weight bold)))) + `(clatter-pal ((t (:foreground ,ui-success :weight bold)))) + `(clatter-track-mention ((t (:foreground ,ui-error :weight bold)))) + `(clatter-track-activity ((t (:foreground ,ui-success)))) + `(clatter-track-muted ((t (:foreground ,ui-fg-dim)))) + `(clatter-track-dm ((t (:foreground ,ui-warning :weight bold)))) + `(clatter-read-marker-line ((t (:strike-through ,ui-border :extend t)))) + `(clatter-rawlog-incoming ((t (:foreground ,ui-success)))) + `(clatter-rawlog-outgoing ((t (:foreground ,ui-accent)))) + `(clatter-rawlog-timestamp ((t (:foreground ,ui-fg-dim)))) + `(clatter-rawlog-tag ((t (:foreground ,syntax-keyword)))) + `(clatter-rawlog-command ((t (:foreground ,ui-warning :weight bold)))) + `(clatter-rawlog-prefix ((t (:foreground ,ui-link)))) + `(clatter-search-match ((t (:foreground ,ui-search-fg :background ,ui-search-bg :weight bold)))) + `(clatter-search-file ((t (:foreground ,ui-link :slant italic)))) + `(clatter-search-timestamp ((t (:foreground ,ui-fg-dim)))) + ;; === ERC === `(erc-action-face ((t (:weight bold)))) `(erc-button ((t (:weight bold :underline t)))) @@ -1659,6 +1704,20 @@ ) + ;; Clatter uses 40 named nick faces, selected deterministically from a + ;; nickname hash. Cycling the scheme's readable semantic colors keeps the + ;; mapping stable without importing Clatter's light-on-dark palette. + (let ((clatter-nick-colors + (vector ui-error ui-warning ui-success ui-link + syntax-keyword syntax-function syntax-type))) + (dotimes (index 40) + (custom-theme-set-faces + 'tinty + `(,(intern (format "clatter-nick-color-%d" index)) + ((t (:foreground ,(aref clatter-nick-colors + (% index (length clatter-nick-colors))) + :weight bold))))))) + ;; === Theme variables === (custom-theme-set-variables 'tinty |
