Compare commits

..
20 changed files with 221 additions and 220 deletions

View file

@ -1,5 +1,5 @@
import QtQuick
import "../services" as S
import "../services" as M
Column {
id: root
@ -14,8 +14,8 @@ Column {
function _loadColor(pct) {
const t = Math.max(0, Math.min(100, pct)) / 100;
const a = t < 0.5 ? S.Theme.base0B : S.Theme.base0A;
const b = t < 0.5 ? S.Theme.base0A : S.Theme.base08;
const a = t < 0.5 ? M.Theme.base0B : M.Theme.base0A;
const b = t < 0.5 ? M.Theme.base0A : M.Theme.base08;
const u = t < 0.5 ? t * 2 : (t - 0.5) * 2;
return Qt.rgba(a.r + (b.r - a.r) * u, a.g + (b.g - a.g) * u, a.b + (b.b - a.b) * u, 1);
}
@ -54,7 +54,7 @@ Column {
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - 16
height: 1
color: S.Theme.base03
color: M.Theme.base03
}
// Row content pinned to bottom of delegate
@ -69,9 +69,9 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: index
color: S.Theme.base04
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: M.Theme.base04
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
width: 16
}
@ -86,7 +86,7 @@ Column {
Rectangle {
anchors.fill: parent
color: S.Theme.base02
color: M.Theme.base02
radius: 2
}
@ -147,9 +147,9 @@ Column {
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: parent.parent._f.toFixed(2)
color: parent.parent._throttled ? S.Theme.base08 : S.Theme.base04
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: parent.parent._throttled ? M.Theme.base08 : M.Theme.base04
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
width: 34
horizontalAlignment: Text.AlignRight
}
@ -162,7 +162,7 @@ Column {
width: root.width - 16
height: 1
anchors.horizontalCenter: parent.horizontalCenter
color: S.Theme.base03
color: M.Theme.base03
}
Item {
@ -174,9 +174,9 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: "PROCESS"
color: S.Theme.base03
font.pixelSize: S.Theme.fontSize - 3
font.family: S.Theme.fontFamily
color: M.Theme.base03
font.pixelSize: M.Theme.fontSize - 3
font.family: M.Theme.fontFamily
font.letterSpacing: 1
}
@ -185,9 +185,9 @@ Column {
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: "CPU"
color: S.Theme.base03
font.pixelSize: S.Theme.fontSize - 3
font.family: S.Theme.fontFamily
color: M.Theme.base03
font.pixelSize: M.Theme.fontSize - 3
font.family: M.Theme.fontFamily
font.letterSpacing: 1
}
}
@ -206,9 +206,9 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: modelData.cmd
color: S.Theme.base05
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: M.Theme.base05
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
elide: Text.ElideRight
width: parent.width - 80
}
@ -219,8 +219,8 @@ Column {
anchors.verticalCenter: parent.verticalCenter
text: modelData.cpu.toFixed(1) + "%"
color: root._loadColor(modelData.cpu)
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
width: 36
horizontalAlignment: Text.AlignRight
}

View file

