Cross-platform window-Watcher for Linux (X11), macOS, Windows.
To install the pre-built application, go to https://activitywatch.net/downloads/
To build your own packaged application, run make package
To install the latest git version directly from github without cloning, run
pip install git+https://github.com/ActivityWatch/aw-watcher-window.git
To install from a cloned version, cd into the directory and run
poetry install to install inside an virtualenv. You can run the binary via aw-watcher-window.
If you want to install it system-wide it can be installed with pip install ., but that has the issue
that it might not get the exact version of the dependencies due to not reading the poetry.lock file.
In order for this watcher to be available in the UI, you'll need to have a Away From Computer (afk) watcher running alongside it.
To log current window title the terminal needs access to macOS accessibility API.
This can be enabled in System Preferences > Security & Privacy > Accessibility, then add the Terminal to this list. If this is not enabled the watcher can only log current application, and not window title.
You can configure rules to drop or redact sensitive window events before they are sent to aw-server. This is a client-side pre-filter: matching events never leave the machine at all (on the Python heartbeat path; see the macOS note below).
Add [[aw-watcher-window.privacy_filter]] entries to your config file
(~/.config/activitywatch/aw-watcher-window/aw-watcher-window.toml):
# Drop events from private-browsing windows entirely
[[aw-watcher-window.privacy_filter]]
pattern = "(?i)private browsing|incognito"
action = "drop"
# Redact window titles that contain sensitive account information
[[aw-watcher-window.privacy_filter]]
pattern = "(?i)bank|my account|password"
action = "redact"
replacement = "REDACTED" # optional; defaults to "excluded"
# Drop events from a specific app by matching its name
[[aw-watcher-window.privacy_filter]]
pattern = "(?i)signal|whatsapp"
field = "app" # optional; defaults to "title"
action = "drop"Rule fields:
pattern— Pythonreregex (case-insensitive flag supported via(?i))field— window-event field to match against ("title"by default; use"app"to match on application name)action—"drop"(discard the event) or"redact"(replace the field value)replacement— string to use when redacting; defaults to"excluded"
Rules are applied in order. A "drop" rule exits immediately — subsequent rules are not evaluated for that event.
macOS note: The default
swiftstrategy sends heartbeats from a separate binary and cannot apply these rules. Ifprivacy_filteris configured, the watcher refuses to start under--strategy swiftso titles are not leaked. Use--strategy jxaor--strategy applescripton macOS.