From c6a5df58d8ba7c6f92b5f08d03018f92de417051 Mon Sep 17 00:00:00 2001 From: Demmie <2e3s19@gmail.com> Date: Sat, 25 Nov 2023 00:43:42 -0500 Subject: [PATCH] Add deb for module --- .github/workflows/release.yml | 18 +++++++++++++----- Cargo.lock | 4 ++-- Cargo.toml | 24 +++++++++++++++++++----- README.md | 7 +++---- 4 files changed, 37 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 66f1652..6dc6f5e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/Cargo.lock b/Cargo.lock index b218cb7..8698949 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -447,7 +447,7 @@ dependencies = [ [[package]] name = "awatcher" -version = "0.2.3" +version = "0.2.2" dependencies = [ "anyhow", "aw-datastore", @@ -3821,7 +3821,7 @@ checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "watchers" -version = "0.2.3" +version = "0.2.2" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index f178645..d44f9de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" @@ -52,12 +52,25 @@ 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"], @@ -65,3 +78,4 @@ assets = [ ["target/release/awatcher", "usr/bin/", "755"], ["README.md", "usr/share/doc/awatcher/README", "644"], ] +conflicts = "aw-awatcher" diff --git a/README.md b/README.md index c314b93..b7c1a81 100644 --- a/README.md +++ b/README.md @@ -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**. @@ -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