@ -1,5 +1,5 @@
import QtQuick
import "../services" as S
import "../services" as M
Column {
id: root
@ -19,8 +19,8 @@ Column {
function _barColor(pct) {
const t = Math.max(0, Math.min(100, pct)) / 100;
const a = t < 0.5 ? S.Theme.base0B : S.Theme.base0A;
const b = t < 0.5 ? S.Theme.base0A : S.Theme.base08;
const a = t < 0.5 ? M.Theme.base0B : M.Theme.base0A;
const b = t < 0.5 ? M.Theme.base0A : M.Theme.base08;
const u = t < 0.5 ? t * 2 : (t - 0.5) * 2;
return Qt.rgba(a.r + (b.r - a.r) * u, a.g + (b.g - a.g) * u, a.b + (b.b - a.b) * u, 1);
}
@ -39,9 +39,9 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: modelData.target
color: S.Theme.base05
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: M.Theme.base05
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
elide: Text.ElideRight
width: 72
}
@ -57,7 +57,7 @@ Column {
Rectangle {
anchors.fill: parent
color: S.Theme.base02
color: M.Theme.base02
radius: 2
}
@ -80,9 +80,9 @@ Column {
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: root._fmt(modelData.usedBytes) + "/" + root._fmt(modelData.totalBytes)
color: S.Theme.base04
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: M.Theme.base04
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
width: 72
horizontalAlignment: Text.AlignRight
}

View file

@ -1,16 +1,16 @@
import QtQuick
import Quickshell
import "../services" as S
import "../services" as M
Item {
id: root
property bool running: false
property bool reducedMotion: S.Theme.reducedMotion
property bool reducedMotion: M.Theme.reducedMotion
Rectangle {
anchors.fill: parent
color: S.Theme.base01
color: M.Theme.base01
}
ShaderEffect {
@ -24,9 +24,9 @@ Item {
property real uGlitch: 0
property real uGlitchSeed: 0.0
property vector4d uResolution: Qt.vector4d(width, height, 0, 0)
property color uC0: S.Theme.base0C
property color uC1: S.Theme.base0E
property color uC2: S.Theme.base09
property color uC0: M.Theme.base0C
property color uC1: M.Theme.base0E
property color uC2: M.Theme.base09
Connections {
target: root

View file

@ -1,5 +1,5 @@
import QtQuick
import "../services" as S
import "../services" as M
Column {
id: root
@ -35,7 +35,7 @@ Column {
Rectangle {
anchors.fill: parent
color: S.Theme.base02
color: M.Theme.base02
radius: 3
}
@ -43,7 +43,7 @@ Column {
Rectangle {
width: parent.width * Math.min(1, (root.usedGb + root.cachedGb) / Math.max(root.totalGb, 0.001))
height: parent.height
color: S.Theme.base0D
color: M.Theme.base0D
opacity: 0.4
radius: 3
Behavior on width {
@ -79,7 +79,7 @@ Column {
anchors.rightMargin: 12
height: 18
property var _hist: S.SystemStats.memHistory
property var _hist: M.SystemStats.memHistory
property color _col: root.accentColor
on_HistChanged: if (root.active)
@ -119,9 +119,9 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: "Used"
color: S.Theme.base04
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: M.Theme.base04
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
}
Text {
@ -129,9 +129,9 @@ Column {
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: root._fmt(root.usedGb)
color: S.Theme.base05
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: M.Theme.base05
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
}
}
@ -144,9 +144,9 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: "Cached"
color: S.Theme.base04
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: M.Theme.base04
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
}
Text {
@ -154,9 +154,9 @@ Column {
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: root._fmt(root.cachedGb)
color: S.Theme.base05
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: M.Theme.base05
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
}
}
@ -169,9 +169,9 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: "Available"
color: S.Theme.base04
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: M.Theme.base04
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
}
Text {
@ -179,9 +179,9 @@ Column {
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: root._fmt(root.availGb)
color: S.Theme.base05
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: M.Theme.base05
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
}
}
@ -194,9 +194,9 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: "Total"
color: S.Theme.base04
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: M.Theme.base04
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
}
Text {
@ -204,9 +204,9 @@ Column {
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: root._fmt(root.totalGb)
color: S.Theme.base05
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: M.Theme.base05
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
}
}
@ -215,7 +215,7 @@ Column {
width: root.width - 16
height: 1
anchors.horizontalCenter: parent.horizontalCenter
color: S.Theme.base03
color: M.Theme.base03
}
Item {
@ -227,9 +227,9 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: "PROCESS"
color: S.Theme.base03
font.pixelSize: S.Theme.fontSize - 3
font.family: S.Theme.fontFamily
color: M.Theme.base03
font.pixelSize: M.Theme.fontSize - 3
font.family: M.Theme.fontFamily
font.letterSpacing: 1
}
@ -238,9 +238,9 @@ Column {
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: "MEM"
color: S.Theme.base03
font.pixelSize: S.Theme.fontSize - 3
font.family: S.Theme.fontFamily
color: M.Theme.base03
font.pixelSize: M.Theme.fontSize - 3
font.family: M.Theme.fontFamily
font.letterSpacing: 1
}
}
@ -259,9 +259,9 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: modelData.cmd
color: S.Theme.base05
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: M.Theme.base05
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
elide: Text.ElideRight
width: parent.width - 80
}
@ -271,9 +271,9 @@ Column {
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: modelData.mem.toFixed(1) + "%"
color: S.Theme.base04
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: M.Theme.base04
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
width: 36
horizontalAlignment: Text.AlignRight
}

View file

@ -1,6 +1,6 @@
import QtQuick
import Quickshell.Services.Mpris
import "../services" as S
import "../services" as M
Column {
id: root
@ -23,7 +23,7 @@ Column {
Rectangle {
anchors.fill: parent
color: S.Theme.base02
color: M.Theme.base02
}
// Outgoing art - snaps to current opacity, then fades out
@ -137,7 +137,7 @@ Column {
}
GradientStop {
position: 1
color: S.Theme.base01
color: M.Theme.base01
}
}
}
@ -145,9 +145,9 @@ Column {
Text {
anchors.centerIn: parent
text: "\uF001"
color: S.Theme.base04
color: M.Theme.base04
font.pixelSize: 28
font.family: S.Theme.iconFontFamily
font.family: M.Theme.iconFontFamily
visible: !_artImg._hasArt
}
}
@ -169,9 +169,9 @@ Column {
Text {
width: parent.width
text: root.player?.trackTitle || "No track"
color: S.Theme.base05
font.pixelSize: S.Theme.fontSize + 1
font.family: S.Theme.fontFamily
color: M.Theme.base05
font.pixelSize: M.Theme.fontSize + 1
font.family: M.Theme.fontFamily
font.bold: true
elide: Text.ElideRight
}
@ -185,9 +185,9 @@ Column {
const artist = Array.isArray(p.trackArtists) ? p.trackArtists.join(", ") : (p.trackArtists || "");
return [artist, p.trackAlbum].filter(s => s).join(" \u2014 ");
}
color: S.Theme.base04
font.pixelSize: S.Theme.fontSize - 1
font.family: S.Theme.fontFamily
color: M.Theme.base04
font.pixelSize: M.Theme.fontSize - 1
font.family: M.Theme.fontFamily
elide: Text.ElideRight
visible: text !== ""
}
@ -214,18 +214,18 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: parent._fmtTime(parent.pos)
color: S.Theme.base04
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: M.Theme.base04
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
}
Text {
anchors.right: parent.right
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: parent._fmtTime(parent.dur)
color: S.Theme.base04
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: M.Theme.base04
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
}
Item {
@ -236,7 +236,7 @@ Column {
Rectangle {
anchors.fill: parent
color: S.Theme.base02
color: M.Theme.base02
radius: 2
}
Rectangle {
@ -259,9 +259,9 @@ Column {
Text {
text: "\uF048"
color: root.player?.canGoPrevious ? S.Theme.base05 : S.Theme.base03
font.pixelSize: S.Theme.fontSize + 4
font.family: S.Theme.iconFontFamily
color: root.player?.canGoPrevious ? M.Theme.base05 : M.Theme.base03
font.pixelSize: M.Theme.fontSize + 4
font.family: M.Theme.iconFontFamily
anchors.verticalCenter: parent.verticalCenter
TapHandler {
cursorShape: Qt.PointingHandCursor
@ -273,8 +273,8 @@ Column {
Text {
text: root.playing ? "\uF04C" : "\uF04B"
color: root.accentColor
font.pixelSize: S.Theme.fontSize + 8
font.family: S.Theme.iconFontFamily
font.pixelSize: M.Theme.fontSize + 8
font.family: M.Theme.iconFontFamily
anchors.verticalCenter: parent.verticalCenter
TapHandler {
cursorShape: Qt.PointingHandCursor
@ -284,9 +284,9 @@ Column {
Text {
text: "\uF051"
color: root.player?.canGoNext ? S.Theme.base05 : S.Theme.base03
font.pixelSize: S.Theme.fontSize + 4
font.family: S.Theme.iconFontFamily
color: root.player?.canGoNext ? M.Theme.base05 : M.Theme.base03
font.pixelSize: M.Theme.fontSize + 4
font.family: M.Theme.iconFontFamily
anchors.verticalCenter: parent.verticalCenter
TapHandler {
cursorShape: Qt.PointingHandCursor
@ -328,8 +328,8 @@ Column {
width: _pLabel.implicitWidth + 12
height: 18
radius: 9
color: _active ? S.Theme.base02 : (pHover.hovered ? S.Theme.base02 : "transparent")
border.color: _active ? root.accentColor : S.Theme.base03
color: _active ? M.Theme.base02 : (pHover.hovered ? M.Theme.base02 : "transparent")
border.color: _active ? root.accentColor : M.Theme.base03
border.width: _active ? 1 : 0
anchors.verticalCenter: parent.verticalCenter
@ -337,9 +337,9 @@ Column {
id: _pLabel
anchors.centerIn: parent
text: modelData.identity ?? "Player"
color: _active ? root.accentColor : S.Theme.base04
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: _active ? root.accentColor : M.Theme.base04
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
font.bold: _active
}

View file

@ -1,5 +1,5 @@
import QtQuick
import "../services" as S
import "../services" as M
Column {
id: root
@ -14,7 +14,7 @@ Column {
property bool active: true
property string deviceFilter: ""
property color stateColor: temp > hot ? S.Theme.base08 : temp > warm ? S.Theme.base0A : root.accentColor
property color stateColor: temp > hot ? M.Theme.base08 : temp > warm ? M.Theme.base0A : root.accentColor
Behavior on stateColor {
ColorAnimation {
duration: 300
@ -23,8 +23,8 @@ Column {
function _tempColor(celsius) {
const t = Math.max(0, Math.min(100, celsius)) / 100;
const a = t < 0.5 ? S.Theme.base0B : S.Theme.base0A;
const b = t < 0.5 ? S.Theme.base0A : S.Theme.base08;
const a = t < 0.5 ? M.Theme.base0B : M.Theme.base0A;
const b = t < 0.5 ? M.Theme.base0A : M.Theme.base08;
const u = t < 0.5 ? t * 2 : (t - 0.5) * 2;
return Qt.rgba(a.r + (b.r - a.r) * u, a.g + (b.g - a.g) * u, a.b + (b.b - a.b) * u, 1);
}
@ -40,8 +40,8 @@ Column {
anchors.verticalCenter: parent.verticalCenter
text: root.temp + "\u00B0C"
color: root.stateColor
font.pixelSize: S.Theme.fontSize
font.family: S.Theme.fontFamily
font.pixelSize: M.Theme.fontSize
font.family: M.Theme.fontFamily
font.bold: true
width: _tempSizer.implicitWidth
horizontalAlignment: Text.AlignRight
@ -71,7 +71,7 @@ Column {
Rectangle {
anchors.fill: parent
color: S.Theme.base02
color: M.Theme.base02
radius: 3
}
@ -95,7 +95,7 @@ Column {
width: 1
height: parent.height + 4
anchors.verticalCenter: parent.verticalCenter
color: S.Theme.base0A
color: M.Theme.base0A
opacity: 0.6
}
@ -105,7 +105,7 @@ Column {
width: 1
height: parent.height + 4
anchors.verticalCenter: parent.verticalCenter
color: S.Theme.base08
color: M.Theme.base08
opacity: 0.6
}
}
@ -149,7 +149,7 @@ Column {
// Warm threshold line
const warmY = height - height * (root.warm / 100);
ctx.strokeStyle = S.Theme.base0A.toString();
ctx.strokeStyle = M.Theme.base0A.toString();
ctx.globalAlpha = 0.3;
ctx.lineWidth = 1;
ctx.setLineDash([3, 3]);
@ -160,7 +160,7 @@ Column {
// Hot threshold line
const hotY = height - height * (root.hot / 100);
ctx.strokeStyle = S.Theme.base08.toString();
ctx.strokeStyle = M.Theme.base08.toString();
ctx.beginPath();
ctx.moveTo(0, hotY);
ctx.lineTo(width, hotY);
@ -173,7 +173,7 @@ Column {
const offset = maxSamples - d.length;
for (let i = 0; i < d.length; i++) {
const barH = Math.max(1, height * d[i] / 100);
const barColor = d[i] > root.hot ? S.Theme.base08 : d[i] > root.warm ? S.Theme.base0A : _col;
const barColor = d[i] > root.hot ? M.Theme.base08 : d[i] > root.warm ? M.Theme.base0A : _col;
ctx.fillStyle = barColor.toString();
ctx.fillRect((offset + i) * bw, height - barH, Math.max(1, bw - 0.5), barH);
}
@ -190,9 +190,9 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: "warm " + root.warm + "\u00B0 hot " + root.hot + "\u00B0"
color: S.Theme.base03
font.pixelSize: S.Theme.fontSize - 3
font.family: S.Theme.fontFamily
color: M.Theme.base03
font.pixelSize: M.Theme.fontSize - 3
font.family: M.Theme.fontFamily
font.letterSpacing: 0.5
}
@ -201,9 +201,9 @@ Column {
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: "10 min"
color: S.Theme.base03
font.pixelSize: S.Theme.fontSize - 3
font.family: S.Theme.fontFamily
color: M.Theme.base03
font.pixelSize: M.Theme.fontSize - 3
font.family: M.Theme.fontFamily
}
}
@ -212,7 +212,7 @@ Column {
width: root.width - 16
height: 1
anchors.horizontalCenter: parent.horizontalCenter
color: S.Theme.base03
color: M.Theme.base03
visible: root.devices.length > 0
}
@ -238,9 +238,9 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: modelData.name
color: _isActive ? root.accentColor : S.Theme.base04
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
color: _isActive ? root.accentColor : M.Theme.base04
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
elide: Text.ElideRight
width: parent.width - 80
}
@ -251,8 +251,8 @@ Column {
anchors.verticalCenter: parent.verticalCenter
text: modelData.celsius + "\u00B0C"
color: root._tempColor(modelData.celsius)
font.pixelSize: S.Theme.fontSize - 2
font.family: S.Theme.fontFamily
font.pixelSize: M.Theme.fontSize - 2
font.family: M.Theme.fontFamily
font.bold: _isActive
}
}

View file

@ -1,6 +1,6 @@
import QtQuick
import Quickshell.Services.Pipewire
import "../services" as S
import "../services" as M
Column {
id: root
@ -13,7 +13,7 @@ Column {
property real volume: sink?.audio?.volume ?? 0
property bool muted: sink?.audio?.muted ?? false
readonly property string volumeIcon: muted ? "\uF026" : (volume > 0.5 ? "\uF028" : (volume > 0 ? "\uF027" : "\uF026"))
readonly property color volumeColor: muted ? S.Theme.base04 : root.accentColor
readonly property color volumeColor: muted ? M.Theme.base04 : root.accentColor
// Slider row
Item {
@ -27,8 +27,8 @@ Column {
anchors.verticalCenter: parent.verticalCenter
text: root.volumeIcon
color: root.volumeColor
font.pixelSize: S.Theme.fontSize + 2
font.family: S.Theme.iconFontFamily
font.pixelSize: M.Theme.fontSize + 2
font.family: M.Theme.iconFontFamily
TapHandler {
cursorShape: Qt.PointingHandCursor
@ -48,7 +48,7 @@ Column {
Rectangle {
anchors.fill: parent
color: S.Theme.base02
color: M.Theme.base02
radius: 3
}
Rectangle {
@ -86,9 +86,9 @@ Column {
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: Math.round(root.volume * 100) + "%"
color: root.muted ? S.Theme.base04 : S.Theme.base05
font.pixelSize: S.Theme.fontSize
font.family: S.Theme.fontFamily
color: root.muted ? M.Theme.base04 : M.Theme.base05
font.pixelSize: M.Theme.fontSize
font.family: M.Theme.fontFamily
width: 30
}
}
@ -107,7 +107,7 @@ Column {
width: parent.width - 16
height: 1
anchors.horizontalCenter: parent.horizontalCenter
color: S.Theme.base03
color: M.Theme.base03
}
Text {
@ -117,8 +117,8 @@ Column {
leftPadding: 12
text: "Output Devices"
color: root.accentColor
font.pixelSize: S.Theme.fontSize - 1
font.family: S.Theme.fontFamily
font.pixelSize: M.Theme.fontSize - 1
font.family: M.Theme.fontFamily
}
Repeater {
@ -136,8 +136,8 @@ Column {
anchors.fill: parent
anchors.leftMargin: 4
anchors.rightMargin: 4
color: deviceHover.hovered ? S.Theme.base02 : "transparent"
radius: S.Theme.radius
color: deviceHover.hovered ? M.Theme.base02 : "transparent"
radius: M.Theme.radius
}
Text {
@ -147,9 +147,9 @@ Column {
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: modelData.description || modelData.name || "Unknown"
color: parent._active ? root.accentColor : S.Theme.base05
font.pixelSize: S.Theme.fontSize
font.family: S.Theme.fontFamily
color: parent._active ? root.accentColor : M.Theme.base05
font.pixelSize: M.Theme.fontSize
font.family: M.Theme.fontFamily
font.bold: parent._active
elide: Text.ElideRight
}
@ -172,7 +172,7 @@ Column {
width: parent.width - 16
height: visible ? 1 : 0
anchors.horizontalCenter: parent.horizontalCenter
color: S.Theme.base03
color: M.Theme.base03
}
Text {
@ -183,8 +183,8 @@ Column {
leftPadding: 12
text: "Applications"
color: root.accentColor
font.pixelSize: S.Theme.fontSize - 1
font.family: S.Theme.fontFamily
font.pixelSize: M.Theme.fontSize - 1
font.family: M.Theme.fontFamily
}
Repeater {
@ -207,9 +207,9 @@ Column {
anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: streamEntry._muted ? "\uF026" : "\uF028"
color: streamEntry._muted ? S.Theme.base04 : S.Theme.base05
font.pixelSize: S.Theme.fontSize
font.family: S.Theme.iconFontFamily
color: streamEntry._muted ? M.Theme.base04 : M.Theme.base05
font.pixelSize: M.Theme.fontSize
font.family: M.Theme.iconFontFamily
TapHandler {
cursorShape: Qt.PointingHandCursor
@ -224,9 +224,9 @@ Column {
anchors.leftMargin: 6
anchors.verticalCenter: parent.verticalCenter
text: streamEntry._appName
color: S.Theme.base05
font.pixelSize: S.Theme.fontSize - 1
font.family: S.Theme.fontFamily
color: M.Theme.base05
font.pixelSize: M.Theme.fontSize - 1
font.family: M.Theme.fontFamily
elide: Text.ElideRight
width: 70
}
@ -242,13 +242,13 @@ Column {
Rectangle {
anchors.fill: parent
color: S.Theme.base02
color: M.Theme.base02
radius: 2
}
Rectangle {
width: parent.width * Math.min(1, Math.max(0, streamEntry._vol))
height: parent.height
color: streamEntry._muted ? S.Theme.base04 : root.accentColor
color: streamEntry._muted ? M.Theme.base04 : root.accentColor
radius: 2
}
@ -275,9 +275,9 @@ Column {
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: Math.round(streamEntry._vol * 100) + "%"
color: streamEntry._muted ? S.Theme.base04 : S.Theme.base05
font.pixelSize: S.Theme.fontSize - 1
font.family: S.Theme.fontFamily
color: streamEntry._muted ? M.Theme.base04 : M.Theme.base05
font.pixelSize: M.Theme.fontSize - 1
font.family: M.Theme.fontFamily
width: 28
}
}

View file

@ -2,12 +2,12 @@ import QtQuick
import Quickshell
import Quickshell.Io
import Quickshell.Wayland
import "../services" as S
import "../services" as M
Scope {
id: root
readonly property bool _enabled: S.Modules.lock.enable
readonly property bool _enabled: M.Modules.lock.enable
property string _sessionPath: ""
WlSessionLock {

View file

@ -1,5 +1,5 @@
import QtQuick
import "../services" as S
import "../services" as M
Item {
id: root
@ -15,18 +15,18 @@ Item {
anchors.fill: parent
color: {
if (root.state === "fail" || root.state === "error")
return Qt.rgba(S.Theme.base08.r, S.Theme.base08.g, S.Theme.base08.b, 0.15);
return Qt.rgba(M.Theme.base08.r, M.Theme.base08.g, M.Theme.base08.b, 0.15);
if (root.state === "busy")
return Qt.rgba(S.Theme.base0D.r, S.Theme.base0D.g, S.Theme.base0D.b, 0.1);
return S.Theme.base02;
return Qt.rgba(M.Theme.base0D.r, M.Theme.base0D.g, M.Theme.base0D.b, 0.1);
return M.Theme.base02;
}
radius: height / 2
border.color: {
if (root.state === "fail" || root.state === "error")
return S.Theme.base08;
return M.Theme.base08;
if (root.state === "busy")
return S.Theme.base0D;
return S.Theme.base03;
return M.Theme.base0D;
return M.Theme.base03;
}
border.width: 1
@ -52,9 +52,9 @@ Item {
return "Too many attempts";
return "Enter password";
}
color: S.Theme.base04
font.pixelSize: S.Theme.fontSize
font.family: S.Theme.fontFamily
color: M.Theme.base04
font.pixelSize: M.Theme.fontSize
font.family: M.Theme.fontFamily
opacity: root.buffer.length === 0 ? 1 : 0
Behavior on opacity {
@ -78,7 +78,7 @@ Item {
width: 10
height: 10
radius: 5
color: S.Theme.base05
color: M.Theme.base05
scale: 0
opacity: 0

View file

@ -4,7 +4,7 @@ import Quickshell
import Quickshell.Wayland
import Quickshell.Services.Mpris
import Quickshell.Services.Pipewire
import "../services" as S
import "../services" as M
import "../applets" as C
WlSessionLockSurface {
@ -13,7 +13,7 @@ WlSessionLockSurface {
required property WlSessionLock lock
required property LockAuth auth
color: S.Theme.base00
color: M.Theme.base00
property real _bgOpacity: 0
NumberAnimation on _bgOpacity {
@ -27,7 +27,7 @@ WlSessionLockSurface {
anchors.fill: parent
captureSource: root.screen
opacity: root._bgOpacity
visible: S.Modules.lock.screenshot ?? true
visible: M.Modules.lock.screenshot ?? true
layer.enabled: true
layer.effect: MultiEffect {
@ -41,7 +41,7 @@ WlSessionLockSurface {
// Dim overlay
Rectangle {
anchors.fill: parent
color: Qt.rgba(S.Theme.base00.r, S.Theme.base00.g, S.Theme.base00.b, 0.4)
color: Qt.rgba(M.Theme.base00.r, M.Theme.base00.g, M.Theme.base00.b, 0.4)
opacity: root._bgOpacity
}
@ -112,9 +112,9 @@ WlSessionLockSurface {
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatTime(new Date(), "HH:mm")
color: S.Theme.base05
color: M.Theme.base05
font.pixelSize: 72
font.family: S.Theme.fontFamily
font.family: M.Theme.fontFamily
font.bold: true
Timer {
@ -129,9 +129,9 @@ WlSessionLockSurface {
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatDate(new Date(), "dddd, d MMMM")
color: S.Theme.base04
font.pixelSize: S.Theme.fontSize + 2
font.family: S.Theme.fontFamily
color: M.Theme.base04
font.pixelSize: M.Theme.fontSize + 2
font.family: M.Theme.fontFamily
Timer {
interval: 60000
@ -160,9 +160,9 @@ WlSessionLockSurface {
id: _errorText
anchors.horizontalCenter: parent.horizontalCenter
text: root.auth.message
color: S.Theme.base08
font.pixelSize: S.Theme.fontSize - 1
font.family: S.Theme.fontFamily
color: M.Theme.base08
font.pixelSize: M.Theme.fontSize - 1
font.family: M.Theme.fontFamily
opacity: root.auth.message ? 1 : 0
height: root.auth.message ? implicitHeight : 0
@ -192,11 +192,11 @@ WlSessionLockSurface {
anchors.horizontalCenter: parent.horizontalCenter
width: 280
height: _mprisContent.implicitHeight + 16
radius: S.Theme.radius + 2
color: Qt.rgba(S.Theme.base01.r, S.Theme.base01.g, S.Theme.base01.b, 0.7)
border.color: Qt.rgba(S.Theme.base03.r, S.Theme.base03.g, S.Theme.base03.b, 0.3)
radius: M.Theme.radius + 2
color: Qt.rgba(M.Theme.base01.r, M.Theme.base01.g, M.Theme.base01.b, 0.7)
border.color: Qt.rgba(M.Theme.base03.r, M.Theme.base03.g, M.Theme.base03.b, 0.3)
border.width: 1
visible: (S.Modules.lock.mpris ?? true) && _mprisPlayer !== null
visible: (M.Modules.lock.mpris ?? true) && _mprisPlayer !== null
readonly property var _mprisPlayers: (Mpris.players.values ?? []).filter(p => p.trackTitle || p.playbackState === MprisPlaybackState.Playing || p.playbackState === MprisPlaybackState.Paused)
readonly property var _mprisPlayer: _mprisPlayers[0] ?? null
@ -211,7 +211,7 @@ WlSessionLockSurface {
player: _mprisCard._mprisPlayer
players: _mprisCard._mprisPlayers
playing: _mprisCard._playing
accentColor: S.Theme.base0D
accentColor: M.Theme.base0D
cachedArt: _mprisCard._mprisPlayer?.trackArtUrl ?? ""
}
}
@ -222,11 +222,11 @@ WlSessionLockSurface {
anchors.horizontalCenter: parent.horizontalCenter
width: 280
height: _volumeContent.implicitHeight + 16
radius: S.Theme.radius + 2
color: Qt.rgba(S.Theme.base01.r, S.Theme.base01.g, S.Theme.base01.b, 0.7)
border.color: Qt.rgba(S.Theme.base03.r, S.Theme.base03.g, S.Theme.base03.b, 0.3)
radius: M.Theme.radius + 2
color: Qt.rgba(M.Theme.base01.r, M.Theme.base01.g, M.Theme.base01.b, 0.7)
border.color: Qt.rgba(M.Theme.base03.r, M.Theme.base03.g, M.Theme.base03.b, 0.3)
border.width: 1
visible: (S.Modules.lock.volume ?? true) && Pipewire.defaultAudioSink !== null
visible: (M.Modules.lock.volume ?? true) && Pipewire.defaultAudioSink !== null
PwObjectTracker {
objects: [Pipewire.defaultAudioSink]
@ -241,7 +241,7 @@ WlSessionLockSurface {
sink: Pipewire.defaultAudioSink
sinkList: []
streamList: []
accentColor: S.Theme.base0E
accentColor: M.Theme.base0E
}
}
}
@ -354,8 +354,8 @@ WlSessionLockSurface {
// so the bar's ScreenCorners aren't visible. Draw our own.
component LockCorner: Canvas {
property int corner: 0
readonly property int _r: S.Theme.screenRadius
visible: _r > 0 && S.Modules.screenCorners.enable
readonly property int _r: M.Theme.screenRadius
visible: _r > 0 && M.Modules.screenCorners.enable
width: _r
height: _r
z: 999

View file

@ -145,7 +145,7 @@ PanelWindow {
id: _windowTitleGroup
Layout.minimumWidth: 0
clip: true
visible: S.Modules.windowTitle.enable && S.NiriIpc.focusedTitle !== ""
visible: S.Modules.windowTitle.enable && M.NiriIpc.focusedTitle !== ""
M.WindowTitleModule {
id: _windowTitle
readonly property real _maxWidth: Math.max(0, centerSection.x - _windowTitleGroup.x - 2 * S.Theme.groupPadding - S.Theme.groupSpacing)

View file

@ -10,7 +10,7 @@ PanelWindow {
required property var screen
visible: M.NotifService.popups.length > 0 && !S.NiriIpc.overviewOpen
visible: M.NotifService.popups.length > 0 && !M.NiriIpc.overviewOpen
color: "transparent"
WlrLayershell.layer: WlrLayer.Overlay

View file

@ -24,6 +24,6 @@ PanelWindow {
C.HexWaveBackground {
anchors.fill: parent
running: S.NiriIpc.overviewOpen
running: M.NiriIpc.overviewOpen
}
}

View file

@ -4,16 +4,16 @@ import "../services" as S
M.BarIcon {
id: root
tooltip: "Power profile: " + (S.PowerProfileService.profile || "unknown")
tooltip: "Power profile: " + (M.PowerProfileService.profile || "unknown")
color: S.PowerProfileService.profile === "performance" ? S.Theme.base09 : S.PowerProfileService.profile === "power-saver" ? S.Theme.base0B : root.accentColor
color: M.PowerProfileService.profile === "performance" ? S.Theme.base09 : M.PowerProfileService.profile === "power-saver" ? S.Theme.base0B : root.accentColor
icon: {
if (S.PowerProfileService.profile === "performance")
if (M.PowerProfileService.profile === "performance")
return "\uF0E7";
if (S.PowerProfileService.profile === "power-saver")
if (M.PowerProfileService.profile === "power-saver")
return "\uF06C";
if (S.PowerProfileService.profile === "balanced")
if (M.PowerProfileService.profile === "balanced")
return "\uF24E";
return "\uF0E7";
}
@ -23,8 +23,8 @@ M.BarIcon {
cursorShape: Qt.PointingHandCursor
onClicked: {
const cycle = ["performance", "balanced", "power-saver"];
const idx = cycle.indexOf(S.PowerProfileService.profile);
S.PowerProfileService.set(cycle[(idx + 1) % cycle.length]);
const idx = cycle.indexOf(M.PowerProfileService.profile);
M.PowerProfileService.set(cycle[(idx + 1) % cycle.length]);
}
}
}

View file

@ -2,7 +2,8 @@ pragma Singleton
import QtQuick
import Quickshell.Io
import "." as S
import "." as M
import "../services" as S
QtObject {
id: root

View file

@ -8,12 +8,12 @@ import "../services" as S
M.BarSection {
id: root
spacing: S.Theme.moduleSpacing
tooltip: S.NiriIpc.focusedAppId ? S.NiriIpc.focusedAppId + "\n" + S.NiriIpc.focusedTitle : S.NiriIpc.focusedTitle
tooltip: M.NiriIpc.focusedAppId ? M.NiriIpc.focusedAppId + "\n" + M.NiriIpc.focusedTitle : M.NiriIpc.focusedTitle
readonly property string _iconSource: {
if (!S.NiriIpc.focusedAppId)
if (!M.NiriIpc.focusedAppId)
return "";
const entry = DesktopEntries.heuristicLookup(S.NiriIpc.focusedAppId);
const entry = DesktopEntries.heuristicLookup(M.NiriIpc.focusedAppId);
return entry ? Quickshell.iconPath(entry.icon) : "";
}
@ -37,7 +37,7 @@ M.BarSection {
M.BarLabel {
id: _label
label: S.NiriIpc.focusedTitle
label: M.NiriIpc.focusedTitle
color: root.accentColor
elide: Text.ElideRight
anchors.verticalCenter: parent.verticalCenter

View file

@ -36,7 +36,7 @@ Row {
// Live updates via shared NiriIpc singleton
Connections {
target: S.NiriIpc
target: M.NiriIpc
function onWorkspacesChanged(workspaces) {
root._allWorkspaces = workspaces.sort((a, b) => a.idx - b.idx);
}

View file

@ -30,6 +30,8 @@ WeatherModule 1.0 WeatherModule.qml
PowerProfileModule 1.0 PowerProfileModule.qml
IdleInhibitorModule 1.0 IdleInhibitorModule.qml
NotificationsModule 1.0 NotificationsModule.qml
singleton NiriIpc 1.0 NiriIpc.qml
singleton PowerProfileService 1.0 PowerProfileService.qml
ProcessList 1.0 ProcessList.qml
singleton NotifService 1.0 NotifService.qml
NotifItem 1.0 NotifItem.qml

View file

@ -2,5 +2,3 @@ module services
singleton Theme 1.0 Theme.qml
singleton SystemStats 1.0 SystemStats.qml
singleton Modules 1.0 Modules.qml
singleton NiriIpc 1.0 NiriIpc.qml
singleton PowerProfileService 1.0 PowerProfileService.qml