From 0a5559b9d188796022d0c0f4e0601fb491e26bc5 Mon Sep 17 00:00:00 2001 From: Aargh Rai Date: Sun, 19 Jul 2026 12:22:20 +0530 Subject: implemented a simple dnd system which doubles as a privacy filter for screen recordings --- hypr/hyprland/keybinds.conf | 1 + quickshell/NotificationOverlay.qml | 4 ++-- quickshell/items/LowEnergy.qml | 1 + quickshell/items/Radio.qml | 2 ++ quickshell/shell.qml | 8 ++++++++ 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 -- cgit v1.2.3