Comments (2)
It has been inspired by mu4e-dashboard but requires only the sideframe package. You can then write a regular org-file using mastodon link to adapt the dashboard to your liking:
;; Setup a new org link type "mastodon"
;;
;; Usage is:
;;
;; - mastodon:home : Load Home timelime
;; - mastodon:local : Load Local timelime
;; - mastodon:federated : Load Federated timelime
;; - mastodon:profile : Load Profile
;; - mastodon:suggestions : Load Suggestions
;; - mastodon:search : Search for...
;; - mastodon:notifications : Show Notifications
;; - mastodon:favourites : Show Favourited
;; - mastodon:bookmarks : Show Bookmarked
;; - mastodon:filters : Show Filters
;; - mastodon:toot-reply : Reply to toot
;; - mastodon:toot-thread : Show toot thread
;; - mastodon:toot-boost : Boost toot
;; - mastodon:toot-bookmark : Add toot to bookmark
;; - mastodon:toot-favourite : Add toot to favourite
;; - mastodon:toot-pin : Pin toot
;; - mastodon:toot-vote : Vote
;; - mastodon:toot-spoiler : Toggle spoiler
;; - mastodon:toot-delete : Delete toot
;;
;; - mastodon:user-profile : Show user profile
;; - mastodon:user-follow : Follow user
;; - mastodon:user-mute : Mute user
;; - mastodon:user-block : Block user
;; - mastodon:#xxx : Show tag "xxx" timeline
(require 'org)
(require 'sideframe)
(org-link-set-parameters
"mastodon"
:follow 'org-mastodon-process)
(defun org-mastodon-process (what)
"Process the WHAT argument. If there is a visible mastodon
window, this window will be used to process the command."
(interactive)
(let* ((buffers (cl-remove-if-not
#'(lambda (buffer)
(with-current-buffer buffer
(and (get-buffer-window buffer t)
(derived-mode-p 'mastodon-mode))))
(buffer-list)))
(buffer (car buffers))
(window (get-buffer-window buffer t))
(frame (window-frame window)))
;; Because loading is asynchronous, we immediately select the
;; frame/window we want to use such as to make sure the page is
;; loaded where we want.
(select-frame frame)
(select-window window)
(cond ((string= what "home") (mastodon-tl--get-home-timeline))
((string= what "profile") (mastodon-profile--my-profile))
((string= what "local") (mastodon-tl--get-local-timeline))
((string= what "federated") (mastodon-tl--get-federated-timeline))
((string= what "search") (mastodon-search--search-query))
((string= what "filters") (mastodon-tl--view-filters))
((string= what "bookmarks") (mastodon-profile--view-bookmarks))
((string= what "favourites") (mastodon-profile--view-favourites))
((string= what "notifications") (mastodon-notifications-get))
((string= what "suggestions") (mastodon-tl--get-follow-suggestions))
((string= what "toot-compose") (mastodon-toot))
((string= what "toot-reply") (mastodon-toot--reply))
((string= what "toot-boost") (mastodon-toot--toggle-boost))
((string= what "toot-favourite") (mastodon-toot--toggle-favourite))
((string= what "toot-bookmark") (mastodon-toot--bookmark-toot-toggle))
((string= what "toot-thread") (mastodon-tl--thread))
((string= what "toot-spoiler") (mastodon-tl--toggle-spoiler-text))
((string= what "toot-vote") (mastodon-tl--poll-vote))
((string= what "toot-pin") (mastodon-toot--pin-toot-toggle))
((string= what "toot-delete") (mastodon-toot--delete-toot))
((string= what "user-profile") (mastodon-profile--show-user))
((string= what "user-follow") (mastodon-tl--follow-user))
((string= what "user-block") (mastodon-tl--block-user))
((string= what "user-mute") (mastodon-tl--mute-user))
((string= "#" (substring what 0 1))
(mastodon-tl--show-tag-timeline (substring what 1))))))
(defun mastodon-side-dashboard ()
"Open a mastodon dashboard on in a side frame."
(interactive)
(let ((frame (sideframe-make 'left 32 'dark `((foreground-color . ,nano-dark-foreground)
(background-color . ,nano-dark-background)))))
(with-selected-frame frame
(find-file (expand-file-name "mastodon.org" user-emacs-directory))
(hl-line-mode)
(read-only-mode)
(set-window-dedicated-p nil t))))
from mastodon-alt.
Thank you! Will give this a try and report back.
from mastodon-alt.
Related Issues (9)
- Seems to be a mismatch with `mastodon-alt` vs `mastodon-alt-tl` HOT 1
- Display of toots with line break HOT 17
- Fixing spillover of toot status HOT 5
- Toggle folding of content warnings by default? HOT 5
- Renamed defuns in latest matodon 1.0.13 HOT 4
- Colour of box borders HOT 2
- Compute right-aligned status indicators not in characters, but pixels? HOT 4
- Counters and Indicator for Boost, Favourite and Bookmark HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mastodon-alt.