summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2025-10-07 00:01:41 +0100
committerjao <jao@gnu.org>2025-10-07 00:01:41 +0100
commit30ce6db339b0cd9e2d1c2dfca78326ec3de9b59b (patch)
treed210c2d09061c7e7e1d4e278818751d609e7440a
parentd567f75e666d0b99f36fda409e9c75d8bad7d560 (diff)
downloadelibs-30ce6db339b0cd9e2d1c2dfca78326ec3de9b59b.tar.gz
elibs-30ce6db339b0cd9e2d1c2dfca78326ec3de9b59b.tar.bz2
attic
-rw-r--r--attic/elisp/misc.el103
-rw-r--r--custom/jao-custom-chats.el102
2 files changed, 103 insertions, 102 deletions
diff --git a/attic/elisp/misc.el b/attic/elisp/misc.el
index 69343fb..fb15520 100644
--- a/attic/elisp/misc.el
+++ b/attic/elisp/misc.el
@@ -1179,3 +1179,106 @@ 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)]))
diff --git a/custom/jao-custom-chats.el b/custom/jao-custom-chats.el
index 7f5bfe4..c2105c6 100644
--- a/custom/jao-custom-chats.el
+++ b/custom/jao-custom-chats.el
@@ -184,108 +184,6 @@
(jao-shorten-modes 'ement-room-mode)
(jao-tracking-cleaner "^\\*Ement Room: \\(.+\\)\\*" "@\\1"))
-;;;; mastodon
-(use-package mastodon
- :ensure t
- :init
- (setq mastodon-instance-url "https://fosstodon.org"
- 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)])
-
;;;; startup
(defun jao-chats (&optional p)
(interactive "P")