This provides an alternative layout for the mastodon client. Usage is quite simple:
(require 'mastodon-alt)
(mastodon-alt-tl-activate)
Emacs alternative mastodon layout
License: GNU General Public License v3.0
Line breaks seem to be removed sometimes, an example of this is visible with toots that have the Wordle diagram/attempts.
Here are the links to the two toots,
I had some spillover of the toot status line (both in full screen and when Emacs is resized as shown in the two screenshots below:
I fixed it by changing the value in the mastodon-alt-tl--toot-status function from 2 to 6 in my case. The status now aligns with the time above the toot.
The proposed look and feel is great! π
I have display issues with the statuses, though: This depends on the font being used, I guess, but not all emoji are of the same width. Some take up 2 characters. This doesn't gel well with right-aligning, though, in some circumstances like this one:
I believe once we calculate the width of the string with the faces applied, we could use :align-to (- right (??? . px)))
, i.e. specify the unit in pixels instead of characters: https://www.gnu.org/software/emacs/manual/html_node/elisp/Pixel-Specification.html
I also found that mastodon-alt-tl-show-status
is not used at all a.t.m. so I couldn't toggle the statuses off completely. I'm adding a PR in a second.
The defun mastodon-tl--toot-id
has been renamed to mastodon-tl--item-id
Hello, The image on Mastodon (https://toot.aquilenet.fr/@rougier/109496567472689559) suggests a panel on the left-hand side. Is this a new release on Codeberg or just a personal config?
If this is just configuration, would you mind sharing the snippet?
When I (require 'mastodon-alt)
I get the following backtrace:
Debugger entered--Lisp error: (error "Loading file /Users/sean/.config/emacs/.local/straight/build-28.2/mastodon-alt/mastodon-alt.elc failed to provide feature βmastodon-altβ")
require(mastodon-alt)
eval-expression((require 'mastodon-alt) nil nil 127)
funcall-interactively(eval-expression (require 'mastodon-alt) nil nil 127)
#<subr command-execute>(eval-expression nil nil nil)
ad-Advice-command-execute(#<subr command-execute> eval-expression)
apply(ad-Advice-command-execute #<subr command-execute> eval-expression)
command-execute(eval-expression)
When I try to boost or favourite a toot, the action is completed and the indicator becomes bold.
However, the counter for the appropriate action does not change in the buffer. It does change when I go to another timeline (notifications, home, profile, etc.) and return to the current buffer. Is this the intended behaviour?
With respect to bookmarks, while the action is completed and I am able to see the bookmark, is it intended that the icon/indicator does not change?
I'm using a dark theme (sanityinc-tomorrow-night
) and the vertical box borders were drawn in black, while the horizontal box borders used the theme's foreground colour. I've modified the tight
style in mastodon-alt-tl--folding-box
so that the vertical and horizontal borders use the same colour:
(let* ((prefix (or prefix ""))
(tl-box-fg (face-attribute 'mastodon-alt-tl-box-face :foreground nil t))
(styles `((unicode . ,(propertize "ββββββββ" 'face 'mastodon-alt-tl-box-face))
(unicode-1 . ,(propertize "ββββββββ" 'face 'mastodon-alt-tl-box-face))
(unicode-2 . ,(propertize "ββββββββ" 'face 'mastodon-alt-tl-box-face))
(unicode-3 . ,(propertize "ββββββββ" 'face 'mastodon-alt-tl-box-face))
(unicode-4 . ,(propertize " β ββ β " 'face 'mastodon-alt-tl-box-face))
(unicode-5 . ,(propertize "ββ β " 'face 'mastodon-alt-tl-box-face))
(unicode-6 . ,(propertize "ββ β " 'face 'mastodon-alt-tl-box-face))
(unicode-7 . ,(propertize "ββ β " 'face 'mastodon-alt-tl-box-face))
(ascii . ,(propertize "|+-++-+|" 'face 'mastodon-alt-tl-box-face))
(tight . ,(concat
(propertize " " 'face `(:height .1
:background ,tl-box-fg))
(propertize " " 'face '(:underline t))
(propertize " " 'face '(:underline t))
(propertize " " 'face '(:height .1
:underline t))
(propertize " " 'face '(:overline t))
(propertize " " 'face '(:overline t))
(propertize " " 'face '(:height .1
:overline t))
(propertize " " 'face `(:height .1
:background ,tl-box-fg))))))
(style (or style 'tight))
...
Edit: This is really nice layout!
The default layout from mastodon.el
appears to respect my preference for toots which come with a content warning, which is to hide the content until I toggle the warning by hitting c
.
However, switching to mastodon-alt
results in all content warning "boxes" are shown by default, and I have to hide them by toggling, which sort of defeats the point of the warning.
Is there a variable/setting I can use to change the default behavior for content warnings/boxes in mastodon-alt
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.