diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2026-07-19 12:22:20 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2026-07-19 12:22:20 +0530 |
| commit | 0a5559b9d188796022d0c0f4e0601fb491e26bc5 (patch) | |
| tree | 077f3d7bf112cd39396b06d06c06fcdcc8950a39 /quickshell | |
| parent | 4706f2c86a9aa45876facae5358ca38a3026fef3 (diff) | |
implemented a simple dnd system
which doubles as a privacy filter for screen recordings
Diffstat (limited to 'quickshell')
| -rw-r--r-- | quickshell/NotificationOverlay.qml | 4 | ||||
| -rw-r--r-- | quickshell/items/LowEnergy.qml | 1 | ||||
| -rw-r--r-- | quickshell/items/Radio.qml | 2 | ||||
| -rw-r--r-- | quickshell/shell.qml | 8 |
4 files changed, 13 insertions, 2 deletions
diff --git a/quickshell/NotificationOverlay.qml b/quickshell/NotificationOverlay.qml index 3a0dfed..d54f8f6 100644 --- a/quickshell/NotificationOverlay.qml +++ b/quickshell/NotificationOverlay.qml @@ -28,7 +28,7 @@ PanelWindow { id: server bodySupported: true - imageSupported: true + imageSupported: false actionsSupported: true onNotification: notification => { @@ -70,7 +70,7 @@ PanelWindow { } } - Component.onCompleted: opacity = 0.8 + Component.onCompleted: opacity = shellRoot.dnd ? 0 : 0.8 Timer { interval: 2000 diff --git a/quickshell/items/LowEnergy.qml b/quickshell/items/LowEnergy.qml index 881ee84..bfd33ab 100644 --- a/quickshell/items/LowEnergy.qml +++ b/quickshell/items/LowEnergy.qml @@ -3,6 +3,7 @@ import QtQuick.Layouts RowLayout { spacing: 0 + opacity: !shellRoot.dnd Text { text: " Low Energy:" color: shellRoot.white diff --git a/quickshell/items/Radio.qml b/quickshell/items/Radio.qml index 2e33dec..77e542e 100644 --- a/quickshell/items/Radio.qml +++ b/quickshell/items/Radio.qml @@ -3,6 +3,8 @@ import QtQuick.Layouts RowLayout { spacing: 0 + opacity: !shellRoot.dnd + Text { text: " Radio:" color: shellRoot.white diff --git a/quickshell/shell.qml b/quickshell/shell.qml index 484656f..341e674 100644 --- a/quickshell/shell.qml +++ b/quickshell/shell.qml @@ -26,6 +26,7 @@ ShellRoot { property bool appLauncherVisible: false property bool calendarVisible: false + property bool dnd: false property bool batteryInfo: false property bool blink: false @@ -43,6 +44,13 @@ ShellRoot { calendarVisible = true } } + GlobalShortcut { + id: dndShortCut + name: "toggleDnd" + onPressed: { + dnd = !dnd + } + } Variants { model: Quickshell.screens |
