Skip to content

Commit

Permalink
Add deb for module
Browse files Browse the repository at this point in the history
  • Loading branch information
2e3s committed Nov 25, 2023
1 parent ae1e320 commit c6a5df5
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 16 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,26 @@ jobs:

- run: mv awatcher aw-awatcher
working-directory: target/release
- run: zip "awatcher.zip" "aw-awatcher"
- run: zip "aw-awatcher.zip" "aw-awatcher"
working-directory: target/release
- name: Upload awatcher to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/awatcher.zip
file: target/release/aw-awatcher.zip

- run: cargo deb
- name: Upload deb to release
- run: cargo deb --variant=bundle
- name: Upload bundle deb to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
file: target/debian/*.deb
file: target/debian/awatcher*.deb

- run: cargo deb --variant=module
- name: Upload module deb to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
file: target/debian/aw-awatcher*.deb
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.

24 changes: 19 additions & 5 deletions 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.3"
version = "0.2.2"

[workspace.dependencies]
anyhow = "1.0.75"
Expand Down Expand Up @@ -52,16 +52,30 @@ gnome = ["watchers/gnome"]
kwin_window = ["watchers/kwin_window"]
bundle = ["ksni", "aw-server", "aw-datastore", "open", "serde"]

[package.metadata.deb]
[package.metadata.deb.variants.module]
name = "aw-awatcher"
extended-description = """\
Awatcher is a window activity and idle watcher for ActivityWatch.
The goal is to compensate the fragmentation of desktop environments on Linux by supporting all reportable environments with both Wayland and X11.
"""
assets = [
["target/release/awatcher", "usr/bin/aw-awatcher", "755"],
["README.md", "usr/share/doc/aw-awatcher/README", "644"],
]
conflicts = "awatcher"

[package.metadata.deb.variants.bundle]
name = "awatcher"
features = ["bundle"]

extended-description = """\
Awatcher is a window activity and idle watcher with an optional tray and UI for statistics.
The goal is to compensate the fragmentation of desktop environments on Linux by supporting all reportable environments,
to add more flexibility to reports with filters, and to have better UX with the distribution by a single executable.
Awatcher is a window activity and idle watcher with a tray, server and UI for statistics.
The goal is to compensate the fragmentation of desktop environments on Linux by supporting all reportable environments with both Wayland and X11.
"""
assets = [
["src/bundle/awatcher.desktop", "usr/share/applications/", "644"],
["src/bundle/logo.png", "usr/share/awatcher/icons/awatcher.png", "644"],
["target/release/awatcher", "usr/bin/", "755"],
["README.md", "usr/share/doc/awatcher/README", "644"],
]
conflicts = "aw-awatcher"
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ The binaries for the bundle, bundled DEB and ActivityWatch watchers replacement

### 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.
- Run `sudo unzip aw-awatcher.zip -d /usr/local/bin` in the console to allow ActivityWatch to detect its presence.
- Or install the provided **aw-awatcher_\*.deb**.
- 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**.
Expand All @@ -29,7 +28,7 @@ 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.

External modules are run like in the original ActivityWatch distribution
by looking at `$PATH` and running all binaries which start with `aw-`.
by looking at `$PATH` and running all executables whose name starts with `aw-`.
They are controled from the tray, no additional configuration is necessary.

## Supported environments
Expand Down

0 comments on commit c6a5df5

Please sign in to comment.