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 toot.tmpl and user.tmpl from the 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 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.

-- Templates --