From 732ad1194a0e3732c68d5beee25a7300a54037e5 Mon Sep 17 00:00:00 2001 From: Bob Date: Sun, 22 Feb 2026 21:24:12 +0000 Subject: [PATCH] feat: replace aw-notify (Python) with aw-notify-rs (Rust) Replaces the aw-notify Python submodule (ErikBjare/aw-notify) with aw-notify-rs (0xbrayo/aw-notify-rs), a Rust reimplementation that provides the same notification features with better performance and native compilation. Changes: - Remove aw-notify submodule (Python/poetry-based build) - Add aw-notify-rs submodule (Rust/cargo-based build) - Update Makefile to use aw-notify-rs in SUBMODULES - Update CI workflows to reference aw-notify-rs - Add aw-notify-rs/target to cargo cache in both CI workflows The aw-notify-rs submodule already provides compatible Makefile targets (build, package, clean) that integrate cleanly with the existing activitywatch build system. Requested by @0xbrayo. --- .github/workflows/build-tauri.yml | 3 ++- .github/workflows/build.yml | 6 ++++-- .gitmodules | 6 +++--- Makefile | 2 +- aw-notify | 1 - aw-notify-rs | 1 + 6 files changed, 11 insertions(+), 8 deletions(-) delete mode 160000 aw-notify create mode 160000 aw-notify-rs diff --git a/.github/workflows/build-tauri.yml b/.github/workflows/build-tauri.yml index 02c2df728..e0e5d4284 100644 --- a/.github/workflows/build-tauri.yml +++ b/.github/workflows/build-tauri.yml @@ -14,7 +14,7 @@ jobs: runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.experimental }} env: - # Whether to build and include extras (like aw-notify and aw-watcher-input) + # Whether to build and include extras (like aw-notify-rs and aw-watcher-input) AW_EXTRAS: true TAURI_BUILD: true # sets the macOS version target, see: https://users.rust-lang.org/t/compile-rust-binary-for-older-versions-of-mac-osx/38695 @@ -88,6 +88,7 @@ jobs: path: | aw-server-rust/target aw-tauri/src-tauri/target + aw-notify-rs/target key: ${{ matrix.os }}-${{ env.cache-name }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ matrix.os }}-${{ env.cache-name }}-${{ steps.toolchain.outputs.rustc_hash }}- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 86058b6ff..7ad62a261 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.experimental }} env: - # Whether to build and include extras (like aw-notify and aw-watcher-input) + # Whether to build and include extras (like aw-notify-rs and aw-watcher-input) AW_EXTRAS: true # sets the macOS version target, see: https://users.rust-lang.org/t/compile-rust-binary-for-older-versions-of-mac-osx/38695 MACOSX_DEPLOYMENT_TARGET: 10.9 @@ -85,7 +85,9 @@ jobs: env: cache-name: cargo-build-target with: - path: aw-server-rust/target + path: | + aw-server-rust/target + aw-notify-rs/target # key needs to contain rustc_hash due to https://github.com/ActivityWatch/aw-server-rust/issues/180 key: ${{ matrix.os }}-${{ env.cache-name }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} restore-keys: | diff --git a/.gitmodules b/.gitmodules index e5e7a8947..80c468176 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,9 +19,6 @@ [submodule "aw-server-rust"] path = aw-server-rust url = https://github.com/ActivityWatch/aw-server-rust.git -[submodule "aw-notify"] - path = aw-notify - url = https://github.com/ErikBjare/aw-notify.git [submodule "aw-watcher-input"] path = aw-watcher-input url = https://github.com/ActivityWatch/aw-watcher-input.git @@ -31,3 +28,6 @@ [submodule "awatcher"] path = awatcher url = https://github.com/2e3s/awatcher +[submodule "aw-notify-rs"] + path = aw-notify-rs + url = https://github.com/0xbrayo/aw-notify-rs.git diff --git a/Makefile b/Makefile index 9b2a5c23c..1bfef5c3e 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ ifeq ($(SKIP_SERVER_RUST),true) endif # Include extras if AW_EXTRAS is true ifeq ($(AW_EXTRAS),true) - SUBMODULES := $(SUBMODULES) aw-notify aw-watcher-input + SUBMODULES := $(SUBMODULES) aw-notify-rs aw-watcher-input endif # A function that checks if a target exists in a Makefile diff --git a/aw-notify b/aw-notify deleted file mode 160000 index bcea3cd1a..000000000 --- a/aw-notify +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bcea3cd1a7ffd1ffcb721b952dfa75d11c3bef91 diff --git a/aw-notify-rs b/aw-notify-rs new file mode 160000 index 000000000..8095a1b4c --- /dev/null +++ b/aw-notify-rs @@ -0,0 +1 @@ +Subproject commit 8095a1b4c0098b3406c289d32bbb1597e2f9044f