Coder Social home page Coder Social logo

mastodon-alt's Introduction

Mastodon-alt

This provides an alternative layout for the mastodon client. Usage is quite simple:

(require 'mastodon-alt)
(mastodon-alt-tl-activate)

mastodon-alt.png

mastodon-alt's People

Contributors

csantosb avatar deen1 avatar divinedominion avatar dme avatar iah0nii3re avatar robmoss avatar rougier avatar seanfarley avatar sqrtminusone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mastodon-alt's Issues

Fixing spillover of toot status

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:

Toot_status_spillover_resizedWindow
Toot_Status_spillover_fullscreen

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.

Compute right-aligned status indicators not in characters, but pixels?

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:

image

image

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.

Seems to be a mismatch with `mastodon-alt` vs `mastodon-alt-tl`

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)

Counters and Indicator for Boost, Favourite and Bookmark

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?

Colour of box borders

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!

Toggle folding of content warnings by default?

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.

2023-06-02-232601_1896x225_scrot

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.

2023-06-02-232119_1897x331_scrot

Is there a variable/setting I can use to change the default behavior for content warnings/boxes in mastodon-alt?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.