Skip to content

Commit dac4122

Browse files
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)
1 parent f040671 commit dac4122

2 files changed

Lines changed: 31 additions & 13 deletions

File tree

src/conf.py

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

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

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. For example, ``aw-server-rust`` stores its database in the data directory under ``aw-server-rust/``, and ``aw-watcher-afk`` stores its config under ``aw-watcher-afk/``.
7+
8+
Since v0.12, the default server is ``aw-server-rust``, so the paths below use that as the example.
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)