diff --git a/noise-chat-list.el b/noise-chat-list.el index 4a95133..275c1bb 100644 --- a/noise-chat-list.el +++ b/noise-chat-list.el @@ -66,7 +66,7 @@ conversations) :initial-value 0))) (setq mode-line-format - (format " ⌁ %s %d chats %s %s (%s) ─ U:%%- ─ Top ───" + (format " ⌁ %s %d chats %s %s (%s) ─ U:%%- ─ Top ────────────" (propertize "*signal*" 'face 'bold) total (if (> unread-total 0) @@ -109,7 +109,7 @@ CONV is a hash table with string keys from noise-db." (t (concat sender ": " preview)))) (preview-str (truncate-string-to-width preview-prefix 36 nil nil "…")) (time-str (noise-chat-list--format-time timestamp))) - (concat " " fringe " " unread-str " " + (concat " " (propertize fringe 'face 'warning) " " unread-str " " (propertize (format "%-18s" name-str) 'face 'bold) " " preview-str " " (propertize time-str 'face 'shadow)))) diff --git a/noise-conversation.el b/noise-conversation.el index f807c6a..1d9336d 100644 --- a/noise-conversation.el +++ b/noise-conversation.el @@ -37,10 +37,17 @@ map) "Keymap for `noise-conversation-mode'.") +(defconst noise-conversation--mode-header + (concat (propertize "RET" 'face 'help-key-binding) " send " + (propertize "M-RET" 'face 'help-key-binding) " newline " + (propertize "C-c C-g" 'face 'help-key-binding) " refresh") + "Header line showing key hints for `noise-conversation-mode'.") + (define-derived-mode noise-conversation-mode text-mode "Signal Chat" "Major mode for a Noise Signal conversation buffer. \\{noise-conversation-mode-map}" - :group 'noise) + :group 'noise + (setq-local header-line-format noise-conversation--mode-header)) ;;;###autoload (defun noise-conversation-open (conversation-id) @@ -107,7 +114,7 @@ Preserves any input already typed at the prompt." (propertize (make-string noise-conversation--width ?─) 'face 'shadow) "\n" - (propertize "> " 'face 'bold)) + (propertize "> " 'face 'link)) (add-text-properties (point-min) (point) '(read-only t front-sticky (read-only) @@ -149,7 +156,7 @@ Preserves any input already typed at the prompt." (or (gethash "attachment_path" msg) "")))) (setq body (concat body (if (string-empty-p body) "" " ") (propertize - (format "[attachment: %s — RET to view]" file) + (format "[photo: %s — RET to view]" file) 'face 'link))))) (let ((line (concat (propertize time-str 'face 'shadow) " " (propertize name 'face 'bold) @@ -167,13 +174,13 @@ Preserves any input already typed at the prompt." (defun noise-conversation--update-modeline () "Update the mode line with the E2E indicator and typing status." (setq mode-line-format - (format " %s %s %s%s ─ U:%%- ─ Bot ───" + (format " %s %s %s%s ─ U:%%- ─ Bot ───────────" (propertize "⌁ E2E" 'face 'success) (propertize (buffer-name) 'face 'bold) (if noise-conversation--typing (format "%s is typing… " noise-conversation--typing) "") - "(Signal Chat)")) + "(Signal Chat Fill)")) (force-mode-line-update)) ;;; Composing and sending diff --git a/test/noise-conversation-test.el b/test/noise-conversation-test.el index 25353a8..8f2d7f0 100644 --- a/test/noise-conversation-test.el +++ b/test/noise-conversation-test.el @@ -132,7 +132,7 @@ (should (string= "draft text" (noise-conversation--current-input)))))) (ert-deftest noise-conversation-format-attachment () - "Attachment messages render the [attachment: ...] hint." + "Attachment messages render the [photo: ...] hint." (noise-conversation-test--with-db (noise-conversation-test--seed) (noise-db-insert-message "+1" :timestamp 1717930300.0 @@ -140,7 +140,7 @@ :has-attachment t :attachment-path "IMG_2041.jpg") (with-current-buffer (noise-conversation-open "+1") - (should (string-match-p "\\[attachment: IMG_2041\\.jpg — RET to view\\]" + (should (string-match-p "\\[photo: IMG_2041\\.jpg — RET to view\\]" (buffer-string)))))) (ert-deftest noise-conversation-typing-indicator ()