diff --git a/settings/hyprland.nix b/settings/hyprland.nix index 8f94827..4c261e1 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -63,6 +63,7 @@ in quickshell qt6.qt5compat zenity + libcanberra-gtk3 ]; # Use upstream anyrun flake's HM module instead of the built-in one @@ -498,6 +499,7 @@ in readonly property string nmcli: "${nmcli}" readonly property string wifiConnect: "${wifiConnectScript}" readonly property string powerprofilesctl: "${powerprofilesctl}" + readonly property string notifSound: "${pkgs.libcanberra-gtk3}/bin/canberra-gtk-play" } ''; }; @@ -1722,6 +1724,7 @@ in text = '' import Quickshell import Quickshell.Wayland + import Quickshell.Io import QtQuick PanelWindow { @@ -1731,10 +1734,17 @@ in property var currentNotif: null property bool open: false + readonly property var mutedApps: ["discord", "Discord", "Spotify", "spotify", "vlc", "mpv"] + WlrLayershell.layer: WlrLayer.Overlay WlrLayershell.namespace: "quickshell-toast" exclusionMode: ExclusionMode.Ignore + Process { + id: notifSoundProc + command: [Commands.notifSound, "-i", "message"] + } + Connections { target: shellRoot function onNotificationReceived() { @@ -1747,6 +1757,9 @@ in visible = true; open = true; _toastTimer.restart(); + if (!mutedApps.includes(notification.appName)) { + notifSoundProc.running = true; + } } function dismiss() {