92 lines
3.1 KiB
QML
92 lines
3.1 KiB
QML
pragma Singleton
|
|
pragma ComponentBehavior: Bound
|
|
|
|
import QtQuick
|
|
import Quickshell
|
|
import Quickshell.Io
|
|
|
|
Singleton {
|
|
id: root
|
|
property string filePath: Directories.shellConfigPath
|
|
property alias options: configOptionsJsonAdpater
|
|
property bool ready: false
|
|
|
|
FileView {
|
|
path: root.filePath
|
|
watchChanges: true
|
|
onFileChanged: reload()
|
|
onLoaded: root.ready = true
|
|
onLoadFailed: error => {
|
|
if (error == FileViewError.FileNotFound) {
|
|
writeAdapter();
|
|
}
|
|
}
|
|
|
|
JsonAdapter {
|
|
id: configOptionsJsonAdpater
|
|
|
|
property JsonObject appearance: JsonObject {
|
|
property bool extraBackgroundTint: true
|
|
property int fakeScreenRounding: 2
|
|
property bool transparency: false
|
|
property JsonObject wallpaperTheming: JsonObject {
|
|
property bool enableAppsAndShell: true
|
|
property bool enableQtApps: true
|
|
property bool enableTerminal: true
|
|
}
|
|
property JsonObject palette: JsonObject {
|
|
property string type: "auto" // Allowed: auto, scheme-content, scheme-expressive, scheme-fidelity, scheme-fruit-salad, scheme-monochrome, scheme-neutral, scheme-rainbow, scheme-tonal-spot
|
|
}
|
|
}
|
|
|
|
property JsonObject background: JsonObject {
|
|
property string wallpaperPath: ""
|
|
property string thumbnailPath: ""
|
|
}
|
|
|
|
property JsonObject bar: JsonObject {
|
|
property bool bottom: false // Instead of top
|
|
property int cornerStyle: 0 // 0: Hug | 1: Float | 2: Plain rectangle
|
|
property bool borderless: false // true for no grouping of items
|
|
property string topLeftIcon: "spark" // Options: distro, spark
|
|
property bool showBackground: true
|
|
property bool verbose: true
|
|
property JsonObject resources: JsonObject {
|
|
property bool alwaysShowSwap: true
|
|
property bool alwaysShowCpu: false
|
|
}
|
|
property list<string> screenList: [] // List of names, like "eDP-1", find out with 'hyprctl monitors' command
|
|
property JsonObject utilButtons: JsonObject {
|
|
property bool showScreenSnip: true
|
|
property bool showColorPicker: false
|
|
property bool showMicToggle: false
|
|
property bool showKeyboardToggle: true
|
|
property bool showDarkModeToggle: true
|
|
property bool showPerformanceProfileToggle: false
|
|
}
|
|
property JsonObject workspaces: JsonObject {
|
|
property bool monochromeIcons: true
|
|
property int shown: 10
|
|
property bool showAppIcons: true
|
|
property bool alwaysShowNumbers: false
|
|
property int showNumberDelay: 300 // milliseconds
|
|
}
|
|
}
|
|
|
|
property JsonObject osd: JsonObject {
|
|
property int timeout: 1000
|
|
}
|
|
|
|
property JsonObject time: JsonObject {
|
|
// https://doc.qt.io/qt-6/qtime.html#toString
|
|
property string format: "hh:mm"
|
|
property string dateFormat: "ddd, dd/MM"
|
|
}
|
|
|
|
property JsonObject windows: JsonObject {
|
|
property bool showTitlebar: true // Client-side decoration for shell apps
|
|
property bool centerTitle: true
|
|
}
|
|
}
|
|
}
|
|
} |