summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/shell/quickshell/PrivacyWidget.qml
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2025-09-10 15:57:26 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2025-09-10 15:57:26 +0200
commitd20393e077b8d97b18f4a224ddcb20caf6dac23b (patch)
tree337a8630deecdb50a2c879754e6b34b71575bbe0 /accounts/gkleen@sif/shell/quickshell/PrivacyWidget.qml
parent9fab3828698199718a3d2f2faf8826f77d9258f7 (diff)
downloadnixos-d20393e077b8d97b18f4a224ddcb20caf6dac23b.tar
nixos-d20393e077b8d97b18f4a224ddcb20caf6dac23b.tar.gz
nixos-d20393e077b8d97b18f4a224ddcb20caf6dac23b.tar.bz2
nixos-d20393e077b8d97b18f4a224ddcb20caf6dac23b.tar.xz
nixos-d20393e077b8d97b18f4a224ddcb20caf6dac23b.zip
...
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/PrivacyWidget.qml')
-rw-r--r--accounts/gkleen@sif/shell/quickshell/PrivacyWidget.qml49
1 files changed, 49 insertions, 0 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell/PrivacyWidget.qml b/accounts/gkleen@sif/shell/quickshell/PrivacyWidget.qml
new file mode 100644
index 00000000..bb02528b
--- /dev/null
+++ b/accounts/gkleen@sif/shell/quickshell/PrivacyWidget.qml
@@ -0,0 +1,49 @@
1import QtQuick
2import QtQuick.Layouts
3import Quickshell
4import Quickshell.Widgets
5import qs.Services
6
7Item {
8 height: parent.height
9 width: layout.childrenRect.width
10 anchors.verticalCenter: parent.verticalCenter
11
12 readonly property bool active: Boolean(Privacy.activeItems)
13
14 RowLayout {
15 id: layout
16
17 anchors.fill: parent
18
19 spacing: 8
20
21 Repeater {
22 model: Privacy.activeItems
23
24 Item {
25 id: privacyItem
26
27 required property var modelData;
28
29 height: parent.height
30 width: icon.width
31
32 MaterialDesignIcon {
33 id: icon
34
35 implicitSize: 14
36 anchors.centerIn: parent
37
38 icon: {
39 if (privacyItem.modelData == Privacy.Item.Microphone)
40 return "microphone";
41 if (privacyItem.modelData == Privacy.Item.Screensharing)
42 return "monitor-share";
43 }
44 color: "#f2201f"
45 }
46 }
47 }
48 }
49}