From e980d44a6aa9b920d5e64ea6c76789fb2cbcf1a8 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 10 Nov 2022 21:34:18 +0000 Subject: mastodon --- init.el | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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) -- cgit v1.2.3