check updates config option
This commit is contained in:
+1
-1
@@ -270,6 +270,7 @@ Singleton {
|
|||||||
function serializeServices(): var {
|
function serializeServices(): var {
|
||||||
return {
|
return {
|
||||||
weatherLocation: services.weatherLocation,
|
weatherLocation: services.weatherLocation,
|
||||||
|
updates: services.updates,
|
||||||
useFahrenheit: services.useFahrenheit,
|
useFahrenheit: services.useFahrenheit,
|
||||||
ddcutilService: services.ddcutilService,
|
ddcutilService: services.ddcutilService,
|
||||||
useTwelveHourClock: services.useTwelveHourClock,
|
useTwelveHourClock: services.useTwelveHourClock,
|
||||||
@@ -322,7 +323,6 @@ Singleton {
|
|||||||
|
|
||||||
ElapsedTimer {
|
ElapsedTimer {
|
||||||
id: timer
|
id: timer
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ JsonObject {
|
|||||||
"to": "YT Music"
|
"to": "YT Music"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
property bool updates: true
|
||||||
property bool useFahrenheit: false
|
property bool useFahrenheit: false
|
||||||
property bool useTwelveHourClock: Qt.locale().timeFormat(Locale.ShortFormat).toLowerCase().includes("a")
|
property bool useTwelveHourClock: Qt.locale().timeFormat(Locale.ShortFormat).toLowerCase().includes("a")
|
||||||
property int visualizerBars: 30
|
property int visualizerBars: 30
|
||||||
|
|||||||
+4
-2
@@ -5,6 +5,7 @@ import QtQuick
|
|||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import qs.Paths
|
import qs.Paths
|
||||||
|
import qs.Config
|
||||||
|
|
||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
@@ -44,13 +45,14 @@ Singleton {
|
|||||||
Timer {
|
Timer {
|
||||||
interval: 1
|
interval: 1
|
||||||
repeat: true
|
repeat: true
|
||||||
running: true
|
running: Config.services.updates
|
||||||
|
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (!root.loaded || !root.commandReady)
|
if (!root.loaded || !root.commandReady)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
updatesProc.running = true;
|
if (Config.services.updates)
|
||||||
|
updatesProc.running = true;
|
||||||
interval = 5000;
|
interval = 5000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,15 @@ SettingsPage {
|
|||||||
Separator {
|
Separator {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SettingSwitch {
|
||||||
|
name: "Check for updates"
|
||||||
|
object: Config.services
|
||||||
|
setting: "updates"
|
||||||
|
}
|
||||||
|
|
||||||
|
Separator {
|
||||||
|
}
|
||||||
|
|
||||||
SettingSwitch {
|
SettingSwitch {
|
||||||
name: "Use Fahrenheit"
|
name: "Use Fahrenheit"
|
||||||
object: Config.services
|
object: Config.services
|
||||||
@@ -60,9 +69,9 @@ SettingsPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SettingSpinBox {
|
SettingSpinBox {
|
||||||
name: "Audio increment"
|
|
||||||
max: 1
|
max: 1
|
||||||
min: 0
|
min: 0
|
||||||
|
name: "Audio increment"
|
||||||
object: Config.services
|
object: Config.services
|
||||||
setting: "audioIncrement"
|
setting: "audioIncrement"
|
||||||
step: 0.05
|
step: 0.05
|
||||||
@@ -72,9 +81,9 @@ SettingsPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SettingSpinBox {
|
SettingSpinBox {
|
||||||
name: "Brightness increment"
|
|
||||||
max: 1
|
max: 1
|
||||||
min: 0
|
min: 0
|
||||||
|
name: "Brightness increment"
|
||||||
object: Config.services
|
object: Config.services
|
||||||
setting: "brightnessIncrement"
|
setting: "brightnessIncrement"
|
||||||
step: 0.05
|
step: 0.05
|
||||||
@@ -84,9 +93,9 @@ SettingsPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SettingSpinBox {
|
SettingSpinBox {
|
||||||
name: "Max volume"
|
|
||||||
max: 5
|
max: 5
|
||||||
min: 0
|
min: 0
|
||||||
|
name: "Max volume"
|
||||||
object: Config.services
|
object: Config.services
|
||||||
setting: "maxVolume"
|
setting: "maxVolume"
|
||||||
step: 0.05
|
step: 0.05
|
||||||
@@ -105,8 +114,8 @@ SettingsPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SettingSpinBox {
|
SettingSpinBox {
|
||||||
name: "Visualizer bars"
|
|
||||||
min: 1
|
min: 1
|
||||||
|
name: "Visualizer bars"
|
||||||
object: Config.services
|
object: Config.services
|
||||||
setting: "visualizerBars"
|
setting: "visualizerBars"
|
||||||
step: 1
|
step: 1
|
||||||
|
|||||||
Reference in New Issue
Block a user