Autoformat
This commit is contained in:
parent
e237bd04ff
commit
d0b7ccf302
6 changed files with 81 additions and 43 deletions
|
|
@ -19,7 +19,6 @@ Item {
|
||||||
implicitWidth: pill.width
|
implicitWidth: pill.width
|
||||||
implicitHeight: pill.height
|
implicitHeight: pill.height
|
||||||
|
|
||||||
|
|
||||||
function getIcon() {
|
function getIcon() {
|
||||||
if (AudioService.muted) {
|
if (AudioService.muted) {
|
||||||
return "volume_off"
|
return "volume_off"
|
||||||
|
|
|
||||||
|
|
@ -344,25 +344,24 @@ ColumnLayout {
|
||||||
visible: Settings.data.colorSchemes.useWallpaperColors
|
visible: Settings.data.colorSchemes.useWallpaperColors
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: Style.marginS * scaling
|
spacing: Style.marginS * scaling
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
text: "Matugen Templates"
|
text: "Matugen Templates"
|
||||||
font.pointSize: Style.fontSizeXXL * scaling
|
font.pointSize: Style.fontSizeXXL * scaling
|
||||||
font.weight: Style.fontWeightBold
|
font.weight: Style.fontWeightBold
|
||||||
color: Color.mSecondary
|
color: Color.mSecondary
|
||||||
}
|
|
||||||
|
|
||||||
NText {
|
|
||||||
text: "Select which external components Matugen should apply theming to."
|
|
||||||
font.pointSize: Style.fontSizeM * scaling
|
|
||||||
color: Color.mOnSurfaceVariant
|
|
||||||
Layout.fillWidth: true
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NText {
|
||||||
|
text: "Select which external components Matugen should apply theming to."
|
||||||
|
font.pointSize: Style.fontSizeM * scaling
|
||||||
|
color: Color.mOnSurfaceVariant
|
||||||
|
Layout.fillWidth: true
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
NCheckbox {
|
NCheckbox {
|
||||||
label: "GTK 4 (libadwaita)"
|
label: "GTK 4 (libadwaita)"
|
||||||
|
|
|
||||||
|
|
@ -240,9 +240,9 @@ ColumnLayout {
|
||||||
description: "Apply a warm color filter to reduce blue light emission."
|
description: "Apply a warm color filter to reduce blue light emission."
|
||||||
checked: Settings.data.nightLight.enabled
|
checked: Settings.data.nightLight.enabled
|
||||||
onToggled: checked => {
|
onToggled: checked => {
|
||||||
Settings.data.nightLight.enabled = checked
|
Settings.data.nightLight.enabled = checked
|
||||||
NightLightService.apply()
|
NightLightService.apply()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Intensity settings
|
// Intensity settings
|
||||||
|
|
@ -327,9 +327,9 @@ ColumnLayout {
|
||||||
description: "Automatically enable night light based on time schedule."
|
description: "Automatically enable night light based on time schedule."
|
||||||
checked: Settings.data.nightLight.autoSchedule
|
checked: Settings.data.nightLight.autoSchedule
|
||||||
onToggled: checked => {
|
onToggled: checked => {
|
||||||
Settings.data.nightLight.autoSchedule = checked
|
Settings.data.nightLight.autoSchedule = checked
|
||||||
NightLightService.apply()
|
NightLightService.apply()
|
||||||
}
|
}
|
||||||
visible: Settings.data.nightLight.enabled
|
visible: Settings.data.nightLight.enabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -357,7 +357,10 @@ ColumnLayout {
|
||||||
model: timeOptions
|
model: timeOptions
|
||||||
currentKey: Settings.data.nightLight.startTime
|
currentKey: Settings.data.nightLight.startTime
|
||||||
placeholder: "Select start time"
|
placeholder: "Select start time"
|
||||||
onSelected: key => { Settings.data.nightLight.startTime = key; NightLightService.apply() }
|
onSelected: key => {
|
||||||
|
Settings.data.nightLight.startTime = key
|
||||||
|
NightLightService.apply()
|
||||||
|
}
|
||||||
preferredWidth: 120 * scaling
|
preferredWidth: 120 * scaling
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -373,7 +376,10 @@ ColumnLayout {
|
||||||
model: timeOptions
|
model: timeOptions
|
||||||
currentKey: Settings.data.nightLight.stopTime
|
currentKey: Settings.data.nightLight.stopTime
|
||||||
placeholder: "Select stop time"
|
placeholder: "Select stop time"
|
||||||
onSelected: key => { Settings.data.nightLight.stopTime = key; NightLightService.apply() }
|
onSelected: key => {
|
||||||
|
Settings.data.nightLight.stopTime = key
|
||||||
|
NightLightService.apply()
|
||||||
|
}
|
||||||
preferredWidth: 120 * scaling
|
preferredWidth: 120 * scaling
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,8 @@ Singleton {
|
||||||
var lowTemp = Math.round(hiCfg - (hiCfg - loCfg) * Math.pow(i, 0.6))
|
var lowTemp = Math.round(hiCfg - (hiCfg - loCfg) * Math.pow(i, 0.6))
|
||||||
cmd.push("-t", lowTemp.toString())
|
cmd.push("-t", lowTemp.toString())
|
||||||
cmd.push("-T", hiCfg.toString())
|
cmd.push("-T", hiCfg.toString())
|
||||||
if (params.autoSchedule && LocationService.data.coordinatesReady && LocationService.data.stableLatitude !== "" && LocationService.data.stableLongitude !== "") {
|
if (params.autoSchedule && LocationService.data.coordinatesReady && LocationService.data.stableLatitude !== ""
|
||||||
|
&& LocationService.data.stableLongitude !== "") {
|
||||||
cmd.push("-l", LocationService.data.stableLatitude)
|
cmd.push("-l", LocationService.data.stableLatitude)
|
||||||
cmd.push("-L", LocationService.data.stableLongitude)
|
cmd.push("-L", LocationService.data.stableLongitude)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -44,7 +45,7 @@ Singleton {
|
||||||
|
|
||||||
function stopIfRunning() {
|
function stopIfRunning() {
|
||||||
// Best-effort stop; wlsunset runs as foreground, so pkill is simplest
|
// Best-effort stop; wlsunset runs as foreground, so pkill is simplest
|
||||||
Quickshell.execDetached(["pkill", "-x", "wlsunset"])
|
Quickshell.execDetached(["pkill", "-x", "wlsunset"])
|
||||||
isRunning = false
|
isRunning = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -66,25 +67,47 @@ Singleton {
|
||||||
// Observe setting changes and location readiness
|
// Observe setting changes and location readiness
|
||||||
Connections {
|
Connections {
|
||||||
target: Settings.data.nightLight
|
target: Settings.data.nightLight
|
||||||
function onEnabledChanged() { apply() }
|
function onEnabledChanged() {
|
||||||
function onIntensityChanged() { apply() }
|
apply()
|
||||||
function onAutoScheduleChanged() { apply() }
|
}
|
||||||
function onStartTimeChanged() { apply() }
|
function onIntensityChanged() {
|
||||||
function onStopTimeChanged() { apply() }
|
apply()
|
||||||
|
}
|
||||||
|
function onAutoScheduleChanged() {
|
||||||
|
apply()
|
||||||
|
}
|
||||||
|
function onStartTimeChanged() {
|
||||||
|
apply()
|
||||||
|
}
|
||||||
|
function onStopTimeChanged() {
|
||||||
|
apply()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: LocationService.data
|
target: LocationService.data
|
||||||
function onCoordinatesReadyChanged() { if (params.enabled && params.autoSchedule) apply() }
|
function onCoordinatesReadyChanged() {
|
||||||
function onStableLatitudeChanged() { if (params.enabled && params.autoSchedule) apply() }
|
if (params.enabled && params.autoSchedule)
|
||||||
function onStableLongitudeChanged() { if (params.enabled && params.autoSchedule) apply() }
|
apply()
|
||||||
|
}
|
||||||
|
function onStableLatitudeChanged() {
|
||||||
|
if (params.enabled && params.autoSchedule)
|
||||||
|
apply()
|
||||||
|
}
|
||||||
|
function onStableLongitudeChanged() {
|
||||||
|
if (params.enabled && params.autoSchedule)
|
||||||
|
apply()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Foreground process runner
|
// Foreground process runner
|
||||||
Process {
|
Process {
|
||||||
id: runner
|
id: runner
|
||||||
running: false
|
running: false
|
||||||
onStarted: { isRunning = true; Logger.log("NightLight", "Started wlsunset:", root.lastCommand) }
|
onStarted: {
|
||||||
|
isRunning = true
|
||||||
|
Logger.log("NightLight", "Started wlsunset:", root.lastCommand)
|
||||||
|
}
|
||||||
onExited: function (code, status) {
|
onExited: function (code, status) {
|
||||||
isRunning = false
|
isRunning = false
|
||||||
Logger.log("NightLight", "wlsunset exited:", code, status)
|
Logger.log("NightLight", "wlsunset exited:", code, status)
|
||||||
|
|
|
||||||
|
|
@ -47,14 +47,26 @@ RowLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onEntered: { hovering = true; root.entered() }
|
onEntered: {
|
||||||
onExited: { hovering = false; root.exited() }
|
hovering = true
|
||||||
|
root.entered()
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
hovering = false
|
||||||
|
root.exited()
|
||||||
|
}
|
||||||
onClicked: root.toggled(!root.checked)
|
onClicked: root.toggled(!root.checked)
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on color { ColorAnimation { duration: Style.animationFast } }
|
Behavior on color {
|
||||||
Behavior on border.color { ColorAnimation { duration: Style.animationFast } }
|
ColorAnimation {
|
||||||
|
duration: Style.animationFast
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Behavior on border.color {
|
||||||
|
ColorAnimation {
|
||||||
|
duration: Style.animationFast
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@ ShellRoot {
|
||||||
ToastOverlay {}
|
ToastOverlay {}
|
||||||
|
|
||||||
// Night light handled by wlsunset via NightLightService; no overlay needed
|
// Night light handled by wlsunset via NightLightService; no overlay needed
|
||||||
|
|
||||||
IPCManager {}
|
IPCManager {}
|
||||||
|
|
||||||
// ------------------------------
|
// ------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue