add service for privacy indicators

This commit is contained in:
end-4
2025-12-05 00:19:37 +01:00
parent 9043ae7bf6
commit 7a2e21ac7c
2 changed files with 17 additions and 6 deletions
@@ -18,12 +18,7 @@ Singleton {
readonly property real hardMaxValue: 2.00 // People keep joking about setting volume to 5172% so...
property string audioTheme: Config.options.sounds.theme
property real value: sink?.audio.volume ?? 0
property bool micBeingAccessed: Pipewire.links.values.filter(link =>
!link.source.isStream && !link.source.isSink && link.target.isStream
).length > 0
onMicBeingAccessedChanged: {
print(micBeingAccessed)
}
function friendlyDeviceName(node) {
return (node.nickname || node.description || Translation.tr("Unknown"));
}
@@ -0,0 +1,16 @@
pragma Singleton
pragma ComponentBehavior: Bound
import qs.modules.common
import QtQuick
import Quickshell
import Quickshell.Services.Pipewire
/**
* Screensharing and mic activity.
*/
Singleton {
id: root
property bool screenSharing: Pipewire.linkGroups.values.filter(pwlg => pwlg.source.type === PwNodeType.VideoSource).map(pwlg => pwlg.target)
property bool micActive: Pipewire.linkGroups.values.filter(pwlg => pwlg.source.type === PwNodeType.AudioSource && pwlg.target.type === PwNodeType.AudioInStream).map(pwlg => pwlg.target)
}