Git Product home page Git Product logo

tut's Introduction

Tut - a Mastodon TUI

Release web tut tut-bin @tut

A TUI for Mastodon with vim inspired keys. The program has most of the features you can find in the web client.

Press C to create a new toot and N to focus on your notifications.

You can also enable mouse support.

You can find Linux binaries under releases.

Preview Preview 2

Table of contents

Currently supported commands

  • :quit = Exit tut
  • :q = Shorter form of former command
  • :timeline home|local|federated|direct|notifications|mentions|favorited|special-all|special-boosts|special-replies = Open selected timeline
  • :tl h|l|f|d|n|m|fav|sa|sb|sr = Shorter form of former command
  • :blocking = Lists users that you have blocked
  • :boosts = Lists users that have boosted the toot
  • :bookmarks = List all your bookmarks
  • :clear-notifications = Remove all of your notifications
  • :clear-temp = Remove all of your media files that have been downloaded. Only needed if you have set delete-temp-files to false under [media] in your config.
  • :close-pane = Closes the current pane, including all the timelines in said pane
  • :compose = Compose a new toot
  • :edit = Edit one of your toots
  • :favorited = Lists toots you've favorited
  • :favorites = Lists users that favorited the toot
  • :follow-tag <tag> = Follow a hashtag named <tag>
  • :followers = List of people the account are following. It only works on profiles
  • :following = List of people follwing the account. It only works on profiles
  • :help = Show help for how to use tut
  • :h = Shorter form of former command
  • :history = Show edits of a toot
  • :lists = Show a list of your lists
  • :list-placement top|right|bottom|left = Place the list in choosen placement
  • :list-split row|column = Split the timelines by row or column
  • :login = Login to one more account
  • :move-pane left|right|up|down|home|end = Moves the pane in choosen direction
  • :mp l|r|u|d|h|e = Shorter form of former command
  • :muting = Lists users that you've muted
  • :newer = Force load newer toots in current timeline
  • :next-acct = Go to the next account if you're logged in to multiple
  • :preferences = Update your profile and some other settings
  • :prev-acct = Go to the prev account if you're logged in to multiple
  • :profile = Go to your profile
  • :proportions [int] [int] = Sets the proportions of the panes and the content. The first integer is your panes and the other for content, e.g. :proportions 1 3
  • :refetch = Refetches the current item that you're viewing. Can be used to update poll results.
  • :saved = Alias for bookmarks
  • :stick-to-top = Toggle the stick-to-top setting that always shows the latest toot in all timelines
  • :tag <tag> = Shows toots tagged with <tag>, e.g. :tag linux. You can input multiple tags if you want to show them in the same timeline
  • :tags = List of tags that you're following
  • :unfollow-tag <tag> = Unfollow the hashtag named <tag>, e.g. :unfollow-tag tut
  • :user <username> = Search for users named <username>, e.g. :user rasmus. To narrow a search include the instance like this :user [email protected]
  • :pane <int> = Switch pane by index (zero indexed) e.g. :pane 0 for the left/top pane

Keys without description in tut

  • c = Compose a new toot
  • j or Down arrow = Navigate down in feed list or toot
  • k or Up arrow = Navigate up in feed list or toot
  • h or Left arrow = Cycle back in open timelines
  • l or Right arrow = Cycle forward in open timelines
  • g or Home = Go to top in feed list or toot
  • G or End = Go to bottom in feed list or toot
  • ? = View help
  • q = Go back or quit
  • Esc = Go back

Explanation of the non obvious keys when viewing a toot

  • v = view. In this mode you can scroll throught the text of the toot if it doesn't fit the screen
  • o = open. Gives you a list of all URLs in the toot. Opens them in your default browser, if it's an user or tag they will be opened in tut
  • m = media. Opens the media with xdg-open

Configuration

Tut is configurable, so you can change things like the colors, the default timeline, what image viewer to use and some more. Check out the configuration file to see all the options.

