summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--init.el20
1 files changed, 20 insertions, 0 deletions
diff --git a/init.el b/init.el
index 3a8f70e..0ce3887 100644
--- a/init.el
+++ b/init.el
@@ -2577,6 +2577,25 @@
(jao-shorten-modes 'ement-room-mode)
(jao-tracking-cleaner "^\\*Ement Room: \\(.+\\)\\*" "@\\1"))
+;;;; mastodon
+(use-package mastodon
+ :ensure t
+ :init
+ (setq mastodon-instance-url "https://mastodon.social"
+ mastodon-active-user "jao@gnu.org")
+ :config
+ (defun jao-mastodon-toot-url ()
+ (interactive)
+ (when-let (url (jao-url-around-point t))
+ (jao-afio-goto-scratch)
+ (mastodon-toot--compose-buffer nil nil nil url)))
+
+ (defun jao-mastodon ()
+ (interactive)
+ (jao-afio-goto-scratch)
+ (mastodon))
+ :bind (:map eww-mode-map ("T" . jao-mastodon-toot-url)))
+
;;;; startup
(defun jao-chats (&optional p)
(interactive "P")
@@ -3135,6 +3154,7 @@
("t" "telegram" jao-chats-telega)
("s" "slack" jao-chats-slack)
("i" "irc" jao-chats-irc)
+ ("M" "mastodon" jao-mastodon)
("T" "telegram rooster" jao-telega)]
["Window system" :if jao-window-system-p
("w" "set wallpaper" jao-set-wallpaper)