document files, paths and environment variables

This commit is contained in:
Abraham Toriz 2022-09-30 07:42:38 -04:00
parent e52aafaf7b
commit f032216e16
No known key found for this signature in database
GPG Key ID: D5B4A746DB5DD42A
1 changed files with 35 additions and 4 deletions

View File

@ -716,12 +716,43 @@ Day of the week that should be considered as the start for :ref:`t-week`.
Options are ``"monday"``, ``"tuesday"``, ``"wednesday"``, ``"thursday"``,
``"friday"``, ``"saturday"``, ``"sunday"``.
Files and paths
---------------
Files, paths and the environment
--------------------------------
.. note::
Tiempo uses the same directory to store the database and configuration. It's
location depends on the operative system, but it's likely one of these options:
explain the config file, database path and environment variables
**On Linux**
tiempo respects ``XDG`` variables. So most likely the config directory is
``$HOME/.config/tiempo``.
**On windows**
``{FOLDERID_RoamingAppData}``
**On mac**
``$HOME/Library/Application Support``
To be 100% sure run ``t c``.
Inside the config directory you'll find two files: ``config.toml`` and
``database.sqlite3`` which are your settings file and database respectively.
Tiempo also recognises traditional ``timetrap`` config and directories, which in
all platforms should be: ``$HOME/.timetrap.yml`` for the config file and
``$HOME/.timetrap.db`` for the database.
You can set the config file to a different location by setting the
``TIMETRAP_CONFIG_FILE`` envornment variable to an absolute path that includes
the filename like so:
``TIMETRAP_CONFIG_FILE=/home/user/some/dir/my_config.toml``
From within the config file you can set the paths to the database and custom
formatters as explained in the :ref:`settings`.
.. _specifying-times: