45 lines
1.4 KiB
QML
45 lines
1.4 KiB
QML
pragma Singleton
|
|||
|
|
|
||
|
|
import QtQuick
|
||
|
|
import Quickshell
|
||
|
|
import Quickshell.Io
|
||
|
|
|
||
|
|
// colors.json is generated by 'scwrypts set theme'; watching it means a theme
|
||
|
|
// change recolors the shell without a restart
|
||
|
|
Singleton {
|
||
|
|
readonly property color background: json.background
|
||
|
|
readonly property color foreground: json.foreground
|
||
|
|
readonly property color backgroundAlt: json.backgroundAlt
|
||
|
|
readonly property color foregroundAlt: json.foregroundAlt
|
||
|
|
readonly property color primary: json.primary
|
||
|
|
readonly property color secondary: json.secondary
|
||
|
|
readonly property color alert: json.alert
|
||
|
|
readonly property color disabled: json.disabled
|
||
|
|
|
||
|
|
readonly property var secondaryGradient: json.secondaryGradient
|
||
|
|
|
||
|
|
readonly property string font: "Monaspace Krypton"
|
||
|
|
readonly property real fontSize: 11
|
||
|
|
|
||
|
|
FileView {
|
||
|
|
path: Quickshell.shellPath("colors.json")
|
||
|
|
watchChanges: true
|
||
|
|
onFileChanged: reload()
|
||
|
|
|
||
|
|
JsonAdapter {
|
||
|
|
id: json
|
||
|
|
|
||
|
|
property string background: "#000505"
|
||
|
|
property string foreground: "#d0f0f0"
|
||
|
|
property string backgroundAlt: "#6911aa"
|
||
|
|
property string foregroundAlt: "#d0f0f0"
|
||
|
|
property string primary: "#6911aa"
|
||
|
|
property string secondary: "#11bb98"
|
||
|
|
property string alert: "#c80064"
|
||
|
|
property string disabled: "#424253"
|
||
|
|
|
||
|
|
property var secondaryGradient: ["#006942", "#009949", "#00aa79", "#11bb98", "#22ccba"]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|