You find it in XDG_CONFIG_HOME/tut/config.toml on Linux which usually equals to ~/.config/tut/config.toml. If you don't run Linux it will use the path of os#UserConfigDir. But if you move the tut folder to XDG_CONFIG_HOME/tut/ and have set the environment variable XDG_CONFIG_HOME it will look there instead of the standard place.

You can find an updated configuration file in this repo named config.example.toml. If there are any new configurations options you can copy them frome that file. If you prefer a website you can read about all the options on tut.anv.nu and if man pages are your thing use tut(5).

Install instructions

Binary releases

Head over to https://github.com/RasmusLindroth/tut/releases

Arch and Manjaro

You can find it in the Arch User Repository (AUR). I'm the maintainer there.

https://aur.archlinux.org/packages/tut/ https://aur.archlinux.org/packages/tut-bin/

You can also use tut-mastodon. Currently aur/tut collides with a package named tut if you're running Manjaro ARM. So if you face the same problem you can use this package instead. I suggest you add an alias for tut-mastodon to tut in the config for your shell. Usually .bashrc or .zshrc.

alias tut='tut-mastodon'

https://aur.archlinux.org/packages/tut-mastodon/

Alpine Linux

tut package is available in the community repository.

https://pkgs.alpinelinux.org/package/edge/community/x86_64/tut

Debian

http://packages.azlux.fr/

FreeBSD

https://www.freshports.org/net-im/tut

OpenBSD

https://openports.pl/path/net/tut

The tut is available since OpenBSD 7.3. It can be installed with:

pkg_add tut

NetBSD (and others)

Available as net/tut in pkgsrc, NetBSD's portable package manager. Also for Linux, macOS, Illumos, etc. Install from the tree or with pkgin:

pkgin install tut

Homebrew (macOS)

Available as a Homebrew Formulae over here. Install it like this:

brew update
brew install tut

openSUSE

tut package is shipped as part of openSUSE Tumbleweed and openSUSE Leap 15.5+. It can be installed via:

sudo zypper in tut

suntorytimed is the maintainer of the package.

Build it yourself

If you don't use the binary that you find under releases you will need Go. Use a newer one that supports modules.

# Fetches and installs tut. Usally /home/user/go/bin
go install github.com/RasmusLindroth/tut@latest

# You can also clone the repo if you like
# First clone this repository
git clone https://github.com/RasmusLindroth/tut.git

# Go to that folder
cd tut

# Build or install

# Install (usually /home/user/go/bin)
go install

# Build (same directory i.e. ./ )
go build

If you choose to install and want to be able to just run tut you will have to add go/bin to your $PATH.

Flags and commands

Commands:
    example-config - creates the default configuration file in the current directory and names it ./config.example.toml

Flags:
	-h  --help             prints this message
	-v  --version          prints the version
	-n  --new-user         add one more user to tut
	-c  --config <path>    load config.toml from <path>
	-d --config-dir <path> load all config from <path>
	-u  --user <name>      login directly to user named <name>
      If you want to login to multiple accounts separate them with a space and use quotation marks. E.g. -u "acc_one acc_two"
      If two users are named the same. Use full name like [email protected]

If you don't want to set --config or --config-dir everytime you can set the environment variables TUT_CONF and TUT_CONF_DIR instead.

Templates

You can customise how toots and user profiles are displayed with a Go text/template.

You'll have to place a file named toot.tmpl and/or user.tmpl in XDG_CONFIG_HOME/tut/ which usually equals to ~/.config/tut/.

You can copy ./config/toot.tmpl and ./config/user.tmpl from this repo manually or with curl or wget.

cd ~/.config/tut

# using curl
curl -o toot.tmpl https://raw.githubusercontent.com/RasmusLindroth/tut/master/config/toot.tmpl

curl -o user.tmpl https://raw.githubusercontent.com/RasmusLindroth/tut/master/config/user.tmpl

# using wget
wget https://raw.githubusercontent.com/RasmusLindroth/tut/master/config/toot.tmpl

