diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f18a7a..7c416fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,9 +63,9 @@ jobs: file: target/release/awatcher-bundle.zip - name: cargo build bare - run: cargo build --release + run: cargo build --release --bin aw-awatcher - - run: zip "awatcher.zip" awatcher + - run: zip "awatcher.zip" "aw-awatcher" working-directory: target/release - name: Upload awatcher to release uses: svenstaro/upload-release-action@v2 diff --git a/Cargo.lock b/Cargo.lock index cd98036..c1e3800 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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", diff --git a/Cargo.toml b/Cargo.toml index 1c3535e..1eced3b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/README.md b/README.md index 58812ad..c49c47f 100644 --- a/README.md +++ b/README.md @@ -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.