Browse Source

update docs

pull/253/head
Rasmus Lindroth 3 years ago
parent
commit
73ea86b425
  1. 11
      README.md
  2. 4
      config.example.toml
  3. 4
      config/default_config.go
  4. 4
      config/help.tmpl
  5. 12
      docs/man/tut.1
  6. 7
      docs/man/tut.1.md
  7. 8
      docs/man/tut.5
  8. 6
      docs/man/tut.5.md
  9. 3
      ui/cliview.go

11
README.md

@ -99,12 +99,12 @@ Tut is configurable, so you can change things like the colors, the default timel
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.ini` on Linux which usually equals to `~/.config/tut/config.ini`.
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](https://github.com/golang/go/blob/7dc9fcb13de7bb20b11f6a526865545cc9142c2c/src/os/file.go#L455-L461).
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.ini`.
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](https://tut.anv.nu/config) and
if man pages are your thing use `tut(5)`.
@ -210,16 +210,17 @@ 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.ini
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.ini from <path>
-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 two users are named the same. Use full name like tut@fosstodon.org
If you want to login to multiple accounts seperate 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 tut@fosstodon.org
```
If you don't want to set `--config` or `--config-dir` everytime you can set

4
config.example.toml

@ -438,13 +438,13 @@ posts=false
# will be used. You'll have to set theme="none" for this to work.
# The theme to use. 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
# out the themes available on the URL below. If a theme is named nord.toml you
# just write theme="nord".
#
# https://github.com/RasmusLindroth/tut/tree/master/config/themes
#
# You can also create a theme file in your config directory e.g.
# ~/.config/tut/themes/foo.ini and then set theme=foo.
# ~/.config/tut/themes/foo.toml and then set theme=foo.
#
# If you want to use your own theme but don't want to create a new file, set
# theme="none" and then you can create your own theme below.

4
config/default_config.go

@ -440,13 +440,13 @@ posts=false
# will be used. You'll have to set theme="none" for this to work.
# The theme to use. 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
# out the themes available on the URL below. If a theme is named nord.toml you
# just write theme="nord".
#
# https://github.com/RasmusLindroth/tut/tree/master/config/themes
#
# You can also create a theme file in your config directory e.g.
# ~/.config/tut/themes/foo.ini and then set theme=foo.
# ~/.config/tut/themes/foo.toml and then set theme=foo.
#
# If you want to use your own theme but don't want to create a new file, set
# theme="none" and then you can create your own theme below.

4
config/help.tmpl

@ -141,8 +141,8 @@ Here's a list of supported commands.
tut searches for a config file in the following locations on Linux:
1. $XDG_CONFIG_HOME/tut/config.ini
2. $HOME/.config/tut/config.ini
1. $XDG_CONFIG_HOME/tut/config.toml
2. $HOME/.config/tut/config.toml
If you don't run Linux it will use the path of the Go function {{ Flags "b" }}os.UserConfigDir(){{ Flags "-" }}.
But if you move the tut folder to {{ Flags "b" }}XDG_CONFIG_HOME/tut/{{ Flags "-" }} and have set the environment variable {{ Flags "b" }}XDG_CONFIG_HOME{{ Flags "-" }}

12
docs/man/tut.1

@ -39,13 +39,17 @@ Show the version number
Add one more user to tut
.TP
\f[B]-c\f[R], \f[B]--config\f[R] <path>
Load config.ini from \f[I]<path>\f[R]
Load config.toml from \f[I]<path>\f[R]
.TP
\f[B]-d\f[R], \f[B]--config-dir\f[R] <path>
Load all config from \f[I]<path>\f[R]
.TP
\f[B]-u\f[R], \f[B]--user\f[R] <name>
Login directly to user named \f[I]<name>\f[R].
If you want to login to multiple accounts seperate them with a space and
use quotation marks.
E.g.
-u \[lq]acc_one acc_two\[rq].
If two users are named the same, use full name like
\f[I]tut\[at]fosstodon.org\f[R]
.SH COMMANDS
@ -55,15 +59,15 @@ Runs the TUI
.TP
\f[B]example-config\f[R]
Generates the default configuration file in the current directory and
names it ./config.example.ini
names it ./config.example.toml
.SH CONFIGURATION
.PP
Tut is configurable, so you can change things like the colors, the
default timeline, what image viewer to use and some more.
Check out tut(5) or the configuration file to see all the options.
.PP
You find it in \f[I]$XDG_CONFIG_HOME/tut/config.ini\f[R] on Linux which
usually equals to \f[I]\[ti]/.config/tut/config.ini\f[R].
You find it in \f[I]$XDG_CONFIG_HOME/tut/config.toml\f[R] on Linux which
usually equals to \f[I]\[ti]/.config/tut/config.toml\f[R].
If you don\[cq]t run Linux it will use the path of the Go funcdtion
os.UserConfigDir().
But if you move the tut folder to \f[I]XDG_CONFIG_HOME/tut/\f[R] and

7
docs/man/tut.1.md

@ -24,13 +24,14 @@ To see keys and commands you can use inside of tut check tut(7).
: Add one more user to tut
**-c**, **\--config** \<path\>
: Load config.ini from *\<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 seperate 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 *tut@fosstodon.org*
# COMMANDS
@ -39,12 +40,12 @@ To see keys and commands you can use inside of tut check tut(7).
: Runs the TUI
**example-config**
: Generates the default configuration file in the current directory and names it ./config.example.ini
: Generates the default configuration file in the current directory and names it ./config.example.toml
# 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 tut(5) or the configuration file to see all the options.
You find it in *$XDG_CONFIG_HOME/tut/config.ini* on Linux which usually equals to *~/.config/tut/config.ini*.
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 the Go funcdtion 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.

8
docs/man/tut.5

@ -23,8 +23,8 @@ tut - configuration for tut(1)
.PP
The configuration format for tut.
.PP
You find it in \f[I]$XDG_CONFIG_HOME/tut/config.ini\f[R] on Linux which
usually equals to \f[I]\[ti]/.config/tut/config.ini\f[R].
You find it in \f[I]$XDG_CONFIG_HOME/tut/config.toml\f[R] on Linux which
usually equals to \f[I]\[ti]/.config/tut/config.toml\f[R].
If you don\[cq]t run Linux it will use the path of the Go funcdtion
os.UserConfigDir().
But if you move the tut folder to \f[I]XDG_CONFIG_HOME/tut/\f[R] and
@ -841,12 +841,12 @@ You\[aq]ll have to set theme=\[dq]none\[dq] for this to work.
The theme to use.
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=\[dq]nord\[dq].
If a theme is named nord.toml you just write theme=\[dq]nord\[dq].
.PP
https://github.com/RasmusLindroth/tut/tree/master/config/themes
.PP
You can also create a theme file in your config directory
e.g.\ \[ti]/.config/tut/themes/foo.ini and then set theme=foo.
e.g.\ \[ti]/.config/tut/themes/foo.toml and then set theme=foo.
.PP
If you want to use your own theme but don\[aq]t want to create a new
file, set theme=\[dq]none\[dq] and then you can create your own theme

6
docs/man/tut.5.md

@ -8,7 +8,7 @@ tut - configuration for tut(1)
# DESCRIPTION
The configuration format for tut.
You find it in *$XDG_CONFIG_HOME/tut/config.ini* on Linux which usually equals to *~/.config/tut/config.ini*.
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 the Go funcdtion 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.
@ -443,11 +443,11 @@ All styles can be represented in their HEX value like \#ffffff or with their nam
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.
## theme
The theme to use. 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\".
The theme to use. 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.toml you just write theme=\"nord\".
https://github.com/RasmusLindroth/tut/tree/master/config/themes
You can also create a theme file in your config directory e.g. ~/.config/tut/themes/foo.ini and then set theme=foo.
You can also create a theme file in your config directory e.g. ~/.config/tut/themes/foo.toml and then set theme=foo.
If you want to use your own theme but don\'t want to create a new file, set theme=\"none\" and then you can create your own theme below.

3
ui/cliview.go

@ -77,7 +77,8 @@ func CliView(version string) (newUser bool, selectedUser string, confPath string
fmt.Print("\t-n --new-user add one more user to tut\n")
fmt.Print("\t-c --config <path> load config.toml from <path>\n")
fmt.Print("\t-d --config-dir <path> load all config from <path>\n")
fmt.Print("\t-u --user <name> login directly to user named <name>\n")
fmt.Print("\t-u --user <name> login directly to user named <name>.\n")
fmt.Print("\t\tIf you want to login to multiple accounts seperate them with a space and use quotation marks. E.g. -u \"acc_one acc_two\"\n")
fmt.Print("\t\tIf two users are named the same. Use full name like tut@fosstodon.org\n\n")
fmt.Print("Configuration:\n")

Loading…
Cancel
Save