Reorganize Fedora dotfiles and remove legacy profile
This commit is contained in:
36
fedora/quickshell/control-center/Settings.qml
Normal file
36
fedora/quickshell/control-center/Settings.qml
Normal file
@@ -0,0 +1,36 @@
|
||||
import QtQuick
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
|
||||
property alias temperatureInterval: values.temperatureInterval
|
||||
property alias temperatureWarning: values.temperatureWarning
|
||||
property alias temperatureCritical: values.temperatureCritical
|
||||
|
||||
function setTemperatureWarning(value) {
|
||||
root.temperatureWarning = Math.min(value, root.temperatureCritical - 1);
|
||||
}
|
||||
|
||||
function setTemperatureCritical(value) {
|
||||
root.temperatureCritical = Math.max(value, root.temperatureWarning + 1);
|
||||
}
|
||||
|
||||
property FileView settingsFile: FileView {
|
||||
path: Quickshell.statePath("control-center.json")
|
||||
printErrors: false
|
||||
watchChanges: true
|
||||
onFileChanged: reload()
|
||||
onAdapterUpdated: writeAdapter()
|
||||
|
||||
JsonAdapter {
|
||||
id: values
|
||||
|
||||
property int temperatureInterval: 2000
|
||||
property int temperatureWarning: 75
|
||||
property int temperatureCritical: 90
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user