plugin: rust-side modules + theme services with serde-typed config

This commit is contained in:
Damocles 2026-05-04 22:58:12 +02:00
commit f34f3f2f4e
39 changed files with 2477 additions and 1011 deletions

View file

@ -4,6 +4,7 @@ import Quickshell
import Quickshell.Wayland
import "." as M
import "../services" as S
import NovaStats as NS
PanelWindow {
id: root
@ -43,9 +44,9 @@ PanelWindow {
Text {
text: Qt.formatDateTime(clock.date, "HH")
color: S.Theme.base0D
color: NS.ThemeService.base0D
font.pixelSize: 72
font.family: S.Theme.fontFamily
font.family: NS.ThemeService.fontFamily
font.bold: true
anchors.verticalCenter: parent.verticalCenter
}
@ -53,22 +54,22 @@ PanelWindow {
text: ":"
color: colon._colors[colon._colorIdx % colon._colors.length]
Behavior on color {
enabled: !S.Theme.reducedMotion
enabled: !S.ThemeUtil.reducedMotion
ColorAnimation {
duration: 500
}
}
font.pixelSize: 72
font.family: S.Theme.fontFamily
font.family: NS.ThemeService.fontFamily
font.bold: true
opacity: colon.opacity
anchors.verticalCenter: parent.verticalCenter
}
Text {
text: Qt.formatDateTime(clock.date, "mm")
color: S.Theme.base0E
color: NS.ThemeService.base0E
font.pixelSize: 72
font.family: S.Theme.fontFamily
font.family: NS.ThemeService.fontFamily
font.bold: true
anchors.verticalCenter: parent.verticalCenter
}
@ -78,7 +79,7 @@ PanelWindow {
source: glowSource
anchors.fill: glowSource
shadowEnabled: true
shadowColor: S.Theme.base0D
shadowColor: NS.ThemeService.base0D
shadowBlur: 1.0
shadowVerticalOffset: 0
shadowHorizontalOffset: 0
@ -91,10 +92,10 @@ PanelWindow {
Text {
text: Qt.formatDateTime(clock.date, "HH")
color: S.Theme.base0D
color: NS.ThemeService.base0D
opacity: 0.85
font.pixelSize: 72
font.family: S.Theme.fontFamily
font.family: NS.ThemeService.fontFamily
font.bold: true
anchors.verticalCenter: parent.verticalCenter
}
@ -102,16 +103,16 @@ PanelWindow {
id: colon
text: ":"
font.pixelSize: 72
font.family: S.Theme.fontFamily
font.family: NS.ThemeService.fontFamily
font.bold: true
opacity: 0.85
anchors.verticalCenter: parent.verticalCenter
property int _colorIdx: 0
readonly property var _colors: [S.Theme.base08, S.Theme.base09, S.Theme.base0A, S.Theme.base0B, S.Theme.base0C, S.Theme.base0D, S.Theme.base0E, S.Theme.base05]
readonly property var _colors: [NS.ThemeService.base08, NS.ThemeService.base09, NS.ThemeService.base0A, NS.ThemeService.base0B, NS.ThemeService.base0C, NS.ThemeService.base0D, NS.ThemeService.base0E, NS.ThemeService.base05]
color: _colors[_colorIdx % _colors.length]
Behavior on color {
enabled: !S.Theme.reducedMotion
enabled: !S.ThemeUtil.reducedMotion
ColorAnimation {
duration: 500
}
@ -139,7 +140,7 @@ PanelWindow {
Connections {
target: clock
function onDateChanged() {
if (S.Theme.reducedMotion)
if (S.ThemeUtil.reducedMotion)
return;
colon._colorIdx++;
colonAnim.restart();
@ -148,10 +149,10 @@ PanelWindow {
}
Text {
text: Qt.formatDateTime(clock.date, "mm")
color: S.Theme.base0E
color: NS.ThemeService.base0E
opacity: 0.85
font.pixelSize: 72
font.family: S.Theme.fontFamily
font.family: NS.ThemeService.fontFamily
font.bold: true
anchors.verticalCenter: parent.verticalCenter
}
@ -163,16 +164,16 @@ PanelWindow {
id: dateText
anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatDateTime(clock.date, "dddd, dd MMMM yyyy")
color: S.Theme.base05
color: NS.ThemeService.base05
opacity: 0.5
font.pixelSize: 18
font.family: S.Theme.fontFamily
font.family: NS.ThemeService.fontFamily
font.letterSpacing: 4
layer.enabled: true
layer.effect: MultiEffect {
shadowEnabled: true
shadowColor: S.Theme.base0D
shadowColor: NS.ThemeService.base0D
shadowBlur: 0.4
shadowVerticalOffset: 0
shadowHorizontalOffset: 0
@ -187,7 +188,7 @@ PanelWindow {
Rectangle {
anchors.fill: parent
color: S.Theme.base02
color: NS.ThemeService.base02
radius: 1
opacity: 0.3
}
@ -196,7 +197,7 @@ PanelWindow {
height: parent.height
color: colon._colors[colon._colorIdx % colon._colors.length]
Behavior on color {
enabled: !S.Theme.reducedMotion
enabled: !S.ThemeUtil.reducedMotion
ColorAnimation {
duration: 500
}
@ -205,7 +206,7 @@ PanelWindow {
opacity: 0.6
Behavior on width {
enabled: !S.Theme.reducedMotion
enabled: !S.ThemeUtil.reducedMotion
NumberAnimation {
duration: 50
}

View file

@ -3,11 +3,12 @@ import Quickshell
import "." as M
import "../services" as S
import "../applets" as C
import NovaStats as NS
M.BarModule {
id: root
spacing: S.Theme.moduleSpacing
active: S.Modules.backlight.enable && S.BacklightService.available
spacing: NS.ThemeService.moduleSpacing
active: NS.ModulesService.backlightEnable && S.BacklightService.available
tooltip: "Brightness: " + percent + "%"
panelNamespace: "nova-backlight"
panelContentWidth: 200

View file

@ -4,6 +4,7 @@ import Quickshell
import Quickshell.Wayland
import "." as M
import "../services" as S
import NovaStats as NS
PanelWindow {
id: bar
@ -19,13 +20,13 @@ PanelWindow {
margins.right: S.DockState.reservedWidthAnimated
implicitHeight: S.Theme.barHeight
implicitHeight: NS.ThemeService.barHeight
exclusiveZone: implicitHeight
Rectangle {
anchors.fill: parent
color: S.Theme.base00
opacity: S.Theme.barOpacity
color: NS.ThemeService.base00
opacity: NS.ThemeService.barOpacity
}
Canvas {
@ -35,7 +36,7 @@ PanelWindow {
const ctx = getContext("2d");
const w = width;
const h = height;
const r = S.Theme.screenRadius;
const r = NS.ThemeService.screenRadius;
const lw = 3;
const hw = lw / 2;
@ -43,8 +44,8 @@ PanelWindow {
// Glow wash behind the border
const glowGrad = ctx.createLinearGradient(0, 0, w, 0);
glowGrad.addColorStop(0, S.Theme.base0C.toString());
glowGrad.addColorStop(1, S.Theme.base09.toString());
glowGrad.addColorStop(0, NS.ThemeService.base0C.toString());
glowGrad.addColorStop(1, NS.ThemeService.base09.toString());
ctx.globalAlpha = 0.25;
ctx.fillStyle = glowGrad;
ctx.fillRect(0, 0, w, h);
@ -61,8 +62,8 @@ PanelWindow {
// Horizontal gradient for the border
const grad = ctx.createLinearGradient(0, 0, w, 0);
grad.addColorStop(0, S.Theme.base0C.toString());
grad.addColorStop(1, S.Theme.base09.toString());
grad.addColorStop(0, NS.ThemeService.base0C.toString());
grad.addColorStop(1, NS.ThemeService.base09.toString());
ctx.strokeStyle = grad;
ctx.lineWidth = lw;
@ -97,16 +98,16 @@ PanelWindow {
Item {
anchors.fill: parent
anchors.topMargin: S.Theme.groupSpacing
anchors.leftMargin: S.Theme.groupSpacing
anchors.rightMargin: S.Theme.groupSpacing
anchors.topMargin: NS.ThemeService.groupSpacing
anchors.leftMargin: NS.ThemeService.groupSpacing
anchors.rightMargin: NS.ThemeService.groupSpacing
// ---- center (declared first so left/right can anchor to it) ----
RowLayout {
id: centerSection
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
spacing: S.Theme.groupSpacing
spacing: NS.ThemeService.groupSpacing
M.BarGroup {
M.PrivacyModule {}
@ -120,7 +121,7 @@ PanelWindow {
anchors.left: parent.left
anchors.right: centerSection.left
anchors.verticalCenter: parent.verticalCenter
spacing: S.Theme.groupSpacing
spacing: NS.ThemeService.groupSpacing
M.BarGroup {
id: workspacesGroup
@ -135,10 +136,10 @@ PanelWindow {
id: _windowTitleGroup
Layout.minimumWidth: 0
clip: true
visible: S.Modules.windowTitle.enable && S.NiriIpc.focusedTitle !== ""
visible: NS.ModulesService.windowTitleEnable && S.NiriIpc.focusedTitle !== ""
M.WindowTitleModule {
id: _windowTitle
readonly property real _maxWidth: Math.max(0, centerSection.x - _windowTitleGroup.x - 2 * S.Theme.groupPadding - S.Theme.groupSpacing)
readonly property real _maxWidth: Math.max(0, centerSection.x - _windowTitleGroup.x - 2 * NS.ThemeService.groupPadding - NS.ThemeService.groupSpacing)
width: Math.min(naturalWidth, _maxWidth)
}
}
@ -152,7 +153,7 @@ PanelWindow {
anchors.left: centerSection.right
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
spacing: S.Theme.groupSpacing
spacing: NS.ThemeService.groupSpacing
Item {
Layout.fillWidth: true

View file

@ -3,6 +3,7 @@ import QtQuick.Effects
import Quickshell
import "." as M
import "../services" as S
import NovaStats as NS
Item {
id: root
@ -18,14 +19,14 @@ Item {
const effectiveWidth = scr.width - (S.DockState.reservedWidthAnimated ?? 0);
return Math.max(0, Math.min(1, gx / (effectiveWidth > 0 ? effectiveWidth : scr.width)));
}
property color borderColor: Qt.rgba(S.Theme.base0C.r + (S.Theme.base09.r - S.Theme.base0C.r) * _posFrac, S.Theme.base0C.g + (S.Theme.base09.g - S.Theme.base0C.g) * _posFrac, S.Theme.base0C.b + (S.Theme.base09.b - S.Theme.base0C.b) * _posFrac, 1)
property color borderColor: Qt.rgba(NS.ThemeService.base0C.r + (NS.ThemeService.base09.r - NS.ThemeService.base0C.r) * _posFrac, NS.ThemeService.base0C.g + (NS.ThemeService.base09.g - NS.ThemeService.base0C.g) * _posFrac, NS.ThemeService.base0C.b + (NS.ThemeService.base09.b - NS.ThemeService.base0C.b) * _posFrac, 1)
property bool leftEdge: false
property bool rightEdge: false
readonly property real _tlr: leftEdge ? S.Theme.screenRadius : S.Theme.radius
readonly property real _trr: rightEdge ? S.Theme.screenRadius : S.Theme.radius
readonly property real _blr: S.Theme.radius
readonly property real _brr: S.Theme.radius
readonly property real _tlr: leftEdge ? NS.ThemeService.screenRadius : NS.ThemeService.radius
readonly property real _trr: rightEdge ? NS.ThemeService.screenRadius : NS.ThemeService.radius
readonly property real _blr: NS.ThemeService.radius
readonly property real _brr: NS.ThemeService.radius
// Check children's `active` instead of visibleChildren to avoid circular
// effectiveVisible dependency: if the BarGroup is invisible, children's
@ -41,9 +42,9 @@ Item {
}
implicitWidth: row.implicitWidth + _pad * 2
implicitHeight: S.Theme.barHeight - 3 - _pad
implicitHeight: NS.ThemeService.barHeight - 3 - _pad
readonly property int _pad: S.Theme.groupPadding
readonly property int _pad: NS.ThemeService.groupPadding
property bool _hovered: false
HoverHandler {
@ -57,7 +58,7 @@ Item {
topRightRadius: root._trr
bottomLeftRadius: root._blr
bottomRightRadius: root._brr
color: Qt.rgba(S.Theme.base01.r, S.Theme.base01.g, S.Theme.base01.b, 0.55)
color: Qt.rgba(NS.ThemeService.base01.r, NS.ThemeService.base01.g, NS.ThemeService.base01.b, 0.55)
}
// Frost sheen — subtle white highlight, top-heavy
@ -137,7 +138,7 @@ Item {
property real _pulse: 0.08
SequentialAnimation on _pulse {
running: root._hovered && !S.Theme.reducedMotion
running: root._hovered && !S.ThemeUtil.reducedMotion
loops: Animation.Infinite
NumberAnimation {
to: 0.22
@ -156,7 +157,7 @@ Item {
id: row
property color accentColor: root.borderColor
anchors.centerIn: parent
spacing: S.Theme.moduleSpacing + 2
spacing: NS.ThemeService.moduleSpacing + 2
}
// Separator lines overlaid between visible row children

View file

@ -1,5 +1,6 @@
import QtQuick
import "../services" as S
import NovaStats as NS
// Icon element with crossfade animation on icon change.
// Pure visual component - tooltip handling lives in the parent BarModule.
@ -7,7 +8,7 @@ Text {
id: root
property string icon: ""
property string minIcon: ""
property color accentColor: parent?.accentColor ?? S.Theme.base05
property color accentColor: parent?.accentColor ?? NS.ThemeService.base05
property string _displayIcon: icon
property string _pendingIcon: ""
@ -42,8 +43,8 @@ Text {
width: minIcon ? Math.max(implicitWidth, _minIconMetrics.width) : implicitWidth
horizontalAlignment: minIcon ? Text.AlignHCenter : Text.AlignLeft
color: root.accentColor
font.pixelSize: S.Theme.fontSize + 1
font.family: S.Theme.iconFontFamily
font.pixelSize: NS.ThemeService.fontSize + 1
font.family: NS.ThemeService.iconFontFamily
verticalAlignment: Text.AlignVCenter
TextMetrics {

View file

@ -1,5 +1,6 @@
import QtQuick
import "../services" as S
import NovaStats as NS
// Label element with minimum-width support via minText.
// Pure visual component - tooltip handling lives in the parent BarModule.
@ -7,14 +8,14 @@ Text {
id: root
property string label: ""
property string minText: ""
property color accentColor: parent?.accentColor ?? S.Theme.base05
property color accentColor: parent?.accentColor ?? NS.ThemeService.base05
text: label
width: minText ? Math.max(implicitWidth, _minMetrics.width) : implicitWidth
horizontalAlignment: minText ? Text.AlignHCenter : Text.AlignLeft
color: root.accentColor
font.pixelSize: S.Theme.fontSize
font.family: S.Theme.fontFamily
font.pixelSize: NS.ThemeService.fontSize
font.family: NS.ThemeService.fontFamily
verticalAlignment: Text.AlignVCenter
TextMetrics {

View file

@ -2,6 +2,7 @@ import QtQuick
import Quickshell
import "." as M
import "../services" as S
import NovaStats as NS
// Unified base component for all bar modules.
// Provides: tooltip on hover, panel state management, OSD flash support.
@ -20,7 +21,7 @@ Row {
property string tooltip: ""
property bool _hovered: false
property color accentColor: parent?.accentColor ?? S.Theme.base05
property color accentColor: parent?.accentColor ?? NS.ThemeService.base05
property int cursorShape: Qt.PointingHandCursor
// Panel state

View file

@ -3,11 +3,12 @@ import Quickshell
import "." as M
import "../services" as S
import "../applets" as C
import NovaStats as NS
M.BarModule {
id: root
spacing: S.Theme.moduleSpacing
active: S.Modules.battery.enable && S.BatteryService.available
spacing: NS.ThemeService.moduleSpacing
active: NS.ModulesService.batteryEnable && S.BatteryService.available
tooltip: "Battery: " + Math.round(S.BatteryService.percent) + "%" + (S.BatteryService.charging ? " (charging)" : "")
panelNamespace: "nova-battery"
panelContentWidth: 240
@ -35,7 +36,7 @@ M.BarModule {
}
color: S.BatteryService.stateColor
opacity: root._blinkOpacity
font.pixelSize: S.Theme.fontSize + 2
font.pixelSize: NS.ThemeService.fontSize + 2
anchors.verticalCenter: parent.verticalCenter
}
M.BarLabel {

View file

@ -3,11 +3,12 @@ import Quickshell
import "." as M
import "../services" as S
import "../applets" as C
import NovaStats as NS
M.BarModule {
id: root
spacing: S.Theme.moduleSpacing
active: S.Modules.bluetooth.enable && S.BluetoothService.state !== "unavailable"
spacing: NS.ThemeService.moduleSpacing
active: NS.ModulesService.bluetoothEnable && S.BluetoothService.state !== "unavailable"
tooltip: {
if (S.BluetoothService.state === "connected")
return "Bluetooth: " + S.BluetoothService.device;
@ -33,7 +34,7 @@ M.BarModule {
M.BarIcon {
icon: "\uF294"
color: S.BluetoothService.state === "off" ? S.Theme.base04 : root.accentColor
color: S.BluetoothService.state === "off" ? NS.ThemeService.base04 : root.accentColor
anchors.verticalCenter: parent.verticalCenter
}
M.BarLabel {

View file

@ -3,11 +3,12 @@ import Quickshell
import "." as M
import "../services" as S
import "../applets" as C
import NovaStats as NS
M.BarModule {
id: root
active: S.Modules.clock.enable
spacing: S.Theme.moduleSpacing
active: NS.ModulesService.clockEnable
spacing: NS.ThemeService.moduleSpacing
tooltip: Qt.formatDateTime(clock.date, "dddd, dd. MMMM yyyy HH:mm:ss")
panelNamespace: "nova-clock"
panelContentWidth: 220
@ -25,7 +26,7 @@ M.BarModule {
}
M.BarLabel {
font.pixelSize: S.Theme.fontSize + 1
font.pixelSize: NS.ThemeService.fontSize + 1
label: Qt.formatDateTime(clock.date, "ddd, dd. MMM HH:mm")
minText: "Wed, 00. Sep 00:00"
anchors.verticalCenter: parent.verticalCenter

View file

@ -3,11 +3,12 @@ import Quickshell
import "." as M
import "../services" as S
import "../applets" as C
import NovaStats as NS
M.BarModule {
id: root
active: S.Modules.cpu.enable
spacing: Math.max(1, S.Theme.moduleSpacing - 2)
active: NS.ModulesService.cpuEnable
spacing: Math.max(1, NS.ThemeService.moduleSpacing - 2)
tooltip: "CPU: " + S.CpuService.usage + "% @ " + S.CpuService.freqGhz.toFixed(2) + " GHz"
panelNamespace: "nova-cpu"
panelContentWidth: 260

View file

@ -3,11 +3,12 @@ import Quickshell
import "." as M
import "../services" as S
import "../applets" as C
import NovaStats as NS
M.BarModule {
id: root
active: S.Modules.disk.enable
spacing: Math.max(1, S.Theme.moduleSpacing - 2)
active: NS.ModulesService.diskEnable
spacing: Math.max(1, NS.ThemeService.moduleSpacing - 2)
tooltip: "Disk: " + _rootPct + "% used"
panelNamespace: "nova-disk"
panelContentWidth: 260
@ -21,7 +22,7 @@ M.BarModule {
property var _mounts: S.SystemStats.diskMounts
property int _rootPct: S.SystemStats.diskRootPct
readonly property int _warnThreshold: S.Modules.disk.warnThreshold ?? 85
readonly property int _warnThreshold: NS.ModulesService.diskWarnThreshold ?? 85
readonly property bool _anyWarn: {
for (const m of _mounts)
if (m.pct >= _warnThreshold)
@ -31,13 +32,13 @@ M.BarModule {
M.BarIcon {
icon: "\uF0C9"
color: root._anyWarn ? S.Theme.base09 : root.accentColor
color: root._anyWarn ? NS.ThemeService.base09 : root.accentColor
anchors.verticalCenter: parent.verticalCenter
}
M.BarLabel {
label: root._rootPct + "%"
minText: "100%"
color: root._anyWarn ? S.Theme.base09 : root.accentColor
color: root._anyWarn ? NS.ThemeService.base09 : root.accentColor
anchors.verticalCenter: parent.verticalCenter
}
}

View file

@ -1,10 +1,11 @@
import QtQuick
import "." as M
import "../services" as S
import NovaStats as NS
M.BarModule {
id: root
active: S.Modules.dock.enable && S.DockState.mode !== "pinned"
active: NS.ModulesService.dockEnable && S.DockState.mode !== "pinned"
tooltip: S.DockState.open ? "Close dock" : "Open dock"
onTapped: S.DockState.toggle()

View file

@ -3,11 +3,12 @@ import Quickshell
import "." as M
import "../services" as S
import "../applets" as C
import NovaStats as NS
M.BarModule {
id: root
spacing: Math.max(1, S.Theme.moduleSpacing - 2)
active: S.Modules.gpu.enable && S.SystemStats.gpuAvailable
spacing: Math.max(1, NS.ThemeService.moduleSpacing - 2)
active: NS.ModulesService.gpuEnable && S.SystemStats.gpuAvailable
tooltip: "GPU: " + S.SystemStats.gpuUsage + "%"
panelNamespace: "nova-gpu"
panelContentWidth: 240

View file

@ -3,6 +3,7 @@ import Quickshell
import Quickshell.Wayland
import "." as M
import "../services" as S
import NovaStats as NS
// Bar panel - fullscreen transparent window so content can resize freely
// without triggering Wayland surface resizes.
@ -83,7 +84,7 @@ PanelWindow {
}
_winVisible = true;
hideAnim.stop();
if (S.Theme.reducedMotion) {
if (S.ThemeUtil.reducedMotion) {
panelContainer.opacity = 1;
panelContainer.y = 0;
} else {
@ -97,7 +98,7 @@ PanelWindow {
if (!_winVisible)
return;
showAnim.stop();
if (S.Theme.reducedMotion) {
if (S.ThemeUtil.reducedMotion) {
_winVisible = false;
dismissed();
} else {
@ -185,7 +186,7 @@ PanelWindow {
y: panelContainer.y
width: panelContainer.width
height: panelContainer.height
opacity: panelContainer.opacity * Math.max(S.Theme.barOpacity, 0.85)
opacity: panelContainer.opacity * Math.max(NS.ThemeService.barOpacity, 0.85)
accentColor: root.accentColor
}
@ -228,7 +229,7 @@ PanelWindow {
color: "transparent"
border.color: root.accentColor
border.width: 1
radius: S.Theme.radius
radius: NS.ThemeService.radius
opacity: panelContainer.opacity
}
}

View file

@ -2,10 +2,11 @@ import QtQuick
import Quickshell
import "." as M
import "../services" as S
import NovaStats as NS
M.BarModule {
id: root
active: S.Modules.idleInhibitor.enable
active: NS.ModulesService.idleInhibitorEnable
tooltip: {
const parts = ["Idle inhibition: " + (S.IdleInhibitService.active ? "active" : "inactive")];
if (S.IdleInhibitService.inhibitors)
@ -23,7 +24,7 @@ M.BarModule {
}
M.BarIcon {
color: S.IdleInhibitService.active ? S.Theme.base09 : root.accentColor
color: S.IdleInhibitService.active ? NS.ThemeService.base09 : root.accentColor
icon: S.IdleInhibitService.active ? "\uF06E" : "\uF070"
anchors.verticalCenter: parent.verticalCenter
}

View file

@ -5,10 +5,11 @@ import Quickshell
import "." as M
import "../services" as S
import "../applets" as C
import NovaStats as NS
M.BarModule {
id: root
active: S.Modules.machinectl.enable
active: NS.ModulesService.machinectlEnable
tooltip: {
const n = S.MachinectlService.machines.length;
return n === 0 ? "no containers" : n + " container" + (n === 1 ? "" : "s");
@ -30,7 +31,7 @@ M.BarModule {
}
}
readonly property color _stateColor: S.MachinectlService.anyUnhealthy ? S.Theme.base0A : root.accentColor
readonly property color _stateColor: S.MachinectlService.anyUnhealthy ? NS.ThemeService.base0A : root.accentColor
M.BarIcon {
icon: ""

View file

@ -3,11 +3,12 @@ import Quickshell
import "." as M
import "../services" as S
import "../applets" as C
import NovaStats as NS
M.BarModule {
id: root
active: S.Modules.memory.enable
spacing: Math.max(1, S.Theme.moduleSpacing - 2)
active: NS.ModulesService.memoryEnable
spacing: Math.max(1, NS.ThemeService.moduleSpacing - 2)
tooltip: "Memory: " + usedGb.toFixed(1) + " / " + totalGb.toFixed(1) + " GB"
panelNamespace: "nova-memory"
panelContentWidth: 240

View file

@ -5,11 +5,12 @@ import Quickshell.Services.Mpris
import "." as M
import "../services" as S
import "../applets" as C
import NovaStats as NS
M.BarModule {
id: root
spacing: S.Theme.moduleSpacing
active: S.Modules.mpris.enable && S.MprisService.player !== null
spacing: NS.ThemeService.moduleSpacing
active: NS.ModulesService.mprisEnable && S.MprisService.player !== null
tooltip: S.MprisService.player ? (S.MprisService.player.trackTitle || S.MprisService.player.identity || "Media") + (S.MprisService.playing ? " (playing)" : " (paused)") : "Media"
panelNamespace: "nova-mpris"
panelContentWidth: 280

View file

@ -3,11 +3,12 @@ import Quickshell
import "." as M
import "../services" as S
import "../applets" as C
import NovaStats as NS
M.BarModule {
id: root
active: S.Modules.network.enable
spacing: S.Theme.moduleSpacing
active: NS.ModulesService.networkEnable
spacing: NS.ThemeService.moduleSpacing
tooltip: {
if (state === "wifi")
return "Wi-Fi: " + S.NetworkService.essid;
@ -45,13 +46,13 @@ M.BarModule {
return "\uDB85\uDE16";
return "\uDB82\uDCFD";
}
color: root.state === "disconnected" ? S.Theme.base08 : root.accentColor
color: root.state === "disconnected" ? NS.ThemeService.base08 : root.accentColor
anchors.verticalCenter: parent.verticalCenter
}
M.BarLabel {
visible: root.state === "wifi"
label: S.NetworkService.essid
color: root.state === "disconnected" ? S.Theme.base08 : root.accentColor
color: root.state === "disconnected" ? NS.ThemeService.base08 : root.accentColor
anchors.verticalCenter: parent.verticalCenter
}
}

Some files were not shown because too many files have changed in this diff Show more