diff --git a/dots/.config/quickshell/ii/services/Audio.qml b/dots/.config/quickshell/ii/services/Audio.qml index 33c49cc30..68ebc3ae0 100644 --- a/dots/.config/quickshell/ii/services/Audio.qml +++ b/dots/.config/quickshell/ii/services/Audio.qml @@ -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")); } diff --git a/dots/.config/quickshell/ii/services/Privacy.qml b/dots/.config/quickshell/ii/services/Privacy.qml new file mode 100644 index 000000000..a14da7689 --- /dev/null +++ b/dots/.config/quickshell/ii/services/Privacy.qml @@ -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) +}