From 5f23f6caa301f8535422424e8b4a34af60c305bd Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Thu, 23 Oct 2025 19:29:37 +0200 Subject: [PATCH] brightness: adjust antiflashbang delays, indicate nightlight on osd --- .../onScreenDisplay/indicators/BrightnessIndicator.qml | 4 ++-- dots/.config/quickshell/ii/services/Brightness.qml | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/onScreenDisplay/indicators/BrightnessIndicator.qml b/dots/.config/quickshell/ii/modules/onScreenDisplay/indicators/BrightnessIndicator.qml index 30661b911..6041f8cfa 100644 --- a/dots/.config/quickshell/ii/modules/onScreenDisplay/indicators/BrightnessIndicator.qml +++ b/dots/.config/quickshell/ii/modules/onScreenDisplay/indicators/BrightnessIndicator.qml @@ -9,9 +9,9 @@ OsdValueIndicator { property var focusedScreen: Quickshell.screens.find(s => s.name === Hyprland.focusedMonitor?.name) property var brightnessMonitor: Brightness.getMonitorForScreen(focusedScreen) - value: root.brightnessMonitor?.brightness ?? 50 - icon: "light_mode" + icon: Hyprsunset.active ? "routine" : "light_mode" rotateIcon: true scaleIcon: true name: Translation.tr("Brightness") + value: root.brightnessMonitor?.brightness ?? 50 } diff --git a/dots/.config/quickshell/ii/services/Brightness.qml b/dots/.config/quickshell/ii/services/Brightness.qml index 116fbd4c0..e2d164814 100644 --- a/dots/.config/quickshell/ii/services/Brightness.qml +++ b/dots/.config/quickshell/ii/services/Brightness.qml @@ -168,8 +168,8 @@ Singleton { } // Anti-flashbang - property int workspaceAnimationDelay: 700 - property int contentSwitchDelay: 20 + property int workspaceAnimationDelay: 500 + property int contentSwitchDelay: 30 property string screenshotDir: "/tmp/quickshell/brightness/antiflashbang" function brightnessMultiplierForLightness(x: real): real { // I hand picked some values and fitted an exponential curve for this @@ -188,7 +188,6 @@ Singleton { enabled: Config.options.light.antiFlashbang.enable && Appearance.m3colors.darkmode target: Hyprland function onRawEvent(event) { - print(event.name) if (["activewindowv2", "windowtitlev2"].includes(event.name)) { screenshotTimer.interval = root.contentSwitchDelay; screenshotTimer.restart();