Skip to content

Commit

Permalink
Add instructions to use the module
Browse files Browse the repository at this point in the history
  • Loading branch information
2e3s committed Nov 22, 2023
1 parent 0ccdba4 commit 864d1dc
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand All @@ -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.
Expand Down

0 comments on commit 864d1dc

Please sign in to comment.