wget https://raw.githubusercontent.com/RasmusLindroth/tut/master/config/user.tmpl

The data available for you in toot.tmpl is two structs. The first one is the Toot-struct, you can see all fields in ./ui/item_status.go. The second one is the Style-struct. You can find the fields for style in ./config/config.go.

You acces them with .Toot and .Style in your template file.

The data available in user.tmpl is almost the same. You still have the Style but instead of Toot you have a struct named User. You can see all fields in ./ui/item_user.go.

Mouse support

To enable mouse support you'll have to set mouse-support=true under [general] in your config.

Password manager for secrets

If you run pass, gopass or something similar you can protect your secrets. You'll have to manually update your accounts.toml. It should be located at ~/.config/tut/accounts.toml. Currently you can only hide ClientID, ClientSecret and AccessToken. The command must be prefixed with !CMD!. Here's an example of what the file can look like.

[[Accounts]]
Name = 'tut'
Server = 'https://fosstodon.org'
ClientID = '!CMD!gopass show -o -f misc/tut-id'
ClientSecret = '!CMD!gopass show -o -f misc/tut-secret'
AccessToken = '!CMD!gopass show -o -f misc/tut-token'

Thanks to

tut's People

Contributors

alrs avatar d5xtgr avatar davidoskky avatar justjosias avatar omar-polo avatar rasmuslindroth avatar sjmulder avatar suntorytimed avatar technologyclassroom avatar yerinalexey 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

tut's Issues

Replies fail to render properly after loading overlay in notifications

When replying to a post in the home timeline after loading the reply overlay for a toot in notifications, it displays the reply from notifications instead of the one from the home timeline.

