From 73ea86b42511571bef2bd8763defc11a17fc4d0b Mon Sep 17 00:00:00 2001 From: Rasmus Lindroth Date: Mon, 23 Jan 2023 19:39:23 +0100 Subject: [PATCH] update docs --- README.md | 11 ++++++----- config.example.toml | 4 ++-- config/default_config.go | 4 ++-- config/help.tmpl | 4 ++-- docs/man/tut.1 | 12 ++++++++---- docs/man/tut.1.md | 7 ++++--- docs/man/tut.5 | 8 ++++---- docs/man/tut.5.md | 6 +++--- ui/cliview.go | 3 ++- 9 files changed, 33 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index db1803a..278561e 100644 --- a/README.md +++ b/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 load config.ini from + -c --config load config.toml from -d --config-dir load all config from -u --user login directly to user named - 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 diff --git a/config.example.toml b/config.example.toml index c7e96f7..ce39c5c 100644 --- a/config.example.toml +++ b/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. diff --git a/config/default_config.go b/config/default_config.go index 6c307b0..182a3a1 100644 --- a/config/default_config.go +++ b/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. diff --git a/config/help.tmpl b/config/help.tmpl index 1d31c46..db8e5cb 100644 --- a/config/help.tmpl +++ b/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 "-" }} diff --git a/docs/man/tut.1 b/docs/man/tut.1 index 932f6bf..0cda17b 100644 --- a/docs/man/tut.1 +++ b/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] -Load config.ini from \f[I]\f[R] +Load config.toml from \f[I]\f[R] .TP \f[B]-d\f[R], \f[B]--config-dir\f[R] Load all config from \f[I]\f[R] .TP \f[B]-u\f[R], \f[B]--user\f[R] Login directly to user named \f[I]\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 diff --git a/docs/man/tut.1.md b/docs/man/tut.1.md index 47883ea..aad0f54 100644 --- a/docs/man/tut.1.md +++ b/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** \ -: Load config.ini from *\* +: Load config.toml from *\* **-d**, **\--config-dir** \ : Load all config from *\* **-u**, **\--user** \ : Login directly to user named *\*. +: 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. diff --git a/docs/man/tut.5 b/docs/man/tut.5 index 6463d9e..5d6edcd 100644 --- a/docs/man/tut.5 +++ b/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 diff --git a/docs/man/tut.5.md b/docs/man/tut.5.md index 1f922b2..2fc7fa5 100644 --- a/docs/man/tut.5.md +++ b/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. diff --git a/ui/cliview.go b/ui/cliview.go index 281af24..7f380b6 100644 --- a/ui/cliview.go +++ b/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 load config.toml from \n") fmt.Print("\t-d --config-dir load all config from \n") - fmt.Print("\t-u --user login directly to user named \n") + fmt.Print("\t-u --user login directly to user named .\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")