From 482bae0e04f9f83553366f2375fe489909c82599 Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Wed, 29 Apr 2026 21:09:33 +0300 Subject: Rename project to plasma-task-manager-notifications --- Cargo.lock | 14 +++++++------- Cargo.toml | 2 +- Makefile | 12 ++++++------ README.md | 8 ++++---- notification-badge.service | 12 ------------ plasma-task-manager-notifications.service | 12 ++++++++++++ src/main.rs | 6 +++--- tests/integration.rs | 2 +- 8 files changed, 34 insertions(+), 34 deletions(-) delete mode 100644 notification-badge.service create mode 100644 plasma-task-manager-notifications.service diff --git a/Cargo.lock b/Cargo.lock index afec31e..b35a84c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -139,7 +139,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] -name = "notification-badge" +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "plasma-task-manager-notifications" version = "0.1.0" dependencies = [ "env_logger", @@ -148,12 +154,6 @@ dependencies = [ "regex", ] -[[package]] -name = "once_cell_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" - [[package]] name = "portable-atomic" version = "1.13.1" diff --git a/Cargo.toml b/Cargo.toml index 05115ae..e63e172 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "notification-badge" +name = "plasma-task-manager-notifications" version = "0.1.0" edition = "2021" description = "Taskbar badge notifications for KDE Plasma 6" diff --git a/Makefile b/Makefile index eca1cac..6b58d72 100644 --- a/Makefile +++ b/Makefile @@ -9,14 +9,14 @@ test: cargo test install: build - install -Dm755 target/release/notification-badge $(PREFIX)/bin/notification-badge - install -Dm644 notification-badge.service $(HOME)/.config/systemd/user/notification-badge.service + install -Dm755 target/release/plasma-task-manager-notifications $(PREFIX)/bin/plasma-task-manager-notifications + install -Dm644 plasma-task-manager-notifications.service $(HOME)/.config/systemd/user/plasma-task-manager-notifications.service uninstall: - rm -f $(PREFIX)/bin/notification-badge - rm -f $(HOME)/.config/systemd/user/notification-badge.service - -systemctl --user stop notification-badge.service 2>/dev/null - -systemctl --user disable notification-badge.service 2>/dev/null + rm -f $(PREFIX)/bin/plasma-task-manager-notifications + rm -f $(HOME)/.config/systemd/user/plasma-task-manager-notifications.service + -systemctl --user stop plasma-task-manager-notifications.service 2>/dev/null + -systemctl --user disable plasma-task-manager-notifications.service 2>/dev/null clean: cargo clean diff --git a/README.md b/README.md index a31f4fd..d09caac 100644 --- a/README.md +++ b/README.md @@ -34,14 +34,14 @@ This installs the binary to `~/.local/bin/` and the systemd service to `~/.confi ### Enable at login ```bash -systemctl --user enable --now notification-badge.service +systemctl --user enable --now plasma-task-manager-notifications.service ``` ### Check status ```bash -systemctl --user status notification-badge.service -journalctl --user -u notification-badge.service -f +systemctl --user status plasma-task-manager-notifications.service +journalctl --user -u plasma-task-manager-notifications.service -f ``` ## Uninstall @@ -55,7 +55,7 @@ make uninstall Run manually (logs to stderr): ```bash -notification-badge +plasma-task-manager-notifications ``` Test with a sample notification: diff --git a/notification-badge.service b/notification-badge.service deleted file mode 100644 index 93f94f3..0000000 --- a/notification-badge.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Notification Badge Monitor for KDE Taskbar -After=graphical-session.target - -[Service] -Type=simple -ExecStart=%h/.local/bin/notification-badge -Restart=on-failure -RestartSec=5 - -[Install] -WantedBy=graphical-session.target diff --git a/plasma-task-manager-notifications.service b/plasma-task-manager-notifications.service new file mode 100644 index 0000000..df69575 --- /dev/null +++ b/plasma-task-manager-notifications.service @@ -0,0 +1,12 @@ +[Unit] +Description=Notification Badge Monitor for KDE Taskbar +After=graphical-session.target + +[Service] +Type=simple +ExecStart=%h/.local/bin/plasma-task-manager-notifications +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=graphical-session.target diff --git a/src/main.rs b/src/main.rs index cafcaec..14d229f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ use log::{error, info, warn}; -use notification_badge::{AppMap, BadgeEmitter, DbusMessage, DbusParser}; +use plasma_task_manager_notifications::{AppMap, BadgeEmitter, DbusMessage, DbusParser}; use std::io::BufRead; use std::process::{Command, Stdio}; use std::sync::{Arc, Mutex}; @@ -33,7 +33,7 @@ fn install_signal_handler(app_map: &Arc>) { } fn run_initial_discovery(app_map: &Arc>) { - let new_map = notification_badge::discover_apps(); + let new_map = plasma_task_manager_notifications::discover_apps(); let mut map = app_map.lock().unwrap(); if map.update_patterns(new_map) { log_discovered(&map); @@ -46,7 +46,7 @@ fn spawn_discovery_thread(app_map: &Arc>) { let app_map_disc = Arc::clone(app_map); thread::spawn(move || loop { thread::sleep(Duration::from_secs(DISCOVERY_INTERVAL)); - let new_map = notification_badge::discover_apps(); + let new_map = plasma_task_manager_notifications::discover_apps(); let mut map = app_map_disc.lock().unwrap(); if map.update_patterns(new_map) { log_discovered(&map); diff --git a/tests/integration.rs b/tests/integration.rs index a63daa6..e4bd9f8 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -1,7 +1,7 @@ //! Integration test: simulate a full notification lifecycle using AppMap + DbusParser together, //! feeding realistic dbus-monitor output through the parser and processing results with AppMap. -use notification_badge::{AppMap, DbusMessage, DbusParser}; +use plasma_task_manager_notifications::{AppMap, DbusMessage, DbusParser}; use std::collections::HashMap; fn setup_app_map() -> AppMap { -- cgit v1.2.3