Steps to reproduce:

  1. Press n to enter the notifications timeline
  2. Press r to reply to a message
  3. Exit the reply modal with esc (or reply to a message, doesn't matter)
  4. Exit the notifications timeline with esc
  5. Reply to a message in the home timeline

Current workaround: open the notifications timeline and exit it again.

I'm guessing this problem is related to getting the current status and changing timelines.

Colours Subtle, TextSpecial1, TextSpecial2 do not render with red channel < 128

Colours are not correctly shown if the #RRGGBB representation has leading zeros (i.e. the red channel is less than 128). This affects colours given as hex ("#008000") as well as by name ("green").

The following change fixes this behaviour.

--- util.go	2020-04-11 05:06:13.000000000 -0400
+++ util.go	2020-05-05 16:10:02.515224268 -0400
@@ -251,7 +251,7 @@
 }
 
 func ColorMark(color tcell.Color) string {
-	return fmt.Sprintf("[#%x]", color.Hex())
+	return fmt.Sprintf("[#%06x]", color.Hex())
 }
 
 func FormatUsername(a mastodon.Account) string {

Media viewer commands cannot include flags

Custom viewers for images, video, and audio do not work correctly if flags are given with the program name. For example, video-viewer=ffplay -fs does not start ffplay with the -fs (fullscreen) flag, but attempts to execute ffplay -fs as a command including a literal space.

The following changes fix this behaviour.

--- config.go	2020-04-11 05:06:13.000000000 -0400
+++ config.go	2020-05-05 23:34:44.261338947 -0400
@@ -2,6 +2,7 @@
 
 import (
 	"os"
+	"strings"
 
 	"github.com/gdamore/tcell"
 	"github.com/kyoh86/xdg"
@@ -44,10 +45,13 @@
 
 type MediaConfig struct {
 	ImageViewer string
+	ImageArgs   []string	
 	ImageSingle bool
 	VideoViewer string
+	VideoArgs   []string
 	VideoSingle bool
 	AudioViewer string
+	AudioArgs   []string
 	AudioSingle bool
 }
 
@@ -139,25 +143,34 @@
 
 func parseMedia(cfg *ini.File) MediaConfig {
 	media := MediaConfig{}
-	imageViewer := cfg.Section("media").Key("image-viewer").String()
-	if imageViewer == "" {
-		imageViewer = "xdg-open"
+	imageViewerComponents := strings.Fields(cfg.Section("media").Key("image-viewer").String())
+	if len(imageViewerComponents) == 0 {
+		media.ImageViewer = "xdg-open"
+		media.ImageArgs = []string{}
+	} else {
+		media.ImageViewer = imageViewerComponents[0]
+		media.ImageArgs = imageViewerComponents[1:]
 	}
-	media.ImageViewer = imageViewer
 	media.ImageSingle = cfg.Section("media").Key("image-single").MustBool(true)
 
-	videoViewer := cfg.Section("media").Key("video-viewer").String()
-	if videoViewer == "" {
-		videoViewer = "xdg-open"
+	videoViewerComponents := strings.Fields(cfg.Section("media").Key("video-viewer").String())
+	if len(videoViewerComponents) == 0 {
+		media.VideoViewer = "xdg-open"
+		media.VideoArgs = []string{}
+	} else {
+		media.VideoViewer = videoViewerComponents[0]
+		media.VideoArgs = videoViewerComponents[1:]
 	}
-	media.VideoViewer = videoViewer
 	media.VideoSingle = cfg.Section("media").Key("video-single").MustBool(true)
 
-	audioViewer := cfg.Section("media").Key("audio-viewer").String()
-	if audioViewer == "" {
-		videoViewer = "xdg-open"
+	audioViewerComponents := strings.Fields(cfg.Section("media").Key("audio-viewer").String())
+	if len(audioViewerComponents) == 0 {
+		media.AudioViewer = "xdg-open"
+		media.AudioArgs = []string{}
+	} else {
+		media.AudioViewer = audioViewerComponents[0]
+		media.AudioArgs = audioViewerComponents[1:]
 	}
-	media.AudioViewer = audioViewer
 	media.AudioSingle = cfg.Section("media").Key("audio-single").MustBool(true)
 
 	return media
diff -u util.go util.go
--- util.go	2020-04-11 05:06:13.000000000 -0400
+++ util.go	2020-05-05 23:28:33.792773488 -0400
@@ -109,26 +109,32 @@
 	case "image":
 		if conf.ImageSingle {
 			for _, f := range filenames {
-				exec.Command(conf.ImageViewer, f).Run()
+				args := append(conf.ImageArgs, f)
+				exec.Command(conf.ImageViewer, args...).Run()
 			}
 		} else {
-			exec.Command(conf.ImageViewer, filenames...).Run()
+			args := append(conf.ImageArgs, filenames...)
+			exec.Command(conf.ImageViewer, args...).Run()
 		}
 	case "video", "gifv":
 		if conf.VideoSingle {
 			for _, f := range filenames {
-				exec.Command(conf.VideoViewer, f).Run()
+				args := append(conf.VideoArgs, f)
+				exec.Command(conf.VideoViewer, args...).Run()
 			}
 		} else {
-			exec.Command(conf.VideoViewer, filenames...).Run()
+			args := append(conf.VideoArgs, filenames...)
+			exec.Command(conf.VideoViewer, args...).Run()
 		}
 	case "audio":
 		if conf.AudioSingle {
 			for _, f := range filenames {
-				exec.Command(conf.AudioViewer, f).Run()
+				args := append(conf.AudioArgs, f)
+				exec.Command(conf.AudioViewer, args...).Run()
 			}
 		} else {
-			exec.Command(conf.AudioViewer, filenames...).Run()
+			args := append(conf.AudioArgs, filenames...)
+			exec.Command(conf.AudioViewer, args...).Run()
 		}
 	}

Feature Request: Show favourited toots

There seems to be no way to show the toots which were favourited. OTOH the :bookmarks and the :saved commands seem to be doing the same thing (showing bookmarked toots).

Content warnings not automatically set when commenting on a toot with content warning

In most mastodon clients, when you react on a toot that has a content warning, your reaction automatically get that CW too.
Tut doesn't have that.
I think that would be a good thing to add probably.
For otherwise I have to retype it every time and it is easier to disable it if you don't want it for your specific reaction than having to retype it...

xrdb colors not working

For some reason, configuring the colors using xrdb codes does not work (hex codes and names work, though).

I'm using tut in xterm with a solarized light theme. Here's the relevant part of my .Xresources:

! Common

#define S_yellow        #b58900
#define S_orange        #cb4b16
#define S_red           #dc322f
#define S_magenta       #d33682
#define S_violet        #6c71c4
#define S_blue          #268bd2
#define S_cyan          #2aa198
#define S_green         #859900


! Light

#define S_base03        #002b36
#define S_base02        #073642
#define S_base01        #586e75
#define S_base00        #657b83
#define S_base0         #839496
#define S_base1         #93a1a1
#define S_base2         #eee8d5
#define S_base3         #fdf6e3

XTerm*background:              white
XTerm*foreground:              S_base00
XTerm*fading:                  40
XTerm*fadeColor:               S_base3
XTerm*cursorColor:             S_base01
XTerm*pointerColorBackground:  S_base1
XTerm*pointerColorForeground:  S_base01

XTerm*color0:                  S_base02
XTerm*color1:                  S_red
XTerm*color2:                  S_green
XTerm*color3:                  S_yellow
XTerm*color4:                  S_blue
XTerm*color5:                  S_magenta
XTerm*color6:                  S_cyan
XTerm*color7:                  S_base2
XTerm*color9:                  S_orange
XTerm*color8:                  S_base03
XTerm*color10:                 S_base01
XTerm*color11:                 S_base00
XTerm*color12:                 S_base0
XTerm*color13:                 S_violet
XTerm*color14:                 S_base1
XTerm*color15:                 S_base3

And here's what my tut looks like, side by side with the config file open in vim for comparison with the expected colors :

tut

Todo

  • Upload media

  • Show errors in UI. Don't log.fatal if you don't have to

  • Make it more configurable

  • Change lefpane to a list?

  • Notifications

  • Make use of streams?

  • Change visibility options for toots

  • Better default colors. Get from xrdb?

Unsupported characters keep showing up

Certain statuses can contain characters or emojis which are not correctly displayed.
These characters don't disappear in the right pane when switching to another toot.
You therefore can read the new toot, but with strange symbols sparkled here and there.

You can check this toot for reference: https://mastodon.uno/@mte90/106766305830855593
it has two of those characters in the name and one in the text.

[FR] Desktop notifications support?

Hi, and thanks for a great client! Really enjoying it so far.

Just wondering if there are any plans to add support for desktop notifications for those of us that enjoy those kinds of things?
notify-send blah kind of thing...

mastodon bookmark support

mastodon introduced bookmark support with version 3.1.0. it would be great to see tut gain support for the feature as well.

I've been using bookmarks extensively and I've been working around this limitation on tut by opening the same toot on the web and then bookmarking it for later.

by the way, this is an amazing client that works great. thank you for building it.

Suggestions about timeline switching

I think timeline switching could be improved in the following ways:

  • A label showing which timeline is being displayed on the left would be nice.
  • The command completion popup could be made similar to that of Neovim (maybe recent Vim versions behave the same way as well, I don’t know), to avoid having to press Enter twice: The popup only appears on pressing Tab, and it goes away when I press any other key. Pressing Enter executes whatever is currently on the command-line right away.
  • Pinafore has keyboard shortcuts for easy switching: gh, gl, gn and so on, as well as the number keys. I would love to see something similar in tut, too.

Feature request: Media alt-text

Would it be possible to list the alt text from an image (when it exists) under the image link? It'd be a convenient way to judge whether the image is one I want to actually see.

[O]pen doesnt show URL from Non-Mastodon Activitypub instance toot

When showing a posting ("a toot") and pressing "o" a window opens from where a list of URLs and hashtags is shown. The user can no hit "o" again while on the URL and a web browser opens.

This is not working when the message originated from a non-Mastodon Activitypub instance, e g. from https://connos.ddnss.ch/ (which is running "Honk" from https://humungus.tedunangst.com/r/honk)

Steps to reproduce:

  1. In Mastodon Web subscribe to an account from connos.ddnss.ch
  2. In tut open a message from that account and press 'o'
  3. The window opens, but no URL is shown, although there is an URL present in the message.

Custom colours not changing

Hi
Somehow modifying the colours to custom values doesn't seem to work on my system.

  • version: 0.0.17
  • environment: Linux Mint
  • DE: Mate
  • Shell: Bash (default)

I have tried with respective colour names as well hex values -> both failed
As an example, the modification for the bottom bar:
status-bar-background=xrdb:white

Interestingly however I was able to modify the general background colour into black. But even another colour on the same element, doesn't work either.

(This is my first issue here on GitHub, so please don't be too hard with me. I can provide more input if necessary)

Custom keybindings?

As I develop muscle memory for tut, my mutt muscle memory is deteriorating, so that I start pressing 'P' for sending a mail, which postpones it instead. So I was wondering if there is any way to customize the keycommands in the configuration file? Or if this is a hugely complicated thing to implement?

Only shift+s saves a bookmark

Hi!
Not sure if this is by intention, but I doubt it.
When saving a toot as bookmark, I have to capitalize the s = shift+s. Although the shortcut helper shows it as [S], any other shortcut works in lower-case. Maybe it's only my setup, but the bookmarking shortcut is the only process handling it that way.
version: 13 (however -v is showing it as 0.0.19 🙃)

Cheers,
Chris

Show if a toot is part of a thread

It would be nice to display if one particular toot in the timeline is part of a thread, therefore if it has replies or it is a reply to another toot.
In this way you could immediately know if pressing the thread button will actually be useful, and not waste time checking the thread of single toots.

I used Tusky which doesn't provide this functionality, however from the web interface it's possible to infer this information as at least the number of replies is shown.

Feature Request: Extend options in "Open" window

It would be great to have a couple more options to use to deal with the URLs in the "Open" window:

  • Copy highlighted URL
  • Open in a secondary browser (or another application/script treated as a browser)*

* an example of this: In newsboat, I can set a macro in my config file to temporarily set my "browser" to any command, and pass the URL through to that command. Afterwards, I reset my browser back. Example:

macro m set browser "/path/to/script"; open-in-browser ; set browser "/original/browser/path"

I use this, for instance, to open youtube videos in youtube-viewer/mpv rather than opening a browser window to watch them on the website.

I understand that this is probably no small task to accomplish, so I just wanted to put the bug in your ear to see if it interests anyone.

Tut randomly freezes after quiting editor

Using the fourth version, when I finish composing a post or a reply in Neovim and press ZZ, the whole terminal window becomes blank and unresponsive until I run pkill tut in another window.

This happens about 20-25% of the time, and I’m not sure how to debug it.

Key conflict in new version

Hey! I just tried using s to 'show' content in a toot with CW, as it was before (https://i.imgur.com/9LH0d5Z.png). But now s is too bookmark toot, it seems, so I can't view a toot with CW anymore. So I guess one of them needs to have a different shortcut? Or did you already change the shortcut to viewing full content and didn't change the 'tooltip'?

Cheers!

I think this is unfortunately dead

I love the app, I love go and mastodon and the CLI. but creator seems inactive since September 2020 according to his profile, so that means in all his projects etc here in github... anyone willing to help me continue development on a fork or if he reads that he can add us as developers?

  • will be nice to add some kind of image support even as ascii like gomuks(cli matrix client in go)
  • also commit the PR that is waiting.
  • etc..

Can't follow user

I may just have missed something, but when I open a user and hit [F] for follow, nothing happens... Same thing with [A]vatar, [B]lock and [M]ute.

Platform: Arch Linux, tut v 0.0.26

OMG OMG <3 U

been using toot for some time... but GO and TUI! this is great! about to try it, please add auto reload. toot is missing that

How to see if a message is direct?

Hi,

At the moment I can't find any way to see if a mention in the notifications is, in fact, a direct message. This only becomes clear when I reply to the message. Is it possible to configure the client to make this (very) visible?

GLIBC_2.32

So between 0.0.17 and 0.0.18 it looks like there was an update that included a requirement for GLIBC_2.32

I'm just using the binaries on Ubuntu 20.04 - not sure exactly which library I'd need to install or if the one available is new enough. I can run 0.0.17 just fine, but 0.0.18 and 0.0.20 won't run do to this requirement.

Current selected post reloads too when there is a new post on the timeline

I just happened to be reading a post that had a content warning.
So I pressed 'z' to read the post.
While I was reading suddenly the content warning came back, when there came a new message on my timeline.
So apparently that refreshes the current post too?
I think it might be an idea to see if it is possible to only update the timeline?
Or if not then storing somewhere that the content warning was opened, so I don't have it being closed suddenly while I am in the middle of reading a post.

Optimize for long screens

Thanks for such an awesome app.

I don't know if this is worth the time, but you could optimize for long screens by placing the List section above the main Post section

I did this for neix, and basically involved setting the height, width and position of the sections depending on the number of columns.

This would benefit those on Termux or such set ups.

Tut is showing poll results, even if not voted

Hi
Although polls cannot be voted (yet? ;), you are always able to already see the results. I think this against the Mastodon philosophy to not let influence yourself by the already given votes. Not sure if it is technically possible to hide them before the person voted (currently with another client only)

Cheers,
Chris

token stored secured

Hello, will tut allow me to run pass/gopass to fetch the token from the pass/gopass password manager like I do with other tools?
example:

AccessToken: `gopass show -o -f mastodon/myaccount@mydomain`

Thanks, I hope you add some ascii preview for images or something like gomuks does (gomuks is a matrix chat go client)

Follow request notifications cause crash

Whenever a follow request is reached in the notifications timeline, nothing is displayed. If subsequently the next or previous notification is selected, the program crashes due to a runtime memory error.

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x168 pc=0x7a777e]

goroutine 1 [running]:
github.com/rivo/tview.(*Application).Run.func1(0xc00020a000)
	/home/josias/go/pkg/mod/github.com/rivo/[email protected]/application.go:243 +0x87
panic(0x8106a0, 0xb1b410)
	/usr/local/go/src/runtime/panic.go:965 +0x1b9
main.(*NotificationsFeed).Input(0xc0005aa080, 0xc00028c000)
	/home/josias/git/tut/feed.go:1175 +0x9e
main.(*StatusView).inputBoth(0xc000408060, 0xc00028c000)
	/home/josias/git/tut/statusview.go:192 +0x98
main.(*StatusView).Input(0xc000408060, 0xc00028c000, 0xc00020a000)
	/home/josias/git/tut/statusview.go:282 +0x39
main.main.func1(0xc00028c000, 0xc0003f58d8)
	/home/josias/git/tut/main.go:288 +0x62f
github.com/rivo/tview.(*Application).Run(0xc00020a000, 0x0, 0x0)
	/home/josias/go/pkg/mod/github.com/rivo/[email protected]/application.go:318 +0x785
main.main()
	/home/josias/git/tut/main.go:325 +0x1036

I propose that notifications that are not understood by be rendered somehow or with an error message instead of a crash. In addition, follow requests should be handled by tut, allowing accepting and rejecting them in the UI somehow.

[Request] Open multiple media files in reverse...

This may sound stupid, but hear me out:

  • Someone posts a toot of, say, a 4-panel comic with the images in order from 1-4,
  • A tiling window manager user opens said media in an external application
  • Image 4 is shown until you close it, then 3, then 2, then 1

This is, at least, the behavior in i3. I don't know if this is the same in all tiling WMs

I did notice that when I used MATE, it would open them 1-4 so that 4 - being opened last - was on top and 1 on the bottom of the stack, so maybe it's a universal thing....I don't know.

Anyway, would opening them in reverse be a possibility?

panic: runtime error: when favoriting toot from notifications view

attempting to favorite a toot from the [N]otifications view throws a panic: runtime error. However, the Favorite API request does go through. The toot would be favorited when I restart tut again.

Steps to Reproduce

  • Login to instance
  • Press N to get into Notifications view
  • Press F to Favorite first toot in notifications

Expected Behavior

  • toot is favorited
  • action item changes from [F]avorite to Un[F]avorite
  • tut does not crash

Actual Behavior

  • toot is favorited

  • tut crashes

    stack-trace
    panic: runtime error: index out of range [19] with length 15 [recovered]
        panic: runtime error: index out of range [19] with length 15
    
    goroutine 1 [running]:
    github.com/rivo/tview.(*Application).Run.func1(0xc0002c2000)
        $GOPATH/pkg/mod/github.com/rivo/[email protected]/application.go:244 +0x82
    panic(0x8256e0, 0xc000019040)
        $GOPATH/src/runtime/panic.go:967 +0x15d
    main.(*NotificationsFeed).Input(0xc000362000, 0xc00000e840)
        $GOPATH/src/github.com/RasmusLindroth/tut/feed.go:1130 +0x45a
    main.(*StatusView).inputBoth(0xc0001302a0, 0xc00000e840)
        $GOPATH/src/github.com/RasmusLindroth/tut/statusview.go:178 +0x8c
    main.(*StatusView).Input(0xc0001302a0, 0xc00000e840, 0xc0002c2000)
        $GOPATH/src/github.com/RasmusLindroth/tut/statusview.go:268 +0x39
    main.main.func1(0xc00000e840, 0xc000273a28)
        $GOPATH/src/github.com/RasmusLindroth/tut/main.go:251 +0x561
    github.com/rivo/tview.(*Application).Run(0xc0002c2000, 0x0, 0x0)
        $GOPATH/pkg/mod/github.com/rivo/[email protected]/application.go:314 +0x7d3
    main.main()
        $GOPATH/src/github.com/RasmusLindroth/tut/main.go:294 +0xd34
    

boosted toot doesn't show content warning

A toot with a content warning, when boosted, does not show the content warning. It only shows the content of the toot. The content warning text is completely omitted from the boosted toot. Shouldn't it show the content warning for the toot ( and hide the content ) in the boosted toot as well?

Screenshot from 2020-08-13 02-13-15_blurred
Screenshot from 2020-08-13 02-31-32_blurred
Screenshot from 2020-08-13 01-54-13_blurred

#Feature Request - option to send messages longer than single message character limit

Since GNU Nano has no visualization of character count it's easy to go over the character limit without realizing it. It also makes it difficult to figure out where in a message to split the character count.

Being able to have tut intelligently split the message at the character limit and send subsequent sections as threaded replies would be a wonderful addition.

Compond emijo don't don't clear properly

As you may know some emoji such as 💁🏻‍♀️ are actually made up of several characters but are meant to be rendered as 1. My terminal doesn't render these correctly as is fairly common instead rendering it as 3 separate characters.
image
This rendering issue isn't a bug in tut. However, when scrolling to different toots those extra emoji don't clear properly until they're drawn over.
image
IDK if this a a bug in tut, the tui library tut is using, or my terminal.

Favorite toots does not show as such in the new notifications column

When in timeline view, if you switch to the notification column underneath it with n, and then fav a toot, the toot won't be shown as favorited there. It does show as favorited when viewed from the normal timeline, though.

I apologize if I'm not clear enough. This is what i mean:

I favorited that toot while viewing from the notifications bar/column, but still I got this:
https://i.imgur.com/4gAbZMV.png

If i went back to the timeline view, it does show I favorited it:
https://i.imgur.com/SqrjDz0.png

If i go back to notifications, it still shows as not favorited (and if I click F it will un-favorite it).

If I restart tut, it shows the FAV as it should.

By the way, this new notification bar underneath the timeline is just AWESOME. Thanks so much :)

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.