Skip to content

Configuration

Ammar Abou Zor edited this page Jan 16, 2024 · 2 revisions

Configuration

The configuration for TUI-Journal can be found in the config.toml file located in the configuration folder within the tui-journal directory.

Use a text editor to open/create and modify this file according to the settings described below:

Backend Type

Specify the backend type for storing journal entries. The default value is "Sqlite", but you can choose between the following options:

  • "Json": Store entries in a plain text file using the JSON format.
  • "Sqlite": Store entries in a SQLite database.

Example:

backend_type = "Sqlite"

External Editor

Customize the external terminal text editor used within the app. By default, the app tries to retrieve the editor from git global configurations, followed by the environment variables VISUAL and EDITOR. If not specified, the fallback editor is vi.

Example:

external_editor = "nvim"

Default Journal Priority

Sets the default suggest priority when creating a new journal.

Example:

default_journal_priority = 3

Scroll Per Page

Sets how many journals will be scrolled when using page up/down commands.

Example:

scroll_per_page = 5  

Export Configuration

Configure the export settings for exporting journal entries.

  • default_path: Specify the optional default path to export multiple journals or a single journal's content. If not specified, the app falls back to the current directory.

Example:

[export]
default_path = "<Absolute_path_to_export_directory>"
  • show_confirmation: Set to true if you want the app to show a confirmation message after a successful export. Set to false to disable the confirmation. Default value is true

Example:

[export]
show_confirmation = true

JSON Backend Configuration

If you choose the "Json" backend type, configure the JSON backend settings.

  • file_path: Specify the file path for storing journal entries in JSON format.

Example:

[json_backend]
file_path = "<Documents-folder>/tui-journal/entries.json"

SQLite Backend Configuration

If you choose the "Sqlite" backend type, configure the SQLite backend settings.

  • file_path: Specify the file path for storing journal entries in a SQLite database.

Example:

[sqlite_backend]
file_path = "<Documents-folder>/tui-journal/entries.db"