Add instructions to use the module

This commit is contained in:
Demmie 2023-11-21 20:35:34 -05:00
parent 0ccdba4dce
commit 864d1dc364
No known key found for this signature in database
GPG Key ID: B06DAA3D432C6E9A
4 changed files with 24 additions and 5 deletions

View File

@ -65,7 +65,9 @@ jobs:
- name: cargo build bare
run: cargo build --release
- run: zip "awatcher.zip" awatcher
- run: mv awatcher aw-awatcher
working-directory: target/release
- run: zip "awatcher.zip" "aw-awatcher"
working-directory: target/release
- name: Upload awatcher to release
uses: svenstaro/upload-release-action@v2

4
Cargo.lock generated
View File

@ -447,7 +447,7 @@ dependencies = [
[[package]]
name = "awatcher"
version = "0.2.0"
version = "0.2.2-beta2"
dependencies = [
"anyhow",
"aw-datastore",
@ -3809,7 +3809,7 @@ checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
[[package]]
name = "watchers"
version = "0.2.0"
version = "0.2.2-beta2"
dependencies = [
"anyhow",
"async-trait",

View File

@ -18,7 +18,7 @@ image = { version = "0.24.6" }
members = ["watchers"]
[workspace.package]
version = "0.2.0"
version = "0.2.2-beta2"
[workspace.dependencies]
anyhow = "1.0.75"

View File

@ -1,4 +1,4 @@
# Awatcher
# Awatcher
[![Check](https://github.com/2e3s/awatcher/actions/workflows/verify.yml/badge.svg)](https://github.com/2e3s/awatcher/actions/workflows/verify.yml)
[![Dependency Status](https://deps.rs/repo/github/2e3s/awatcher/status.svg)](https://deps.rs/repo/github/2e3s/awatcher)
@ -13,6 +13,23 @@ The bundled executable can be used independently as it contains the server, UI a
The binaries for the bundle, bundled DEB and ActivityWatch watchers replacement can be downloaded from
[releases](https://github.com/2e3s/awatcher/releases).
### Module for ActivityWatch
- `awatcher.zip` has a single file `aw-awatcher`. Run `sudo unzip awatcher.zip -d /usr/local/bin` in the console to allow ActivityWatch to detect its presence.
Or specify for `-d` any other directory which is present in `$PATH` environment variable.
Ensure that the extracted file is `aw-awatcher` and not `awatcher`, rename it if necessary.
- Remove `aw-watcher-window` and `aw-watcher-afk` from autostart at `aw-qt/aw-qt.toml` in [config directory](https://docs.activitywatch.net/en/latest/directories.html#config),
add `aw-awatcher`
- Restart ActivityWatch. In the Modules submenu there should be a new checked module **aw-awatcher**.
### Bundle with built-in ActivityWatch
This is a single binary to run **awatcher** with the server without changing system and ActivityWatch configuration,
when only tracking activity windows and idle state is needed.
The bundle is **aw-server-rust** and **awatcher** as a single executable.
The data storage is compatible with ActivityWatch and **aw-server-rust** (**aw-server** has a different storage),
so this can later be run as a module for ActivityWatch.
## Supported environments
ActivityWatch server should be run before `awatcher` is running.