GothenburgBitFactory / timewarrior

Timewarrior - Commandline Time Tracking and Reporting
https://timewarrior.net
MIT License
1.2k stars 91 forks source link

[Question] How to specify database directory? #589

Closed sdifru closed 4 months ago

sdifru commented 4 months ago

I installed timewarrior on arch linux. The database is in ~/.local/share/timewarrior. I want to use another directory as the database. How do I do it?

lauft commented 4 months ago

Timewarrior uses XDG Base Directory to determine the DB location.

If you haven't configured XDG for your system, you can switch to another location by setting the environment variable XDG_DATA_HOME (but this may affect other applications adhering to XDG as well). There is also XDG_CONFIG_HOME which determines where Timewarrior stores its configuration (in timewarrior.cfg) and extensions.

As an alternative, you can move both, database and configuration, to the legacy directory ~/.timewarrior - or define a custom path with the environment variable TIMEWARRIORDB.

sdifru commented 4 months ago

@lauft Alright, Thanks!