From 3c0fd6d63231b6604c86dcfb44618eb18c057987 Mon Sep 17 00:00:00 2001 From: Ziad Arafat Date: Fri, 30 Oct 2026 15:06:10 -0600 Subject: [PATCH] KDE Connect: Portal 2 sounds replace the old Oxygen picks; build-sound-theme reads mapping from the checkout Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013UzjWUxheYfqqjWGH7Ktmc --- config/sounds/portal2.json | 3 +++ home/gui/sounds.nix | 5 ++++- scripts/build-sound-theme.py | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/config/sounds/portal2.json b/config/sounds/portal2.json index d153475..eb0209a 100644 --- a/config/sounds/portal2.json +++ b/config/sounds/portal2.json @@ -128,6 +128,9 @@ ], "completion-rotation": [ "sound/ui/p2_editor_tile_pick_01.wav" + ], + "phone-incoming-call": [ + "sound/ambient/alarms/portal_elevator_chime.wav" ] } } \ No newline at end of file diff --git a/home/gui/sounds.nix b/home/gui/sounds.nix index 34b4bdf..7625dfc 100644 --- a/home/gui/sounds.nix +++ b/home/gui/sounds.nix @@ -70,8 +70,11 @@ lib.mkIf config.dotfiles.gui { "Event\\/recordingSaved" = popupSound "complete"; "Event\\/ocrTextExtracted" = popupSound "complete"; }; - # callReceived / missedCall / notification / textShareReceived keep your own Oxygen sounds. "kdeconnect.notifyrc" = { + "Event\\/callReceived" = popupSound "phone-incoming-call"; + "Event\\/missedCall" = popupSound "dialog-warning"; + "Event\\/notification" = popupSound "message-new-instant"; + "Event\\/textShareReceived" = popupSound "message-new-instant"; "Event\\/pingReceived" = popupSound "message-new-instant"; "Event\\/pairingRequest" = popupSound "dialog-question"; "Event\\/batteryLow" = popupSound "battery-caution"; diff --git a/scripts/build-sound-theme.py b/scripts/build-sound-theme.py index 48a39e5..7bf3903 100644 --- a/scripts/build-sound-theme.py +++ b/scripts/build-sound-theme.py @@ -11,6 +11,7 @@ glob patterns; edit config/sounds/portal2.json to retune. import argparse import fnmatch import json +import os import re import subprocess from pathlib import Path @@ -18,7 +19,8 @@ from pathlib import Path import vpk HOME = Path.home() -MAPPING = Path(__file__).resolve().parent.parent / "config/sounds/portal2.json" +# Read from the checkout (not next to this script, which lives in the Nix store) so edits apply without a switch. +MAPPING = Path(os.environ.get("DOTFILES_DIR", HOME / ".dotfiles")) / "config/sounds/portal2.json" THEME = "portal2"