forked from Shinonome/dots-hyprland
brightness: adjust antiflashbang delays, indicate nightlight on osd
This commit is contained in:
+2
-2
@@ -9,9 +9,9 @@ OsdValueIndicator {
|
|||||||
property var focusedScreen: Quickshell.screens.find(s => s.name === Hyprland.focusedMonitor?.name)
|
property var focusedScreen: Quickshell.screens.find(s => s.name === Hyprland.focusedMonitor?.name)
|
||||||
property var brightnessMonitor: Brightness.getMonitorForScreen(focusedScreen)
|
property var brightnessMonitor: Brightness.getMonitorForScreen(focusedScreen)
|
||||||
|
|
||||||
value: root.brightnessMonitor?.brightness ?? 50
|
icon: Hyprsunset.active ? "routine" : "light_mode"
|
||||||
icon: "light_mode"
|
|
||||||
rotateIcon: true
|
rotateIcon: true
|
||||||
scaleIcon: true
|
scaleIcon: true
|
||||||
name: Translation.tr("Brightness")
|
name: Translation.tr("Brightness")
|
||||||
|
value: root.brightnessMonitor?.brightness ?? 50
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,8 +168,8 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Anti-flashbang
|
// Anti-flashbang
|
||||||
property int workspaceAnimationDelay: 700
|
property int workspaceAnimationDelay: 500
|
||||||
property int contentSwitchDelay: 20
|
property int contentSwitchDelay: 30
|
||||||
property string screenshotDir: "/tmp/quickshell/brightness/antiflashbang"
|
property string screenshotDir: "/tmp/quickshell/brightness/antiflashbang"
|
||||||
function brightnessMultiplierForLightness(x: real): real {
|
function brightnessMultiplierForLightness(x: real): real {
|
||||||
// I hand picked some values and fitted an exponential curve for this
|
// 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
|
enabled: Config.options.light.antiFlashbang.enable && Appearance.m3colors.darkmode
|
||||||
target: Hyprland
|
target: Hyprland
|
||||||
function onRawEvent(event) {
|
function onRawEvent(event) {
|
||||||
print(event.name)
|
|
||||||
if (["activewindowv2", "windowtitlev2"].includes(event.name)) {
|
if (["activewindowv2", "windowtitlev2"].includes(event.name)) {
|
||||||
screenshotTimer.interval = root.contentSwitchDelay;
|
screenshotTimer.interval = root.contentSwitchDelay;
|
||||||
screenshotTimer.restart();
|
screenshotTimer.restart();
|
||||||
|
|||||||
Reference in New Issue
Block a user