aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-26 10:44:45 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-26 10:44:45 +0100
commit14b7547c385648565eba8a4bac3dc8afa5ebf978 (patch)
tree981fbef7cde76a25ee50f15f698bdda367a1073b /lisp
parent25bb8619e215bdc8715aeb3f53724ad1f9af35b1 (diff)
use homegrown icons in tl--symbols list
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-tl.el44
1 files changed, 17 insertions, 27 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 1a26a54..7477b25 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -106,30 +106,22 @@ width fonts when rendering HTML text"))
:group 'mastodon-tl
:type '(boolean :tag "Whether to display user avatars in timelines"))
-;; Various symbols using throughout timeline
-;; Default comes from nerd-font (www.nerdfonts.com)
-(defcustom mastodon-tl-symbols
- '(;; See https://icon-sets.iconify.design/octicon/comment-24/
- (reply . ("" . "R"))
- ;; See https://icon-sets.iconify.design/octicon/reply-24/
- (boost . ("" . "B"))
- ;; See https://icon-sets.iconify.design/octicon/star-fill-24/
- (favourite . ("" . "F"))
- ;; See https://icon-sets.iconify.design/octicon/bookmark-24/
- (bookmark . ("" . "K"))
- ;; See https://icon-sets.iconify.design/octicon/file-media-24/
- (media . ("" . "M"))
- ;; See https://icon-sets.iconify.design/octicon/verified-24/
- (verified . ("" . "V"))
- ;; See https://icon-sets.iconify.design/octicon/person-fill-24/
- (private . ("" . "P"))
- ;; See https://icon-sets.iconify.design/octicon/location-24/
- (direct . ("" . "D")))
- "Set of symbols (or strings) to be used in timeline. If a symbol does not look right (tofu), it means your font settings do not support it."
+(defcustom mastodon-tl--symbols
+ '((reply . ("💬" . "R"))
+ (boost . ("🔁" . "B"))
+ (favourite . ("⭐" . "F"))
+ (bookmark . ("🔖" . "K"))
+ (media . ("" . "M"))
+ (verified . ("" . "V"))
+ (private . ("🔒" . "P"))
+ (direct . ("✉" . "D"))
+ (edited . ("✍" . "E")))
+ "A set of symbols (and fallback strings) to be used in timeline.
+If a symbol does not look right (tofu), it means your
+font settings do not support it."
:type '(alist :key-type symbol :value-type string)
:group 'mastodon-tl)
-
(defvar-local mastodon-tl--update-point nil
"When updating a mastodon buffer this is where new toots will be inserted.
@@ -226,14 +218,12 @@ It is active where point is placed by `mastodon-tl--goto-next-toot.'")
(defun mastodon-tl--symbol (name)
"Return the unicode symbol (as a string) corresponding to NAME.
-
If symbol is not displayable, an ASCII equivalent is returned. If
NAME is not part of the symbol table, '?' is returned."
-
- (if-let* ((symbol (alist-get name mastodon-tl-symbols)))
- (if (char-displayable-p (string-to-char (car symbol)))
- (car symbol)
- (cdr symbol))
+ (if-let* ((symbol (alist-get name mastodon-tl--symbols)))
+ (if (char-displayable-p (string-to-char (car symbol)))
+ (car symbol)
+ (cdr symbol))
"?"))