Config
Tut is configurable, so you can change things like the colors, the default timeline, what image viewer to use and some more.
You find it in XDG_CONFIG_HOME/tut/config.ini which usally equals to ~/.config/tut/config.ini.
In the git-repo you can find a example.config.ini. It contains the default values. And can be good to look at for reference.
General config
Section [general] in your config
confirmation
Shows a confirmation view before actions such as favorite, delete toot, boost etc.
default=true
timelines
Timelines adds windows of feeds. You can customize the number of feeds, what they should show and the key to activate them.
Available timelines: home, direct, local, federated, bookmarks, saved, favorited, notifications, lists, tag
Tag is special as you need to add the tag after, see the example below.
The syntax is:
timelines=feed,[name],[keys...]
Tha values in brackets are optional. You can see the syntax for keys under the [input] section.
Some examples:
home timeline with the name Home
timelines=home,Home
local timeline with the name Local and it gets focus when you press 2
timelines=local,Local,'2'
notification timeline with the name [N]otifications and it gets focus when you press n or N
timelines=notifications,[N]otifications,'n','N'
tag timeline for #linux with the name Linux and it gets focus when you press
timelines=tag linux,Linux,"F2"
If you don't set any timelines it will default to this:
timelines=home
timelines=notifications,[N]otifications,'n','N'
date-format
The date format to be used. See Go time#Time.Format
default=2006-01-02 15:04
date-today-format
Format for dates the same day. See date-format for more info.
default=15:04
date-relative
This displays relative dates instead for statuses that are one day or older the output is 1y2m1d (1 year 2 months and 1 day)
The value is an integear
-1 = don't use relative dates
0 = always use relative dates, except for dates < 1 day
1 - ∞ = number of days to use relative dates
Example: date-relative=28 will display a relative date for toots that are between 1-28 days old. Otherwhise it will use the short or long format.
default=-1
max-width
The max width of text before it wraps when displaying toots.
0 = no restriction.
default=0
list-placement
Where do you want the list of toots to be placed?
Valid values: left, right, top, bottom.
default=left
list-split
If you have notification-feed set to true you can display it under the main list of toots (row) or place it to the right of the main list of toots (column).
default=row
list-proportion
You can change the proportions of the list view in relation to the content view list-proportion=1 and content-proportoin=3 will result in the content taking up 3 times more space.
Must be n > 0
default=1
content-proportion
See list-proportion for more info
default=2
quote-reply
If you always want to quote original message when replying.
default=false
char-limit
If you're on an instance with a custom character limit you can set it here.
default=500
show-icons
If you want to show icons in the list of toots.
default=true
short-hints
If you've learnt all the shortcut keys you can remove the help text and only show the key in tui. So it gets less cluttered.
default=false
show-filter-phrase
If you want to display the filter that filtered a toot.
default=true
show-help
If you want to show a message in the cmdbar on how to access the help text.
default=true
redraw-ui
If you don't want the whole UI to update, and only the text content you can set this option to true. This will lead to some artifacts being left on the screen when emojis are present. But it will keep the UI from flashing on every single toot in some terminals.
default=true
leader-key
The leader is used as a shortcut to run commands as you can do in Vim. By default this is disabled and you enable it by setting a leader-key. It can only consist of one char and I like to use comma as leader key. So to set it you write leader-key=,
leader-timeout
Number of milliseconds before the leader command resets. So if you tap the leader-key by mistake or are to slow it empties all the input after X milliseconds.
default=1000
leader-action
You set actions for the leader-key with one or more leader-action. It consists of two parts first the action then the shortcut. And they're separated by a comma.
Available commands: home, direct, local, federated, compose, blocking, bookmarks, saved, favorited, boosts, favorites, following, followers, muting, preferences, profile, notifications, lists, tag, window, list-placement, list-split, proportions
The shortcuts are up to you, but keep them quite short and make sure they don't collide. If you have one shortcut that is "f" and an other one that is "fav", the one with "f" will always run and "fav" will never run.
Some special leaders:
tag is special as you need to add the tag after, e.g. tag linux
window is special as it's a shortcut for switching between the timelines you've set under general and they are zero indexed. window 0 = your first timeline, window 1 = your second and so on.
list-placement as it takes the argument top, right, bottom or left
list-split as it takes the argument column or row
proportions takes the arguments [int] [int], where the first integer is the list and the other content, e.g. proportions 1 3. See list-proportion above for more information.
Some examples:
leader-action=local,lo
leader-action=lists,li
leader-action=federated,fed
leader-action=direct,d
leader-action=tag linux,tl
leader-action=window 0,h
leader-action=list-placement bottom,b
leader-action=list-split column,c
leader-action=proportions 1 3,3
Media config
Section [media] in your config
image-viewer
Your image viewer.
default=xdg-open
image-terminal
Open the image viewer in the same terminal as toot. Only for terminal based viewers.
default=false
image-single
If images should open one by one e.g. "imv image.png" multiple times. If set to false all images will open at the same time like this "imv image1.png image2.png image3.png". Not all image viewers support this, so try it first.
default=true
image-reverse
If you want to open the images in reverse order. In some image viewers this will display the images in the "right" order.
default=false
video-viewer
Your video viewer.
default=xdg-open
video-terminal
Open the video viewer in the same terminal as toot. Only for terminal based viewers.
default=false
video-single
If videos should open one by one. See image-single.
default=true
video-reverse
If you want your videos in reverse order. In some video apps this will play the files in the "right" order.
default=false
audio-viewer
Your audio viewer.
default=xdg-open
audio-terminal
Open the audio viewer in the same terminal as toot. Only for terminal based viewers.
default=false
audio-single
If audio should open one by one. See image-single.
default=true
audio-reverse
If you want to play the audio files in reverse order. In some audio apps this will play the files in the "right" order.
default=false
link-viewer
Your web browser.
default=xdg-open
link-terminal
Open the browser in the same terminal as toot. Only for terminal based browsers.
default=false
Open-Custom config
Section [open-custom] in your config
This sections allows you to set up to five custom programs to upen URLs with. If the url points to an image, you can set c1-name to img and c1-use to imv. If the program runs in a terminal and you want to run it in the same terminal as tut. Set cX-terminal to true. The name will show up in the UI, so keep it short so all five fits.
c1-name=name
c1-use=program
c1-terminal=false
c2-name=name
c2-use=program
c2-terminal=false
c3-name=name
c3-use=program
c3-terminal=false
c4-name=name
c4-use=program
c4-terminal=false
c5-name=name
c5-use=program
c5-terminal=false
Open-Pattern config
Section [open-pattern] in your config
Here you can set your own glob patterns for opening matching URLs in the program you want them to open up in. You could for example open Youtube videos in your video player instead of your default browser.
You must name the keys foo-pattern, foo-use and foo-terminal, where use is the program that will open up the URL. To see the syntax for glob pattern you can follow this URL https://github.com/gobwas/glob#syntax. foo-terminal is if the program runs in the terminal and should open in the same terminal as tut itself.
Example for youtube.com and youtu.be to open up in mpv instead of the browser.
y1-pattern=*youtube.com/watch*
y1-use=mpv
y1-terminal=false
y2-pattern=*youtu.be/*
y2-use=mpv
y2-terminal=false
Desktop-Notification config
Section [desktop-notification] in your config
followers
Notification when someone follows you.
default=false
favorite
Notification when someone favorites one of your toots.
default=false
mention
Notification when someone mentions you.
default=false
boost
Notification when someone boosts one of your toots.
default=false
poll
Notification of poll results.
default=false
posts
Notification when there is new posts in current timeline.
default=false
Style config
Section [style] in your config
All styles can be represented in their HEX value like #ffffff or with their name, so in this case white. The only special value is "default" which equals to transparent, so it will be the same color as your terminal.
You can also use xrdb colors like this xrdb:color1 The program will use colors prefixed with an * first then look for URxvt or XTerm if it can't find any color prefixed with an asterisk. If you don't want tut to guess the prefix you can set the prefix yourself. If the xrdb color can't be found a preset color will be used. You'll have to set theme=none for this to work.
xrdb-prefix
The xrdb prefix used for colors in .Xresources.
default=guess
theme
You can use some themes that comes bundled with tut check out the themes available on the URL below. If a theme is named "nord.ini" you just write theme=nord
If you want to use your own theme set theme to none then you can create your own theme below
default=default
background
The background color used on most elements.
default=xrdb:background
text
The text color used on most of the text.
default=xrdb:foreground
subtle
The color to display sublte elements or subtle text. Like lines and help text.
default=xrdb:color14
warning-text
The color for errors or warnings
default=xrdb:color1
text-special-one
This color is used to display username.
default=xrdb:color5
text-special-two
This color is used to display username and key hints.
default=xrdb:color2
top-bar-background
The color of the bar at the top
default=xrdb:color5
top-bar-text
The color of the text in the bar at the top.
default=xrdb:background
status-bar-background
The color of the bar at the bottom
default=xrdb:color5
status-bar-text
The color of the text in the bar at the bottom.
default=xrdb:foreground
status-bar-view-background
The color of the bar at the bottom in view mode.
default=xrdb:color4
status-bar-view-text
The color of the text in the bar at the bottom in view mode.
default=xrdb:foreground
list-selected-background
Background of selected list items.
default=xrdb:color5
list-selected-text
The text color of selected list items.
default=xrdb:background
Input config
Section [input] in your config
You can edit the keys for tut below.
The syntax is a bit weird, but it works. And I'll try to explain it as well as I can.
Example:
status-favorite="[F]avorite","Un[F]avorite",'f','F'
status-delete="[D]elete",'d','D'
status-favorite and status-delete differs because favorite can be in two states, so you will have to add two key hints.
Most keys will only have on key hint. Look at the default value for reference.
Key hints must be in some of the following formats. Remember the quotation marks.
"" = empty
"[D]elete" = Delete with a highlighted D
"Un[F]ollow" = UnFollow with a highlighted F
"[Enter]" = Enter where everything is highlighted
"Yan[K]" = YanK with a highlighted K
After the hint (or hints) you must set the keys. You can do this in two ways, with single quotation marks or double ones.
The single ones are for single chars like 'a', 'b', 'c' and double marks are for special keys like "Enter". Remember that they are case sensetive.
To find the names of special keys you have to go to the following site and look for "var KeyNames = map[Key]string{"
global-down
Keys for moving down
default="",'j','J',"Down"
global-up
Keys for moving up
default="",'k','K',"Up"
global-enter
To select items
default="","Enter"
global-back
To go back
default="[Esc]","Esc"
global-exit
To go back and exit Tut
default="[Q]uit",'q','Q'
main-home
Move to the top
default="",'g',"Home"
main-end
Move to the bottom
default="",'G',"End"
main-prev-feed
Go to previous feed
default="",'h','H',"Left"
main-next-feed
Go to next feed
default="",'l','L',"Right"
main-prev-window
Focus on the previous feed window
default="","Backtab"
main-next-window
Focus on the next feed window
default="","Tab"
main-notification-focus
Focus on the notification list
default="[N]otifications",'n','N'
main-compose
Compose a new toot
default="",'c','C'
status-avatar
Open avatar
default="[A]vatar",'a','A'
status-boost
Boost a toot
default="[B]oost","Un[B]oost",'b','B'
status-delete
Delete a toot
default="[D]elete",'d','D'
status-favorite
Favorite a toot
default="[F]avorite","Un[F]avorite",'f','F'
status-media
Open toots media files
default="[M]edia",'m','M'
status-links
Open links
default="[O]pen",'o','O'
status-poll
Open poll
default="[P]oll",'p','P'
status-reply
Reply to toot
default="[R]eply",'r','R'
status-bookmark
Save/bookmark a toot
default="[S]ave","Un[S]ave",'s','S'
status-thread
View thread
default="[T]hread",'t','T'
status-user
Open user profile
default="[U]ser",'u','U'
status-view-focus
Open the view mode
default="[V]iew",'v','V'
status-yank
Yank the url of the toot
default="[Y]ank",'y','Y'
status-toggle-spoiler
Remove the spoiler
default="Press [Z] to toggle spoiler",'z','Z'
user-avatar
View avatar
default="[A]vatar",'a','A'
user-block
Block the user
default="[B]lock","Un[B]lock",'b','B'
user-follow
Follow user
default="[F]ollow","Un[F]ollow",'f','F'
user-follow-request-decide
Follow user
default="Follow [R]equest","Follow [R]equest",'r','R'
user-mute
Mute user
default="[M]ute","Un[M]ute",'m','M'
user-links
Open links
default="[O]pen",'o','O'
user-user
View user profile
default="[U]ser",'u','U'
user-view-focus
Open view mode
default="[V]iew",'v','V'
user-yank
Yank the user URL
default="[Y]ank",'y','Y'
list-open-feed
Open list
default="[O]pen",'o','O'
link-open
Open URL
default="[O]pen",'o','O'
link-yank
Yank the URL
default="[Y]ank",'y','Y'
compose-edit-spoiler
Edit spoiler text on new toot
default="[C]W text",'c','C'
compose-edit-text
Edit the text on new toot
default="[E]dit text",'e','E'
compose-include-quote
Include a quote when replying
default="[I]nclude quote",'i','I'
compose-media-focus
Focus on adding media to toot
default="[M]edia",'m','M'
compose-post
Post the new toot
default="[P]ost",'p','P'
compose-toggle-content-warning
Toggle content warning on toot
default="[T]oggle CW",'t','T'
compose-visibility
Edit the visibility on new toot
default="[V]isibility",'v','V'
compose-poll
Switch to creating a poll
default="P[O]ll",'o','O'
media-delete
Delete media file
default="[D]elete",'d','D'
media-edit-desc
Edit the description on media file
default="[E]dit desc",'e','E'
media-add
Add a new media file
default="[A]dd",'a','A'
vote-vote
Vote on poll
default="[V]ote",'v','V'
vote-select
Select item to vote on
default="[Enter] to select",' ', "Enter"
poll-add
Add a new poll option
default="[A]dd",'a','A'
poll-edit
Edit a poll option
default="[E]dit",'e','E'
poll-delete
Delete a poll option
default="[D]elete",'d','D'
poll-multi-toggle
Toggle voting on multiple options
default="Toggle [M]ultiple",'m','M'
poll-expiration
Change the expiration of poll
default="E[X]pires",'x','X'
preference-name
Change display name
default="[N]ame",'n','N'
preference-visibility
Change default visibility of toots
default="[V]isibility",'v','V'
preference-bio
Change bio in profile
default="[B]io",'b','B'
preference-save
Save your preferences
default="[S]ave",'s','S'
preference-fields
Edit profile fields
default="[F]ields",'f','F'
preference-fields-add
Add new field
default="[A]dd",'a','A'
preference-fields-edit
Edit current field
default="[E]dit",'e','E'
preference-fields-delete
Delete current field
default="[D]elete",'d','D'