Decrease gamma when brightness is requested to go lower beyond 0

This commit is contained in:
altrup
2026-03-22 16:36:17 -04:00
parent 8aa9041106
commit 4caa59dd9e
9 changed files with 72 additions and 30 deletions
@@ -3,7 +3,7 @@ import QtQml
import QtQuick
import Quickshell.Io
import qs.services
import "../"
import ".."
NestableObject {
id: root
@@ -12,11 +12,11 @@ QuickToggleModel {
name: Translation.tr("Night Light")
statusText: (auto ? Translation.tr("Auto, ") : "") + (toggled ? Translation.tr("Active") : Translation.tr("Inactive"))
toggled: Hyprsunset.active
toggled: Hyprsunset.temperatureActive
icon: auto ? "night_sight_auto" : "bedtime"
mainAction: () => {
Hyprsunset.toggle()
Hyprsunset.toggleTemperature()
}
hasMenu: true
@@ -9,7 +9,7 @@ OsdValueIndicator {
property var focusedScreen: Quickshell.screens.find(s => s.name === Hyprland.focusedMonitor?.name)
property var brightnessMonitor: Brightness.getMonitorForScreen(focusedScreen)
icon: Hyprsunset.active ? "routine" : "light_mode"
icon: Hyprsunset.temperatureActive ? "routine" : "light_mode"
rotateIcon: true
scaleIcon: true
name: Translation.tr("Brightness")
@@ -44,9 +44,9 @@ WindowDialog {
iconSize: Appearance.font.pixelSize.larger
buttonIcon: "check"
text: Translation.tr("Enable now")
checked: Hyprsunset.active
checked: Hyprsunset.temperatureActive
onCheckedChanged: {
Hyprsunset.toggle(checked)
Hyprsunset.toggleTemperature(checked)
}
}
@@ -6,10 +6,10 @@ import Quickshell.Io
QuickToggleButton {
id: nightLightButton
toggled: Hyprsunset.active
toggled: Hyprsunset.temperatureActive
buttonIcon: Config.options.light.night.automatic ? "night_sight_auto" : "bedtime"
onClicked: {
Hyprsunset.toggle()
Hyprsunset.toggleTemperature()
}
altAction: () => {
@@ -87,9 +87,9 @@ Item {
name: Translation.tr("Enable now")
description: Translation.tr("More comfortable viewing at night")
iconName: WIcons.nightLightIcon
checked: Hyprsunset.active
checked: Hyprsunset.temperatureActive
onCheckedChanged: {
Hyprsunset.toggle(checked);
Hyprsunset.toggleTemperature(checked);
}
}
@@ -71,7 +71,7 @@ Singleton {
property string bluetoothIcon: BluetoothStatus.connected ? "bluetooth-connected" : BluetoothStatus.enabled ? "bluetooth" : "bluetooth-disabled"
property string nightLightIcon: Hyprsunset.active ? "weather-moon" : "weather-moon-off"
property string nightLightIcon: Hyprsunset.temperatureActive ? "weather-moon" : "weather-moon-off"
property string notificationsIcon: Notifications.silent ? "alert-snooze" : "alert"