From 38ca7376d389569c3c5b8551b0faa7c5b9b0d8c1 Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 12 Nov 2025 02:19:45 +0000 Subject: mastodon --- attic/elisp/misc.el | 103 ---------------------------------------------------- init.el | 92 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 103 deletions(-) diff --git a/attic/elisp/misc.el b/attic/elisp/misc.el index 6c295d7..77089ff 100644 --- a/attic/elisp/misc.el +++ b/attic/elisp/misc.el @@ -1180,109 +1180,6 @@ It should be the title of the web page as returned by `rdrview'" (defalias 'jao-player-connect 'jao-mpc-connect) (defalias 'jao-player-play 'jao-mpc-play) -;;; 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-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)] - - ;; u mastodon-tl--update - - ["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)] - - ;; Z mastodon-tl--report-to-mods - ;; o mastodon-toot--open-toot-url - - ["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)] - - ;; S mastodon-views--view-scheduled-toots - - ["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-toot-favouriters) - ;; ("." "boosters" mastodon-toot--list-toot-boosters) - ] - - ;; S-RET mastodon-tl--unmute-user - ;; C-S-b mastodon-tl--unblock-user - - ["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)])) - ;;; org-modern (use-package org-modern :ensure t 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) -- cgit v1.2.3