mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
35 lines
757 B
QML
35 lines
757 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"
|
|
|
|
mainAction: () => {
|
|
Hyprsunset.toggle()
|
|
}
|
|
|
|
altAction: () => {
|
|
root.openMenu()
|
|
}
|
|
|
|
Component.onCompleted: {
|
|
Hyprsunset.fetchState()
|
|
}
|
|
|
|
StyledToolTip {
|
|
text: Translation.tr("Night Light | Right-click to configure")
|
|
}
|
|
}
|
|
|