mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-07 15:59:26 -05:00
5d1a9b1e9c
Co-Authored-By: Vague Syntax <173799252+vaguesyntax@users.noreply.github.com>
34 lines
813 B
QML
34 lines
813 B
QML
import qs.modules.common
|
|
import qs.modules.common.widgets
|
|
import qs.services
|
|
import QtQuick
|
|
import Quickshell
|
|
|
|
AndroidQuickToggleButton {
|
|
id: root
|
|
|
|
property bool auto: Config.options.light.night.automatic
|
|
|
|
name: Translation.tr("Night Light")
|
|
statusText: (auto ? Translation.tr("Auto, ") : "") + (toggled ? Translation.tr("Active") : Translation.tr("Inactive"))
|
|
|
|
toggled: Hyprsunset.active
|
|
buttonIcon: auto ? "night_sight_auto" : "bedtime"
|
|
onClicked: {
|
|
Hyprsunset.toggle()
|
|
}
|
|
|
|
altAction: () => {
|
|
Config.options.light.night.automatic = !Config.options.light.night.automatic
|
|
}
|
|
|
|
Component.onCompleted: {
|
|
Hyprsunset.fetchState()
|
|
}
|
|
|
|
StyledToolTip {
|
|
text: Translation.tr("Night Light | Right-click to toggle Auto mode")
|
|
}
|
|
}
|
|
|