Skip to content

Commit df9eb3e

Browse files
docs: update directories for aw-server-rust and add Edit on GitHub links (#166)
* docs: update directories for aw-server-rust and add Edit on GitHub links - Update directories.rst with correct aw-server-rust paths (fixes #155) - Fill in previously-TODO cache paths for Windows/macOS - Note per-component subdirectory convention - Update appdirs-rs reference to dirs crate - Add html_context for "Edit on GitHub" links in RTD theme (fixes #158) * fix(directories): remove incorrect v0.12 claim and simplify subdirectory examples Address review feedback from Erik: - Remove false claim that aw-server-rust became default in v0.12 (it will be default in v0.14.0 via aw-tauri bundle) - Simplify subdirectory note - examples are redundant given the paths below
1 parent bd38394 commit df9eb3e

File tree

2 files changed

+31
-13
lines changed

2 files changed

+31
-13
lines changed

src/conf.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,15 @@
183183
html_theme_options = {"collapse_navigation": False, "navigation_depth": 4}
184184
using_rtd_theme = True
185185

186+
# Enable "Edit on GitHub" links (fixes #158)
187+
html_context = {
188+
"display_github": True,
189+
"github_user": "ActivityWatch",
190+
"github_repo": "docs",
191+
"github_version": "master",
192+
"conf_py_path": "/src/",
193+
}
194+
186195
# The name for this set of Sphinx documents.
187196
# "<project> v<release> documentation" by default.
188197
#

src/directories.rst

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,50 @@
11
Directories
22
===========
33

4-
Where things get stored depends on the platform you're using. All paths should follow standard directories on their platforms, and to accomplish this we use `appdirs <https://pypi.org/project/appdirs/>`_ in Python code and `appdirs-rs <https://crates.io/crates/appdirs/>`_ in Rust code.
4+
Where things get stored depends on the platform you're using. All paths should follow standard directories on their platforms, and to accomplish this we use `appdirs <https://pypi.org/project/appdirs/>`_ in Python code and the `dirs <https://crates.io/crates/dirs/>`_ crate in Rust code.
5+
6+
Each ActivityWatch component stores its data in a subdirectory named after itself.
7+
8+
The paths below use ``aw-server-rust`` as an example component.
59

610
.. _data-directory:
711

812
Data
913
----
1014

11-
- Windows: ``C:\Users\<USER>\AppData\Local\activitywatch\activitywatch``
12-
- macOS: ``~/Library/Application\ Support/activitywatch``
13-
- Linux: ``~/.local/share/activitywatch``
15+
This is where the SQLite database and other persistent data is stored.
16+
17+
- Windows: ``C:\Users\<USER>\AppData\Local\activitywatch\aw-server-rust``
18+
- macOS: ``~/Library/Application Support/activitywatch/aw-server-rust``
19+
- Linux: ``~/.local/share/activitywatch/aw-server-rust``
1420

1521
.. _config-directory:
1622

1723
Config
1824
------
1925

26+
Configuration files for each component.
27+
28+
- Windows: ``C:\Users\<USER>\AppData\Local\activitywatch\aw-server-rust``
29+
- macOS: ``~/Library/Application Support/activitywatch/aw-server-rust``
30+
- Linux: ``~/.config/activitywatch/aw-server-rust``, or the path defined by the :code:`$XDG_CONFIG_HOME` environment variable.
2031

21-
- Windows: ``%LocalAppData%\activitywatch\activitywatch``
22-
- macOS: ``~/Library/Application\ Support/activitywatch/``
23-
- Linux: ``~/.config/activitywatch``, or the path defined by the :code:`$XDG_CONFIG_HOME` environment variable.
32+
Other components have their own config directories, e.g. ``aw-watcher-afk``, ``aw-watcher-window``.
2433

2534
.. _logs-directory:
2635

2736
Logs
2837
----
2938

30-
- Windows: ``C:\Users\<USER>\AppData\Local\activitywatch\activitywatch``
31-
- macOS: ``~/Library/Logs/activitywatch``
32-
- Linux: ``~/.cache/activitywatch/log``
39+
- Windows: ``C:\Users\<USER>\AppData\Local\activitywatch\aw-server-rust\logs``
40+
- macOS: ``~/Library/Logs/activitywatch/aw-server-rust``
41+
- Linux: ``~/.cache/activitywatch/log/aw-server-rust``
3342

3443
.. _cache-directory:
3544

3645
Cache
3746
-----
3847

39-
- Windows: TODO
40-
- macOS: TODO
41-
- Linux: ``~/.cache/activitywatch``
48+
- Windows: ``C:\Users\<USER>\AppData\Local\activitywatch\aw-server-rust\cache``
49+
- macOS: ``~/Library/Caches/activitywatch/aw-server-rust``
50+
- Linux: ``~/.cache/activitywatch/aw-server-rust``

0 commit comments

Comments
 (0)