aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2026-07-19 12:22:20 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2026-07-19 12:22:20 +0530
commit0a5559b9d188796022d0c0f4e0601fb491e26bc5 (patch)
tree077f3d7bf112cd39396b06d06c06fcdcc8950a39
parent4706f2c86a9aa45876facae5358ca38a3026fef3 (diff)
implemented a simple dnd system
which doubles as a privacy filter for screen recordings
-rw-r--r--hypr/hyprland/keybinds.conf1
-rw-r--r--quickshell/NotificationOverlay.qml4
-rw-r--r--quickshell/items/LowEnergy.qml1
-rw-r--r--quickshell/items/Radio.qml2
-rw-r--r--quickshell/shell.qml8
5 files changed, 14 insertions, 2 deletions
diff --git a/hypr/hyprland/keybinds.conf b/hypr/hyprland/keybinds.conf
index ff7f018..2b6eb7b 100644
--- a/hypr/hyprland/keybinds.conf
+++ b/hypr/hyprland/keybinds.conf
@@ -10,6 +10,7 @@ bind = $mainMod, E, exec, $fileManager
bind = $mainMod, F, togglefloating,
bind = $mainMod, R, global, quickshell:toggleLauncher
bind = $mainMod, C, global, quickshell:toggleCalendar
+bind = $mainMod, D, global, quickshell:toggleDnd
bind = $mainMod, P, exec, hyprpicker
bind = $mainMod, J, layoutmsg, togglesplit
bind = CTRL SHIFT, escape, exec, $taskManager
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