50 lines
1.6 KiB
QML
50 lines
1.6 KiB
QML
pragma Singleton
|
|
|
|
import Quickshell
|
|
import QtQuick
|
|
|
|
Singleton {
|
|
// --- geometry ---
|
|
readonly property int barHeight: 34
|
|
readonly property int radius: 8
|
|
readonly property int spacing: 6
|
|
readonly property int padding: 10
|
|
readonly property int gap: 4
|
|
|
|
// --- palette (deep near-black base, high-contrast foreground) ---
|
|
readonly property color base: "#05060a"
|
|
readonly property color mantle: "#000000"
|
|
readonly property color surface0: "#15161f"
|
|
readonly property color surface1: "#232532"
|
|
readonly property color overlay: "#4a4d63"
|
|
readonly property color text: "#eef1f8"
|
|
readonly property color subtext: "#b4bbd0"
|
|
|
|
readonly property color rosewater: "#ffdfd6"
|
|
readonly property color red: "#ff7a93"
|
|
readonly property color peach: "#ffb074"
|
|
readonly property color yellow: "#ffe07a"
|
|
readonly property color green: "#8ff09a"
|
|
readonly property color teal: "#7ff0df"
|
|
readonly property color sky: "#74d9ff"
|
|
readonly property color blue: "#7aa9ff"
|
|
readonly property color mauve: "#c799ff"
|
|
readonly property color lavender: "#aebcff"
|
|
|
|
// bar background, near-opaque true black
|
|
readonly property color barColor: Qt.rgba(0.02, 0.024, 0.039, 0.96)
|
|
|
|
// --- typography ---
|
|
readonly property string font: "Inter, sans-serif"
|
|
readonly property string monoFont: "JetBrainsMono Nerd Font, monospace"
|
|
readonly property int fontSize: 15
|
|
|
|
// map a 0..100 load value to a colour (green -> yellow -> red)
|
|
function loadColor(pct) {
|
|
if (pct >= 85) return red;
|
|
if (pct >= 60) return peach;
|
|
if (pct >= 35) return yellow;
|
|
return green;
|
|
}
|
|
}
|