summaryrefslogtreecommitdiffhomepage
path: root/init.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2025-11-12 02:19:45 +0000
committerjao <jao@gnu.org>2025-11-12 02:19:45 +0000
commit38ca7376d389569c3c5b8551b0faa7c5b9b0d8c1 (patch)
tree4bb51864c9e1be78089420bee12fd81080e0e283 /init.el
parentaf7837b198adc312e40ecd16487c0c01ac130e05 (diff)
downloadelibs-38ca7376d389569c3c5b8551b0faa7c5b9b0d8c1.tar.gz
elibs-38ca7376d389569c3c5b8551b0faa7c5b9b0d8c1.tar.bz2
mastodon
Diffstat (limited to 'init.el')
-rw-r--r--init.el92
1 files changed, 92 insertions, 0 deletions
diff --git a/init.el b/init.el
index 503054e..41b6d3a 100644
--- a/init.el
+++ b/init.el
@@ -1658,6 +1658,97 @@
;;; Chats
(jao-when-linux (require 'jao-custom-chats))
+;;;; Mastodon
+(use-package mastodon
+ :ensure t
+ :init
+ (setq mastodon-instance-url "https://mastodon.social"
+ mastodon-active-user "jao@gnu.org"
+ mastodon-group-notifications t
+ mastodon-images-in-notifs t
+ mastodon-tl-position-after-update nil
+ mastodon-toot-display-orig-in-reply-buffer t
+ mastodon-media--hide-sensitive-media nil)
+ :config
+ ;; (defun jao-mastodon--setup ()
+ ;; (setq-local scroll-margin 12))
+
+ ;; (add-hook 'mastodon-mode-hook #'jao-mastodon--setup)
+
+ (with-eval-after-load "ewww"
+ (define-key eww-mode-map (kbd "T") #'jao-mastodon-toot-url))
+
+ (defun jao-mastodon-toot-url ()
+ (interactive)
+ (when-let (url (jao-url-around-point t))
+ (jao-tracking-go-to-chats)
+ (mastodon-toot--compose-buffer nil nil nil url)))
+
+ (defun jao-mastodon ()
+ (interactive)
+ (jao-d-l (jao-afio-goto-scratch) (jao-afio-goto-chats))
+ (mastodon))
+
+ ;; https://0x0.st/XJ14.txt
+ (jao-transient-major-mode mastodon
+ ["Timelines"
+ ("H" "home" mastodon-tl-get-home-timeline)
+ ("L" "local" mastodon-tl-get-local-timeline)
+ ("F" "federated" mastodon-tl-get-federated-timeline)
+ ("K" "bookmarks" mastodon-profile-view-bookmarks)
+ ("V" "favorites" mastodon-profile-view-favourites)
+ ("'" "followed tags" mastodon-tl-followed-tags-timeline)
+ ("@" "mentions" mastodon-notifications-get-mentions)
+ ("N" "notifications" mastodon-notifications-get)
+ ("\\" "of remote host" mastodon-tl-get-remote-local-timeline)]
+
+ ["Search"
+ ("s" "search" mastodon-search-query)
+ ("#" "tagged" mastodon-tl-get-tag-timeline)
+ ("\"" "followed tags" mastodon-tl-list-followed-tags)
+ ("I" "filter" mastodon-views-view-filters)
+ ("X" "lists" mastodon-views-view-lists)]
+
+ ["Toots"
+ ("n" "next" mastodon-tl-goto-next-item :transient t)
+ ("p" "prev" mastodon-tl-goto-prev-item :transient t)
+ ("c" "spoiler" mastodon-tl-toggle-spoiler-text-in-toot :transient t)
+ ("T" "thread" mastodon-tl-thread)
+ ("b" "(un)boost" mastodon-toot-toggle-boost :transient t)
+ ("f" "(un)fav" mastodon-toot-toggle-favourite :transient t)
+ ("i" "(un)pin" mastodon-toot-pin-toot-toggle :transient t)
+ ("k" "(un)bookmark" mastodon-toot-toggle-bookmark :transient t)
+ ("v" "vote" mastodon-tl-poll-vote)]
+
+ ["Own Toots"
+ ("r" "replay" mastodon-toot-reply)
+ ("t" "write" mastodon-toot)
+ ("e" "edit" mastodon-toot-edit-toot-at-point)
+ ("d" "delete" mastodon-toot-delete-toot)
+ ("D" "del & redraft" mastodon-toot-delete-and-redraft-toot)
+ ("E" "show edits" mastodon-toot-view-toot-edits)]
+
+ ["Users"
+ ("W" "follow" mastodon-tl-follow-user)
+ ("R" "follow req" mastodon-views-view-follow-requests)
+ ("G" "suggestions" mastodon-views-view-follow-suggestions)
+ ("M" "mute user" mastodon-tl-mute-user)
+ ("B" "block user" mastodon-tl-block-user)
+ ("m" "message user" mastodon-tl-dm-user)
+ ("," "favouriters" mastodon-toot-list-favouriters)
+ ("." "boosters" mastodon-toot-list-boosters)]
+
+ ["Profiles"
+ ("A" "author" mastodon-profile-get-toot-author)
+ ("P" "any user" mastodon-profile-show-user)
+ ("O" "own" mastodon-profile-my-profile)
+ ("U" "update own" mastodon-profile-update-user-profile-note)]
+
+ ["Misc"
+ ("C" "copy URL" mastodon-toot-copy-toot-url)
+ ("?" "help" describe-mode)
+ ("q" "quit" transient-quit-one)]))
+
;;; Multimedia
(jao-when-linux (require 'jao-custom-multimedia))
@@ -1860,6 +1951,7 @@
("s" "ssh" jao-ssh)
("r" "r2e" jao-r2e)
("j" "notmuch jump" jao-notmuch-jump)
+ ("M" "mastodon" mastodon)
("S" "sieve" jao-sieve-manage)]
["Utilities"
("m" "mpc" jao-transient-media)