diff --git a/nix/package.nix b/nix/package.nix index 9634978..48677e4 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -25,7 +25,7 @@ stdenvNoCC.mkDerivation { runHook preInstall mkdir -p $out/share/nova-shell - cp -r shell/shell.qml shell/modules shell/services shell/applets shell/lock shell/assets $out/share/nova-shell/ + cp -r shell/shell.qml shell/modules shell/lock shell/assets $out/share/nova-shell/ # Compile fragment shader to Qt RHI format qsb --qt6 \ diff --git a/shell/applets/qmldir b/shell/applets/qmldir deleted file mode 100644 index 78bc931..0000000 --- a/shell/applets/qmldir +++ /dev/null @@ -1,8 +0,0 @@ -module applets -HexWaveBackground 1.0 HexWaveBackground.qml -VolumeApplet 1.0 VolumeApplet.qml -MprisApplet 1.0 MprisApplet.qml -CpuApplet 1.0 CpuApplet.qml -MemoryApplet 1.0 MemoryApplet.qml -TemperatureApplet 1.0 TemperatureApplet.qml -DiskApplet 1.0 DiskApplet.qml diff --git a/shell/lock/Lock.qml b/shell/lock/Lock.qml index 1593850..c061214 100644 --- a/shell/lock/Lock.qml +++ b/shell/lock/Lock.qml @@ -2,7 +2,7 @@ import QtQuick import Quickshell import Quickshell.Io import Quickshell.Wayland -import "../services" as M +import "../modules" as M Scope { id: root diff --git a/shell/lock/LockInput.qml b/shell/lock/LockInput.qml index 3c6b036..4a53a2e 100644 --- a/shell/lock/LockInput.qml +++ b/shell/lock/LockInput.qml @@ -1,5 +1,5 @@ import QtQuick -import "../services" as M +import "../modules" as M Item { id: root diff --git a/shell/lock/LockSurface.qml b/shell/lock/LockSurface.qml index f59a5cd..2798cef 100644 --- a/shell/lock/LockSurface.qml +++ b/shell/lock/LockSurface.qml @@ -4,8 +4,8 @@ import Quickshell import Quickshell.Wayland import Quickshell.Services.Mpris import Quickshell.Services.Pipewire -import "../services" as M -import "../applets" as C +import "../modules" as M +import "../modules/content" as C WlSessionLockSurface { id: root @@ -179,7 +179,7 @@ WlSessionLockSurface { readonly property var _mprisPlayer: _mprisPlayers[0] ?? null readonly property bool _playing: _mprisPlayer?.playbackState === MprisPlaybackState.Playing - C.MprisApplet { + C.MprisContent { id: _mprisContent anchors.left: parent.left anchors.right: parent.right @@ -209,7 +209,7 @@ WlSessionLockSurface { objects: [Pipewire.defaultAudioSink] } - C.VolumeApplet { + C.VolumeContent { id: _volumeContent anchors.left: parent.left anchors.right: parent.right diff --git a/shell/modules/BackgroundOverlay.qml b/shell/modules/BackgroundOverlay.qml index af2726f..08199bd 100644 --- a/shell/modules/BackgroundOverlay.qml +++ b/shell/modules/BackgroundOverlay.qml @@ -3,7 +3,6 @@ import QtQuick.Effects import Quickshell import Quickshell.Wayland import "." as M -import "../services" as S PanelWindow { id: root @@ -45,9 +44,9 @@ PanelWindow { Text { text: Qt.formatDateTime(clock.date, "HH") - color: S.Theme.base0D + color: M.Theme.base0D font.pixelSize: 72 - font.family: S.Theme.fontFamily + font.family: M.Theme.fontFamily font.bold: true anchors.verticalCenter: parent.verticalCenter } @@ -55,22 +54,22 @@ PanelWindow { text: ":" color: colon._colors[colon._colorIdx % colon._colors.length] Behavior on color { - enabled: !S.Theme.reducedMotion + enabled: !M.Theme.reducedMotion ColorAnimation { duration: 500 } } font.pixelSize: 72 - font.family: S.Theme.fontFamily + font.family: M.Theme.fontFamily font.bold: true opacity: colon.opacity anchors.verticalCenter: parent.verticalCenter } Text { text: Qt.formatDateTime(clock.date, "mm") - color: S.Theme.base0E + color: M.Theme.base0E font.pixelSize: 72 - font.family: S.Theme.fontFamily + font.family: M.Theme.fontFamily font.bold: true anchors.verticalCenter: parent.verticalCenter } @@ -80,7 +79,7 @@ PanelWindow { source: glowSource anchors.fill: glowSource shadowEnabled: true - shadowColor: S.Theme.base0D + shadowColor: M.Theme.base0D shadowBlur: 1.0 shadowVerticalOffset: 0 shadowHorizontalOffset: 0 @@ -93,10 +92,10 @@ PanelWindow { Text { text: Qt.formatDateTime(clock.date, "HH") - color: S.Theme.base0D + color: M.Theme.base0D opacity: 0.85 font.pixelSize: 72 - font.family: S.Theme.fontFamily + font.family: M.Theme.fontFamily font.bold: true anchors.verticalCenter: parent.verticalCenter } @@ -104,16 +103,16 @@ PanelWindow { id: colon text: ":" font.pixelSize: 72 - font.family: S.Theme.fontFamily + font.family: M.Theme.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: [M.Theme.base08, M.Theme.base09, M.Theme.base0A, M.Theme.base0B, M.Theme.base0C, M.Theme.base0D, M.Theme.base0E, M.Theme.base05] color: _colors[_colorIdx % _colors.length] Behavior on color { - enabled: !S.Theme.reducedMotion + enabled: !M.Theme.reducedMotion ColorAnimation { duration: 500 } @@ -141,7 +140,7 @@ PanelWindow { Connections { target: clock function onDateChanged() { - if (S.Theme.reducedMotion) + if (M.Theme.reducedMotion) return; colon._colorIdx++; colonAnim.restart(); @@ -150,10 +149,10 @@ PanelWindow { } Text { text: Qt.formatDateTime(clock.date, "mm") - color: S.Theme.base0E + color: M.Theme.base0E opacity: 0.85 font.pixelSize: 72 - font.family: S.Theme.fontFamily + font.family: M.Theme.fontFamily font.bold: true anchors.verticalCenter: parent.verticalCenter } @@ -165,16 +164,16 @@ PanelWindow { id: dateText anchors.horizontalCenter: parent.horizontalCenter text: Qt.formatDateTime(clock.date, "dddd, dd MMMM yyyy") - color: S.Theme.base05 + color: M.Theme.base05 opacity: 0.5 font.pixelSize: 18 - font.family: S.Theme.fontFamily + font.family: M.Theme.fontFamily font.letterSpacing: 4 layer.enabled: true layer.effect: MultiEffect { shadowEnabled: true - shadowColor: S.Theme.base0D + shadowColor: M.Theme.base0D shadowBlur: 0.4 shadowVerticalOffset: 0 shadowHorizontalOffset: 0 @@ -189,7 +188,7 @@ PanelWindow { Rectangle { anchors.fill: parent - color: S.Theme.base02 + color: M.Theme.base02 radius: 1 opacity: 0.3 } @@ -198,7 +197,7 @@ PanelWindow { height: parent.height color: colon._colors[colon._colorIdx % colon._colors.length] Behavior on color { - enabled: !S.Theme.reducedMotion + enabled: !M.Theme.reducedMotion ColorAnimation { duration: 500 } @@ -207,7 +206,7 @@ PanelWindow { opacity: 0.6 Behavior on width { - enabled: !S.Theme.reducedMotion + enabled: !M.Theme.reducedMotion NumberAnimation { duration: 50 } diff --git a/shell/modules/BacklightModule.qml b/shell/modules/Backlight.qml similarity index 91% rename from shell/modules/BacklightModule.qml rename to shell/modules/Backlight.qml index 3ca36dd..9dc64cc 100644 --- a/shell/modules/BacklightModule.qml +++ b/shell/modules/Backlight.qml @@ -2,12 +2,11 @@ import QtQuick import Quickshell import Quickshell.Io import "." as M -import "../services" as S M.BarSection { id: root - spacing: S.Theme.moduleSpacing - opacity: S.Modules.backlight.enable && percent > 0 ? 1 : 0 + spacing: M.Theme.moduleSpacing + opacity: M.Modules.backlight.enable && percent > 0 ? 1 : 0 visible: opacity > 0 tooltip: "" @@ -45,7 +44,7 @@ M.BarSection { } function adjust(delta) { - const step = S.Modules.backlight.step || 5; + const step = M.Modules.backlight.step || 5; adjProc.cmd = delta > 0 ? "light -A " + step : "light -U " + step; adjProc.running = true; } @@ -124,8 +123,8 @@ M.BarSection { anchors.verticalCenter: parent.verticalCenter text: "\uF185" color: root.accentColor - font.pixelSize: S.Theme.fontSize + 2 - font.family: S.Theme.iconFontFamily + font.pixelSize: M.Theme.fontSize + 2 + font.family: M.Theme.iconFontFamily } Item { @@ -139,7 +138,7 @@ M.BarSection { Rectangle { anchors.fill: parent - color: S.Theme.base02 + color: M.Theme.base02 radius: 3 } @@ -177,9 +176,9 @@ M.BarSection { anchors.rightMargin: 12 anchors.verticalCenter: parent.verticalCenter text: root.percent + "%" - color: S.Theme.base05 - font.pixelSize: S.Theme.fontSize - font.family: S.Theme.fontFamily + color: M.Theme.base05 + font.pixelSize: M.Theme.fontSize + font.family: M.Theme.fontFamily width: 30 } } diff --git a/shell/modules/Bar.qml b/shell/modules/Bar.qml index 84261d5..f8318a6 100644 --- a/shell/modules/Bar.qml +++ b/shell/modules/Bar.qml @@ -3,7 +3,6 @@ import QtQuick.Layouts import Quickshell import Quickshell.Wayland import "." as M -import "../services" as S PanelWindow { id: bar @@ -19,13 +18,13 @@ PanelWindow { right: true } - implicitHeight: S.Theme.barHeight + implicitHeight: M.Theme.barHeight exclusiveZone: implicitHeight Rectangle { anchors.fill: parent - color: S.Theme.base00 - opacity: S.Theme.barOpacity + color: M.Theme.base00 + opacity: M.Theme.barOpacity } Canvas { @@ -35,7 +34,7 @@ PanelWindow { const ctx = getContext("2d"); const w = width; const h = height; - const r = S.Theme.screenRadius; + const r = M.Theme.screenRadius; const lw = 3; const hw = lw / 2; @@ -43,8 +42,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, M.Theme.base0C.toString()); + glowGrad.addColorStop(1, M.Theme.base09.toString()); ctx.globalAlpha = 0.25; ctx.fillStyle = glowGrad; ctx.fillRect(0, 0, w, h); @@ -61,8 +60,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, M.Theme.base0C.toString()); + grad.addColorStop(1, M.Theme.base09.toString()); ctx.strokeStyle = grad; ctx.lineWidth = lw; @@ -97,25 +96,25 @@ PanelWindow { Item { anchors.fill: parent - anchors.topMargin: S.Theme.groupSpacing - anchors.leftMargin: S.Theme.groupSpacing - anchors.rightMargin: S.Theme.groupSpacing + anchors.topMargin: M.Theme.groupSpacing + anchors.leftMargin: M.Theme.groupSpacing + anchors.rightMargin: M.Theme.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: M.Theme.groupSpacing M.BarGroup { - M.PrivacyModule {} - M.ClockModule { - visible: S.Modules.clock.enable + M.Privacy {} + M.Clock { + visible: M.Modules.clock.enable } - M.NotificationsModule { + M.Notifications { bar: bar - visible: S.Modules.notifications.enable + visible: M.Modules.notifications.enable } } } @@ -125,19 +124,19 @@ PanelWindow { anchors.left: parent.left anchors.right: centerSection.left anchors.verticalCenter: parent.verticalCenter - spacing: S.Theme.groupSpacing + spacing: M.Theme.groupSpacing M.BarGroup { id: workspacesGroup leftEdge: true - M.WorkspacesModule { + M.Workspaces { bar: bar - visible: S.Modules.workspaces.enable + visible: M.Modules.workspaces.enable } } M.BarGroup { leftEdge: !workspacesGroup.visible - M.TrayModule { + M.Tray { bar: bar } } @@ -145,10 +144,10 @@ PanelWindow { id: _windowTitleGroup Layout.minimumWidth: 0 clip: true - visible: S.Modules.windowTitle.enable && M.NiriIpc.focusedTitle !== "" - M.WindowTitleModule { + visible: M.Modules.windowTitle.enable && M.NiriIpc.focusedTitle !== "" + M.WindowTitle { 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 * M.Theme.groupPadding - M.Theme.groupSpacing) width: Math.min(naturalWidth, _maxWidth) } } @@ -162,7 +161,7 @@ PanelWindow { anchors.left: centerSection.right anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - spacing: S.Theme.groupSpacing + spacing: M.Theme.groupSpacing Item { Layout.fillWidth: true @@ -170,63 +169,63 @@ PanelWindow { // Media M.BarGroup { - M.MprisModule { + M.Mpris { bar: bar } - M.VolumeModule { - visible: S.Modules.volume.enable + M.Volume { + visible: M.Modules.volume.enable } } // Connectivity M.BarGroup { - M.NetworkModule { + M.Network { bar: bar - visible: S.Modules.network.enable + visible: M.Modules.network.enable } - M.BluetoothModule { + M.Bluetooth { bar: bar } } // Controls M.BarGroup { - M.BacklightModule {} - M.PowerProfileModule { - visible: S.Modules.powerProfile.enable + M.Backlight {} + M.PowerProfile { + visible: M.Modules.powerProfile.enable } - M.IdleInhibitorModule { - visible: S.Modules.idleInhibitor.enable + M.IdleInhibitor { + visible: M.Modules.idleInhibitor.enable } } // Stats M.BarGroup { - M.CpuModule { - visible: S.Modules.cpu.enable + M.Cpu { + visible: M.Modules.cpu.enable } - M.MemoryModule { - visible: S.Modules.memory.enable + M.Memory { + visible: M.Modules.memory.enable } - M.GpuModule {} - M.TemperatureModule { - visible: S.Modules.temperature.enable + M.Gpu {} + M.Temperature { + visible: M.Modules.temperature.enable } - M.WeatherModule { - visible: S.Modules.weather.enable + M.Weather { + visible: M.Modules.weather.enable } - M.DiskModule { - visible: S.Modules.disk.enable + M.Disk { + visible: M.Modules.disk.enable } } // Power M.BarGroup { rightEdge: true - M.BatteryModule {} - M.PowerModule { + M.Battery {} + M.Power { bar: bar - visible: S.Modules.power.enable + visible: M.Modules.power.enable } } } diff --git a/shell/modules/BarGroup.qml b/shell/modules/BarGroup.qml index 912c94f..fe88bc2 100644 --- a/shell/modules/BarGroup.qml +++ b/shell/modules/BarGroup.qml @@ -2,7 +2,6 @@ import QtQuick import QtQuick.Effects import Quickshell import "." as M -import "../services" as S Item { id: root @@ -17,21 +16,21 @@ Item { const gx = mapToGlobal(width / 2, 0).x - scr.x; return Math.max(0, Math.min(1, gx / 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(M.Theme.base0C.r + (M.Theme.base09.r - M.Theme.base0C.r) * _posFrac, M.Theme.base0C.g + (M.Theme.base09.g - M.Theme.base0C.g) * _posFrac, M.Theme.base0C.b + (M.Theme.base09.b - M.Theme.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 ? M.Theme.screenRadius : M.Theme.radius + readonly property real _trr: rightEdge ? M.Theme.screenRadius : M.Theme.radius + readonly property real _blr: M.Theme.radius + readonly property real _brr: M.Theme.radius visible: row.visibleChildren.length > 0 implicitWidth: row.implicitWidth + _pad * 2 - implicitHeight: S.Theme.barHeight - 3 - _pad + implicitHeight: M.Theme.barHeight - 3 - _pad - readonly property int _pad: S.Theme.groupPadding + readonly property int _pad: M.Theme.groupPadding property bool _hovered: false HoverHandler { @@ -45,7 +44,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(M.Theme.base01.r, M.Theme.base01.g, M.Theme.base01.b, 0.55) } // Frost sheen — subtle white highlight, top-heavy @@ -144,7 +143,7 @@ Item { id: row property color accentColor: root.borderColor anchors.centerIn: parent - spacing: S.Theme.moduleSpacing + 2 + spacing: M.Theme.moduleSpacing + 2 } // Separator lines overlaid between visible row children diff --git a/shell/modules/BarIcon.qml b/shell/modules/BarIcon.qml index d0dfbdc..3761453 100644 --- a/shell/modules/BarIcon.qml +++ b/shell/modules/BarIcon.qml @@ -1,14 +1,13 @@ import QtQuick import Quickshell import "." as M -import "../services" as S Text { id: root property string icon: "" property string tooltip: "" property string minIcon: "" - property color accentColor: parent?.accentColor ?? S.Theme.base05 + property color accentColor: parent?.accentColor ?? M.Theme.base05 property bool _hovered: false property string _displayIcon: icon property string _pendingIcon: "" @@ -44,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: M.Theme.fontSize + 1 + font.family: M.Theme.iconFontFamily verticalAlignment: Text.AlignVCenter TextMetrics { diff --git a/shell/modules/BarLabel.qml b/shell/modules/BarLabel.qml index bcb2c6a..50dba29 100644 --- a/shell/modules/BarLabel.qml +++ b/shell/modules/BarLabel.qml @@ -1,22 +1,21 @@ import QtQuick import Quickshell import "." as M -import "../services" as S Text { id: root property string label: "" property string tooltip: "" property string minText: "" - property color accentColor: parent?.accentColor ?? S.Theme.base05 + property color accentColor: parent?.accentColor ?? M.Theme.base05 property bool _hovered: false 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: M.Theme.fontSize + font.family: M.Theme.fontFamily verticalAlignment: Text.AlignVCenter TextMetrics { diff --git a/shell/modules/BarSection.qml b/shell/modules/BarSection.qml index 6c36c42..54f46f0 100644 --- a/shell/modules/BarSection.qml +++ b/shell/modules/BarSection.qml @@ -1,13 +1,12 @@ import QtQuick import Quickshell import "." as M -import "../services" as S Row { id: root property string tooltip: "" property bool _hovered: false - property color accentColor: parent?.accentColor ?? S.Theme.base05 + property color accentColor: parent?.accentColor ?? M.Theme.base05 Behavior on opacity { NumberAnimation { diff --git a/shell/modules/BatteryModule.qml b/shell/modules/Battery.qml similarity index 88% rename from shell/modules/BatteryModule.qml rename to shell/modules/Battery.qml index 53147dc..c2f4a0c 100644 --- a/shell/modules/BatteryModule.qml +++ b/shell/modules/Battery.qml @@ -3,22 +3,21 @@ import Quickshell import Quickshell.Io import Quickshell.Services.UPower import "." as M -import "../services" as S M.BarSection { id: root - spacing: S.Theme.moduleSpacing - opacity: S.Modules.battery.enable && (UPower.displayDevice?.isLaptopBattery ?? false) ? 1 : 0 + spacing: M.Theme.moduleSpacing + opacity: M.Modules.battery.enable && (UPower.displayDevice?.isLaptopBattery ?? false) ? 1 : 0 visible: opacity > 0 tooltip: "" readonly property var dev: UPower.displayDevice readonly property real pct: (dev?.percentage ?? 0) * 100 readonly property bool charging: dev?.state === UPowerDeviceState.Charging - readonly property int _critThresh: S.Modules.battery.critical || 15 - readonly property int _warnThresh: S.Modules.battery.warning || 25 + readonly property int _critThresh: M.Modules.battery.critical || 15 + readonly property int _warnThresh: M.Modules.battery.warning || 25 readonly property bool _critical: pct < _critThresh && !charging - property color _stateColor: charging ? S.Theme.base0B : _critical ? S.Theme.base09 : pct < _warnThresh ? S.Theme.base0A : root.accentColor + property color _stateColor: charging ? M.Theme.base0B : _critical ? M.Theme.base09 : pct < _warnThresh ? M.Theme.base0A : root.accentColor property real _blinkOpacity: 1 SequentialAnimation { @@ -119,7 +118,7 @@ M.BarSection { } color: root._stateColor opacity: root._blinkOpacity - font.pixelSize: S.Theme.fontSize + 2 + font.pixelSize: M.Theme.fontSize + 2 anchors.verticalCenter: parent.verticalCenter TapHandler { cursorShape: Qt.PointingHandCursor @@ -164,8 +163,8 @@ M.BarSection { return Math.round(root.pct) + "%" + (ts ? " " + ts : ""); } 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 } } @@ -185,7 +184,7 @@ M.BarSection { Rectangle { anchors.fill: parent - color: S.Theme.base02 + color: M.Theme.base02 radius: 3 } @@ -209,7 +208,7 @@ M.BarSection { width: 1 height: parent.height + 4 anchors.verticalCenter: parent.verticalCenter - color: S.Theme.base0A + color: M.Theme.base0A opacity: 0.6 } @@ -219,7 +218,7 @@ M.BarSection { width: 1 height: parent.height + 4 anchors.verticalCenter: parent.verticalCenter - color: S.Theme.base08 + color: M.Theme.base08 opacity: 0.6 } } @@ -269,7 +268,7 @@ M.BarSection { // Warning threshold line const warnY = height - height * (root._warnThresh / 100); - ctx.strokeStyle = S.Theme.base0A.toString(); + ctx.strokeStyle = M.Theme.base0A.toString(); ctx.globalAlpha = 0.3; ctx.lineWidth = 1; ctx.setLineDash([3, 3]); @@ -280,7 +279,7 @@ M.BarSection { // Critical threshold line const critY = height - height * (root._critThresh / 100); - ctx.strokeStyle = S.Theme.base08.toString(); + ctx.strokeStyle = M.Theme.base08.toString(); ctx.beginPath(); ctx.moveTo(0, critY); ctx.lineTo(width, critY); @@ -328,9 +327,9 @@ M.BarSection { anchors.leftMargin: 12 anchors.verticalCenter: parent.verticalCenter text: "warn " + root._warnThresh + "% crit " + root._critThresh + "%" - 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 } @@ -339,9 +338,9 @@ M.BarSection { anchors.rightMargin: 12 anchors.verticalCenter: parent.verticalCenter text: "24h" - 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 } } @@ -350,7 +349,7 @@ M.BarSection { width: parent.width - 16 height: 1 anchors.horizontalCenter: parent.horizontalCenter - color: S.Theme.base03 + color: M.Theme.base03 } // Rate + health rows @@ -364,9 +363,9 @@ M.BarSection { anchors.leftMargin: 12 anchors.verticalCenter: parent.verticalCenter text: root.charging ? "Charging" : "Discharging" - 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 { @@ -378,8 +377,8 @@ M.BarSection { return r > 0 ? r.toFixed(1) + " W" : ""; } color: root._stateColor - font.pixelSize: S.Theme.fontSize - 2 - font.family: S.Theme.fontFamily + font.pixelSize: M.Theme.fontSize - 2 + font.family: M.Theme.fontFamily } } @@ -393,9 +392,9 @@ M.BarSection { anchors.leftMargin: 12 anchors.verticalCenter: parent.verticalCenter text: "Health" - 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 { @@ -405,10 +404,10 @@ M.BarSection { text: Math.round((root.dev?.healthPercentage ?? 0) * 100) + "%" color: { const h = (root.dev?.healthPercentage ?? 1) * 100; - return h < 50 ? S.Theme.base08 : h < 75 ? S.Theme.base0A : S.Theme.base0B; + return h < 50 ? M.Theme.base08 : h < 75 ? M.Theme.base0A : M.Theme.base0B; } - font.pixelSize: S.Theme.fontSize - 2 - font.family: S.Theme.fontFamily + font.pixelSize: M.Theme.fontSize - 2 + font.family: M.Theme.fontFamily } } diff --git a/shell/modules/BluetoothModule.qml b/shell/modules/Bluetooth.qml similarity index 91% rename from shell/modules/BluetoothModule.qml rename to shell/modules/Bluetooth.qml index 20b09ff..43582b4 100644 --- a/shell/modules/BluetoothModule.qml +++ b/shell/modules/Bluetooth.qml @@ -2,12 +2,11 @@ import QtQuick import Quickshell import Quickshell.Io import "." as M -import "../services" as S M.BarSection { id: root - spacing: S.Theme.moduleSpacing - opacity: S.Modules.bluetooth.enable && root.state !== "unavailable" ? 1 : 0 + spacing: M.Theme.moduleSpacing + opacity: M.Modules.bluetooth.enable && root.state !== "unavailable" ? 1 : 0 visible: opacity > 0 tooltip: { if (root.state === "off") @@ -36,7 +35,7 @@ M.BarSection { Process { id: proc - running: S.Modules.bluetooth.enable + running: M.Modules.bluetooth.enable command: ["sh", "-c", "s=$(bluetoothctl show 2>/dev/null); " + "[ -z \"$s\" ] && echo unavailable && exit; " + "echo \"$s\" | grep -q 'Powered: yes' || { echo off:; exit; }; " + "info=$(bluetoothctl info 2>/dev/null); " + "d=$(echo \"$info\" | awk -F': ' '/\\tName:/{n=$2}/Connected: yes/{c=1}END{if(c)print n}'); " + "[ -n \"$d\" ] && echo \"connected:$d\" || { echo on:; exit; }; " + "bat=$(echo \"$info\" | awk -F': ' '/Battery Percentage.*\\(/{gsub(/[^0-9]/,\"\",$2);print $2}'); " + "[ -n \"$bat\" ] && echo \"bat:$bat\""] stdout: StdioCollector { onStreamFinished: root._parse(text) @@ -45,7 +44,7 @@ M.BarSection { // Event-driven: watch BlueZ DBus property changes Process { id: btMonitor - running: S.Modules.bluetooth.enable + running: M.Modules.bluetooth.enable command: ["sh", "-c", "dbus-monitor --system \"interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path_namespace='/org/bluez'\" 2>/dev/null"] stdout: SplitParser { splitMarker: "\n" @@ -59,14 +58,14 @@ M.BarSection { } Timer { interval: 60000 - running: S.Modules.bluetooth.enable + running: M.Modules.bluetooth.enable repeat: true onTriggered: proc.running = true } M.BarIcon { icon: "\uF294" - color: root.state === "off" ? S.Theme.base04 : root.accentColor + color: root.state === "off" ? M.Theme.base04 : root.accentColor anchors.verticalCenter: parent.verticalCenter TapHandler { cursorShape: Qt.PointingHandCursor diff --git a/shell/modules/BluetoothMenu.qml b/shell/modules/BluetoothMenu.qml index 67a2478..e80096c 100644 --- a/shell/modules/BluetoothMenu.qml +++ b/shell/modules/BluetoothMenu.qml @@ -2,7 +2,6 @@ import QtQuick import Quickshell import Quickshell.Io import "." as M -import "../services" as S M.HoverPanel { id: menuWindow @@ -19,9 +18,9 @@ M.HoverPanel { Text { anchors.centerIn: parent text: "\uF011" - color: menuWindow._btEnabled ? menuWindow.accentColor : S.Theme.base04 - font.pixelSize: S.Theme.fontSize - font.family: S.Theme.iconFontFamily + color: menuWindow._btEnabled ? menuWindow.accentColor : M.Theme.base04 + font.pixelSize: M.Theme.fontSize + font.family: M.Theme.iconFontFamily Behavior on color { ColorAnimation { @@ -120,8 +119,8 @@ M.HoverPanel { anchors.fill: parent anchors.leftMargin: 4 anchors.rightMargin: 4 - color: entryHover.hovered ? S.Theme.base02 : "transparent" - radius: S.Theme.radius + color: entryHover.hovered ? M.Theme.base02 : "transparent" + radius: M.Theme.radius } Text { @@ -130,9 +129,9 @@ M.HoverPanel { anchors.leftMargin: 12 anchors.verticalCenter: parent.verticalCenter text: "\uF294" - color: entry.modelData.connected ? menuWindow.accentColor : S.Theme.base04 - font.pixelSize: S.Theme.fontSize + 1 - font.family: S.Theme.iconFontFamily + color: entry.modelData.connected ? menuWindow.accentColor : M.Theme.base04 + font.pixelSize: M.Theme.fontSize + 1 + font.family: M.Theme.iconFontFamily } Text { @@ -142,9 +141,9 @@ M.HoverPanel { anchors.rightMargin: 4 anchors.verticalCenter: parent.verticalCenter text: entry.modelData.name - color: entry.modelData.connected ? menuWindow.accentColor : S.Theme.base05 - font.pixelSize: S.Theme.fontSize - font.family: S.Theme.fontFamily + color: entry.modelData.connected ? menuWindow.accentColor : M.Theme.base05 + font.pixelSize: M.Theme.fontSize + font.family: M.Theme.fontFamily font.bold: entry.modelData.connected elide: Text.ElideRight } @@ -155,9 +154,9 @@ M.HoverPanel { anchors.rightMargin: 12 anchors.verticalCenter: parent.verticalCenter text: entry.modelData.battery >= 0 ? entry.modelData.battery + "%" : "" - 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 width: entry.modelData.battery >= 0 ? implicitWidth : 0 } @@ -182,8 +181,8 @@ M.HoverPanel { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter text: menuWindow._btEnabled ? "No paired devices" : "Bluetooth is off" - 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 } } diff --git a/shell/modules/ClockModule.qml b/shell/modules/Clock.qml similarity index 81% rename from shell/modules/ClockModule.qml rename to shell/modules/Clock.qml index 8d31b55..6506124 100644 --- a/shell/modules/ClockModule.qml +++ b/shell/modules/Clock.qml @@ -1,7 +1,6 @@ import QtQuick import Quickshell import "." as M -import "../services" as S M.BarLabel { SystemClock { @@ -9,7 +8,7 @@ M.BarLabel { precision: SystemClock.Seconds } - font.pixelSize: S.Theme.fontSize + 1 + font.pixelSize: M.Theme.fontSize + 1 label: Qt.formatDateTime(clock.date, "ddd, dd. MMM HH:mm") tooltip: Qt.formatDateTime(clock.date, "dddd, dd. MMMM yyyy\nHH:mm:ss") } diff --git a/shell/modules/CpuModule.qml b/shell/modules/Cpu.qml similarity index 80% rename from shell/modules/CpuModule.qml rename to shell/modules/Cpu.qml index f969bfe..389766e 100644 --- a/shell/modules/CpuModule.qml +++ b/shell/modules/Cpu.qml @@ -1,17 +1,16 @@ import QtQuick import Quickshell import "." as M -import "../services" as S -import "../applets" as C +import "content" as C M.BarSection { id: root - spacing: Math.max(1, S.Theme.moduleSpacing - 2) + spacing: Math.max(1, M.Theme.moduleSpacing - 2) tooltip: "" - readonly property var _cores: S.SystemStats.cpuCores - readonly property var _coreMaxFreq: S.SystemStats.cpuCoreMaxFreq - readonly property var _coreTypes: S.SystemStats.cpuCoreTypes + readonly property var _cores: M.SystemStats.cpuCores + readonly property var _coreMaxFreq: M.SystemStats.cpuCoreMaxFreq + readonly property var _coreTypes: M.SystemStats.cpuCoreTypes property bool _pinned: false readonly property bool _anyHover: root._hovered || hoverPanel.panelHovered @@ -22,10 +21,10 @@ M.BarSection { on_ShowPanelChanged: { if (_showPanel && !_coreConsumerActive) { _coreConsumerActive = true; - S.SystemStats.coreConsumers++; + M.SystemStats.coreConsumers++; } else if (!_showPanel && _coreConsumerActive) { _coreConsumerActive = false; - S.SystemStats.coreConsumers--; + M.SystemStats.coreConsumers--; } } @@ -57,7 +56,7 @@ M.BarSection { } } M.BarLabel { - label: S.SystemStats.cpuUsage.toString().padStart(2) + "%@" + S.SystemStats.cpuFreqGhz.toFixed(2) + label: M.SystemStats.cpuUsage.toString().padStart(2) + "%@" + M.SystemStats.cpuFreqGhz.toFixed(2) minText: "99%@9.99" anchors.verticalCenter: parent.verticalCenter TapHandler { @@ -76,7 +75,7 @@ M.BarSection { panelTitle: "CPU" contentWidth: 260 - C.CpuApplet { + C.CpuContent { width: hoverPanel.contentWidth cores: root._cores coreMaxFreq: root._coreMaxFreq diff --git a/shell/modules/DiskModule.qml b/shell/modules/Disk.qml similarity index 86% rename from shell/modules/DiskModule.qml rename to shell/modules/Disk.qml index d4c916c..c679da9 100644 --- a/shell/modules/DiskModule.qml +++ b/shell/modules/Disk.qml @@ -1,16 +1,15 @@ import QtQuick import Quickshell import "." as M -import "../services" as S -import "../applets" as C +import "content" as C M.BarSection { id: root - spacing: Math.max(1, S.Theme.moduleSpacing - 2) + spacing: Math.max(1, M.Theme.moduleSpacing - 2) tooltip: "" - property var _mounts: S.SystemStats.diskMounts - property int _rootPct: S.SystemStats.diskRootPct + property var _mounts: M.SystemStats.diskMounts + property int _rootPct: M.SystemStats.diskRootPct property bool _pinned: false readonly property bool _anyHover: root._hovered || hoverPanel.panelHovered @@ -57,7 +56,7 @@ M.BarSection { panelTitle: "Disk" contentWidth: 260 - C.DiskApplet { + C.DiskContent { width: hoverPanel.contentWidth mounts: root._mounts accentColor: root.accentColor diff --git a/shell/modules/Flyout.qml b/shell/modules/Flyout.qml index f90016b..b2e7e03 100644 --- a/shell/modules/Flyout.qml +++ b/shell/modules/Flyout.qml @@ -2,7 +2,6 @@ import QtQuick import Quickshell import Quickshell.Wayland import "." as M -import "../services" as S PanelWindow { id: root @@ -36,8 +35,8 @@ PanelWindow { margins.top: 0 margins.left: Math.max(0, Math.min(Math.round(M.FlyoutState.itemX - implicitWidth / 2), screen.width - implicitWidth)) - implicitWidth: label.implicitWidth + S.Theme.barPadding * 2 - implicitHeight: label.implicitHeight + S.Theme.barPadding * 2 + implicitWidth: label.implicitWidth + M.Theme.barPadding * 2 + implicitHeight: label.implicitHeight + M.Theme.barPadding * 2 ParallelAnimation { id: showAnim @@ -94,9 +93,9 @@ PanelWindow { anchors.centerIn: parent text: M.FlyoutState.text.replace(/\n/g, "
") textFormat: Text.RichText - color: S.Theme.base05 - font.pixelSize: S.Theme.fontSize - font.family: S.Theme.fontFamily + color: M.Theme.base05 + font.pixelSize: M.Theme.fontSize + font.family: M.Theme.fontFamily } } } diff --git a/shell/modules/FlyoutState.qml b/shell/modules/FlyoutState.qml index ca1a5d5..770d69a 100644 --- a/shell/modules/FlyoutState.qml +++ b/shell/modules/FlyoutState.qml @@ -1,12 +1,11 @@ pragma Singleton import QtQuick import "." as M -import "../services" as S QtObject { property bool visible: false property string text: "" property real itemX: 0 property var screen: null - property color accentColor: S.Theme.base05 + property color accentColor: M.Theme.base05 } diff --git a/shell/modules/GpuModule.qml b/shell/modules/Gpu.qml similarity index 76% rename from shell/modules/GpuModule.qml rename to shell/modules/Gpu.qml index b3a7eda..5f43c4b 100644 --- a/shell/modules/GpuModule.qml +++ b/shell/modules/Gpu.qml @@ -1,13 +1,12 @@ import QtQuick import Quickshell import "." as M -import "../services" as S M.BarSection { id: root - spacing: Math.max(1, S.Theme.moduleSpacing - 2) + spacing: Math.max(1, M.Theme.moduleSpacing - 2) tooltip: "" - visible: S.Modules.gpu.enable && S.SystemStats.gpuAvailable + visible: M.Modules.gpu.enable && M.SystemStats.gpuAvailable property bool _pinned: false readonly property bool _anyHover: root._hovered || hoverPanel.panelHovered @@ -28,8 +27,8 @@ M.BarSection { 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); } @@ -40,7 +39,7 @@ M.BarSection { M.BarIcon { icon: "\uDB84\uDCB0" - color: root._loadColor(S.SystemStats.gpuUsage) + color: root._loadColor(M.SystemStats.gpuUsage) anchors.verticalCenter: parent.verticalCenter TapHandler { cursorShape: Qt.PointingHandCursor @@ -48,9 +47,9 @@ M.BarSection { } } M.BarLabel { - label: S.SystemStats.gpuUsage + "%" + label: M.SystemStats.gpuUsage + "%" minText: "100%" - color: root._loadColor(S.SystemStats.gpuUsage) + color: root._loadColor(M.SystemStats.gpuUsage) anchors.verticalCenter: parent.verticalCenter TapHandler { cursorShape: Qt.PointingHandCursor @@ -77,10 +76,10 @@ M.BarSection { anchors.left: parent.left anchors.leftMargin: 12 anchors.verticalCenter: parent.verticalCenter - text: S.SystemStats.gpuVendor.toUpperCase() - color: S.Theme.base03 - font.pixelSize: S.Theme.fontSize - 3 - font.family: S.Theme.fontFamily + text: M.SystemStats.gpuVendor.toUpperCase() + color: M.Theme.base03 + font.pixelSize: M.Theme.fontSize - 3 + font.family: M.Theme.fontFamily font.letterSpacing: 1 } @@ -88,10 +87,10 @@ M.BarSection { anchors.right: parent.right anchors.rightMargin: 12 anchors.verticalCenter: parent.verticalCenter - text: S.SystemStats.gpuUsage + "%" - color: root._loadColor(S.SystemStats.gpuUsage) - font.pixelSize: S.Theme.fontSize - font.family: S.Theme.fontFamily + text: M.SystemStats.gpuUsage + "%" + color: root._loadColor(M.SystemStats.gpuUsage) + font.pixelSize: M.Theme.fontSize + font.family: M.Theme.fontFamily font.bold: true } } @@ -111,14 +110,14 @@ M.BarSection { Rectangle { anchors.fill: parent - color: S.Theme.base02 + color: M.Theme.base02 radius: 3 } Rectangle { - width: parent.width * Math.min(1, S.SystemStats.gpuUsage / 100) + width: parent.width * Math.min(1, M.SystemStats.gpuUsage / 100) height: parent.height - color: root._loadColor(S.SystemStats.gpuUsage) + color: root._loadColor(M.SystemStats.gpuUsage) radius: 3 Behavior on width { enabled: root._showPanel @@ -140,7 +139,7 @@ M.BarSection { anchors.rightMargin: 12 height: 36 - property var _hist: S.SystemStats.gpuHistory + property var _hist: M.SystemStats.gpuHistory on_HistChanged: if (root._showPanel) requestPaint() @@ -178,7 +177,7 @@ M.BarSection { width: parent.width - 16 height: 1 anchors.horizontalCenter: parent.horizontalCenter - color: S.Theme.base03 + color: M.Theme.base03 } Item { @@ -190,9 +189,9 @@ M.BarSection { anchors.leftMargin: 12 anchors.verticalCenter: parent.verticalCenter text: "VRAM" - 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 } @@ -200,10 +199,10 @@ M.BarSection { anchors.right: parent.right anchors.rightMargin: 12 anchors.verticalCenter: parent.verticalCenter - text: root._fmt(S.SystemStats.gpuVramUsedGb) + " / " + root._fmt(S.SystemStats.gpuVramTotalGb) + text: root._fmt(M.SystemStats.gpuVramUsedGb) + " / " + root._fmt(M.SystemStats.gpuVramTotalGb) 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 font.bold: true } } @@ -222,12 +221,12 @@ M.BarSection { Rectangle { anchors.fill: parent - color: S.Theme.base02 + color: M.Theme.base02 radius: 2 } Rectangle { - width: S.SystemStats.gpuVramTotalGb > 0 ? parent.width * Math.min(1, S.SystemStats.gpuVramUsedGb / S.SystemStats.gpuVramTotalGb) : 0 + width: M.SystemStats.gpuVramTotalGb > 0 ? parent.width * Math.min(1, M.SystemStats.gpuVramUsedGb / M.SystemStats.gpuVramTotalGb) : 0 height: parent.height color: root.accentColor radius: 2 @@ -246,26 +245,26 @@ M.BarSection { Item { width: parent.width height: 22 - visible: S.SystemStats.gpuTempC > 0 + visible: M.SystemStats.gpuTempC > 0 Text { anchors.left: parent.left anchors.leftMargin: 12 anchors.verticalCenter: parent.verticalCenter text: "Temp" - 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: S.SystemStats.gpuTempC + "\u00B0C" - color: S.SystemStats.gpuTempC > 85 ? S.Theme.base08 : S.SystemStats.gpuTempC > 70 ? S.Theme.base0A : S.Theme.base05 - font.pixelSize: S.Theme.fontSize - 2 - font.family: S.Theme.fontFamily + text: M.SystemStats.gpuTempC + "\u00B0C" + color: M.SystemStats.gpuTempC > 85 ? M.Theme.base08 : M.SystemStats.gpuTempC > 70 ? M.Theme.base0A : M.Theme.base05 + font.pixelSize: M.Theme.fontSize - 2 + font.family: M.Theme.fontFamily } } diff --git a/shell/modules/HoverPanel.qml b/shell/modules/HoverPanel.qml index dc6b297..5072c92 100644 --- a/shell/modules/HoverPanel.qml +++ b/shell/modules/HoverPanel.qml @@ -2,7 +2,6 @@ import QtQuick import Quickshell import Quickshell.Wayland import "." as M -import "../services" as S // Unified bar panel — fullscreen transparent window so content can resize // freely without triggering Wayland surface resizes. @@ -237,7 +236,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(M.Theme.barOpacity, 0.85) accentColor: root.accentColor } @@ -302,9 +301,9 @@ PanelWindow { anchors.verticalCenter: parent.verticalCenter text: root.panelTitle color: root.accentColor - font.pixelSize: S.Theme.fontSize - 1 + font.pixelSize: M.Theme.fontSize - 1 font.bold: true - font.family: S.Theme.fontFamily + font.family: M.Theme.fontFamily } // Action buttons — anchored left of pin button slot @@ -338,9 +337,9 @@ PanelWindow { Text { anchors.centerIn: parent text: root._pinned ? "\uDB81\uDC03" : "\uDB82\uDD31" - color: root._pinned ? root.accentColor : S.Theme.base04 - font.pixelSize: S.Theme.fontSize - 1 - font.family: S.Theme.iconFontFamily + color: root._pinned ? root.accentColor : M.Theme.base04 + font.pixelSize: M.Theme.fontSize - 1 + font.family: M.Theme.iconFontFamily Behavior on color { ColorAnimation { @@ -356,7 +355,7 @@ PanelWindow { anchors.right: parent.right anchors.bottom: parent.bottom height: 1 - color: S.Theme.base03 + color: M.Theme.base03 } } @@ -376,7 +375,7 @@ PanelWindow { color: "transparent" border.color: root.accentColor border.width: 1 - radius: S.Theme.radius + radius: M.Theme.radius opacity: panelContainer.opacity } } diff --git a/shell/modules/IdleInhibitorModule.qml b/shell/modules/IdleInhibitor.qml similarity index 93% rename from shell/modules/IdleInhibitorModule.qml rename to shell/modules/IdleInhibitor.qml index 81508a9..8abc880 100644 --- a/shell/modules/IdleInhibitorModule.qml +++ b/shell/modules/IdleInhibitor.qml @@ -2,11 +2,10 @@ import QtQuick import Quickshell import Quickshell.Io import "." as M -import "../services" as S M.BarIcon { id: root - color: root.active ? S.Theme.base09 : root.accentColor + color: root.active ? M.Theme.base09 : root.accentColor tooltip: { const parts = ["Idle inhibition: " + (root.active ? "active" : "inactive")]; if (root._inhibitors) diff --git a/shell/modules/MemoryModule.qml b/shell/modules/Memory.qml similarity index 80% rename from shell/modules/MemoryModule.qml rename to shell/modules/Memory.qml index cc0383a..ca745a8 100644 --- a/shell/modules/MemoryModule.qml +++ b/shell/modules/Memory.qml @@ -1,20 +1,19 @@ import QtQuick import Quickshell import "." as M -import "../services" as S -import "../applets" as C +import "content" as C M.BarSection { id: root - spacing: Math.max(1, S.Theme.moduleSpacing - 2) + spacing: Math.max(1, M.Theme.moduleSpacing - 2) tooltip: "" - property int percent: S.SystemStats.memPercent - property real usedGb: S.SystemStats.memUsedGb - property real totalGb: S.SystemStats.memTotalGb - property real availGb: S.SystemStats.memAvailGb - property real cachedGb: S.SystemStats.memCachedGb - property real buffersGb: S.SystemStats.memBuffersGb + property int percent: M.SystemStats.memPercent + property real usedGb: M.SystemStats.memUsedGb + property real totalGb: M.SystemStats.memTotalGb + property real availGb: M.SystemStats.memAvailGb + property real cachedGb: M.SystemStats.memCachedGb + property real buffersGb: M.SystemStats.memBuffersGb property bool _pinned: false readonly property bool _anyHover: root._hovered || hoverPanel.panelHovered @@ -67,7 +66,7 @@ M.BarSection { panelTitle: "Memory" contentWidth: 240 - C.MemoryApplet { + C.MemoryContent { width: hoverPanel.contentWidth percent: root.percent usedGb: root.usedGb diff --git a/shell/services/Modules.qml b/shell/modules/Modules.qml similarity index 100% rename from shell/services/Modules.qml rename to shell/modules/Modules.qml diff --git a/shell/modules/MprisModule.qml b/shell/modules/Mpris.qml similarity index 96% rename from shell/modules/MprisModule.qml rename to shell/modules/Mpris.qml index 2072bce..887105d 100644 --- a/shell/modules/MprisModule.qml +++ b/shell/modules/Mpris.qml @@ -3,13 +3,12 @@ import Quickshell import Quickshell.Io import Quickshell.Services.Mpris import "." as M -import "../services" as S -import "../applets" as C +import "content" as C M.BarSection { id: root - spacing: S.Theme.moduleSpacing - opacity: S.Modules.mpris.enable && player !== null ? 1 : 0 + spacing: M.Theme.moduleSpacing + opacity: M.Modules.mpris.enable && player !== null ? 1 : 0 visible: opacity > 0 tooltip: "" @@ -124,7 +123,7 @@ M.BarSection { panelTitle: "Now Playing" contentWidth: 280 - C.MprisApplet { + C.MprisContent { width: hoverPanel.contentWidth player: root.player players: root._players diff --git a/shell/modules/NetworkModule.qml b/shell/modules/Network.qml similarity index 91% rename from shell/modules/NetworkModule.qml rename to shell/modules/Network.qml index 0de5532..adff5df 100644 --- a/shell/modules/NetworkModule.qml +++ b/shell/modules/Network.qml @@ -2,11 +2,10 @@ import QtQuick import Quickshell import Quickshell.Io import "." as M -import "../services" as S M.BarSection { id: root - spacing: S.Theme.moduleSpacing + spacing: M.Theme.moduleSpacing tooltip: "" property string ifname: "" @@ -17,7 +16,7 @@ M.BarSection { Process { id: proc - running: S.Modules.network.enable + running: M.Modules.network.enable command: ["sh", "-c", "line=$(nmcli -t -f NAME,TYPE,DEVICE connection show --active 2>/dev/null | head -1); if [ -z \"$line\" ]; then dev=$(nmcli -t -f DEVICE,STATE device 2>/dev/null | grep ':connected' | grep -v ':unmanaged\\|:unavailable\\|:disconnected\\|:connecting' | head -1 | cut -d: -f1); [ -n \"$dev\" ] && line=\"linked:linked:$dev\"; fi; [ -z \"$line\" ] && exit 0; echo \"$line\"; dev=$(echo \"$line\" | cut -d: -f3); ip=$(nmcli -t -f IP4.ADDRESS device show \"$dev\" 2>/dev/null | head -1 | cut -d: -f2); echo \"ip:${ip:-}\"; sig=$(nmcli -t -f GENERAL.SIGNAL device show \"$dev\" 2>/dev/null | head -1 | cut -d: -f2); echo \"sig:${sig:-}\""] stdout: StdioCollector { onStreamFinished: { @@ -54,7 +53,7 @@ M.BarSection { // Event-driven: re-poll on any network change Process { id: monitor - running: S.Modules.network.enable + running: M.Modules.network.enable command: ["nmcli", "monitor"] stdout: SplitParser { splitMarker: "\n" @@ -72,7 +71,7 @@ M.BarSection { // Fallback poll Timer { interval: 60000 - running: S.Modules.network.enable + running: M.Modules.network.enable repeat: true onTriggered: proc.running = true } @@ -87,13 +86,13 @@ M.BarSection { return "\uDB85\uDE16"; return "\uDB82\uDCFD"; } - color: root.state === "disconnected" ? S.Theme.base08 : root.accentColor + color: root.state === "disconnected" ? M.Theme.base08 : root.accentColor anchors.verticalCenter: parent.verticalCenter } M.BarLabel { visible: root.state === "wifi" label: root.essid - color: root.state === "disconnected" ? S.Theme.base08 : root.accentColor + color: root.state === "disconnected" ? M.Theme.base08 : root.accentColor anchors.verticalCenter: parent.verticalCenter } diff --git a/shell/modules/NetworkMenu.qml b/shell/modules/NetworkMenu.qml index 36e41dd..613ef1f 100644 --- a/shell/modules/NetworkMenu.qml +++ b/shell/modules/NetworkMenu.qml @@ -2,7 +2,6 @@ import QtQuick import Quickshell import Quickshell.Io import "." as M -import "../services" as S M.HoverPanel { id: menuWindow @@ -18,9 +17,9 @@ M.HoverPanel { Text { anchors.centerIn: parent text: "\uF011" - color: menuWindow._wifiEnabled ? menuWindow.accentColor : S.Theme.base04 - font.pixelSize: S.Theme.fontSize - font.family: S.Theme.iconFontFamily + color: menuWindow._wifiEnabled ? menuWindow.accentColor : M.Theme.base04 + font.pixelSize: M.Theme.fontSize + font.family: M.Theme.iconFontFamily Behavior on color { ColorAnimation { @@ -157,8 +156,8 @@ M.HoverPanel { anchors.fill: parent anchors.leftMargin: 4 anchors.rightMargin: 4 - color: entryHover.hovered ? S.Theme.base02 : "transparent" - radius: S.Theme.radius + color: entryHover.hovered ? M.Theme.base02 : "transparent" + radius: M.Theme.radius } Text { @@ -167,9 +166,9 @@ M.HoverPanel { anchors.leftMargin: 12 anchors.verticalCenter: parent.verticalCenter text: entry.modelData.isWifi ? "\uF1EB" : "\uDB80\uDE00" - color: entry.modelData.active ? menuWindow.accentColor : S.Theme.base05 - font.pixelSize: S.Theme.fontSize + 1 - font.family: S.Theme.iconFontFamily + color: entry.modelData.active ? menuWindow.accentColor : M.Theme.base05 + font.pixelSize: M.Theme.fontSize + 1 + font.family: M.Theme.iconFontFamily } Text { @@ -179,9 +178,9 @@ M.HoverPanel { anchors.rightMargin: 4 anchors.verticalCenter: parent.verticalCenter text: entry.modelData.name - color: entry.modelData.active ? menuWindow.accentColor : S.Theme.base05 - font.pixelSize: S.Theme.fontSize - font.family: S.Theme.fontFamily + color: entry.modelData.active ? menuWindow.accentColor : M.Theme.base05 + font.pixelSize: M.Theme.fontSize + font.family: M.Theme.fontFamily font.bold: entry.modelData.active elide: Text.ElideRight } @@ -192,9 +191,9 @@ M.HoverPanel { anchors.rightMargin: 12 anchors.verticalCenter: parent.verticalCenter text: entry.modelData.signal >= 0 ? entry.modelData.signal + "%" : "" - 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 width: entry.modelData.signal >= 0 ? implicitWidth : 0 } @@ -223,8 +222,8 @@ M.HoverPanel { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter text: menuWindow._wifiEnabled ? "No networks available" : "Wi-Fi is off" - 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 } } diff --git a/shell/modules/NotifCard.qml b/shell/modules/NotifCard.qml index 616e68b..505ae0b 100644 --- a/shell/modules/NotifCard.qml +++ b/shell/modules/NotifCard.qml @@ -2,7 +2,6 @@ import QtQuick import Quickshell import Quickshell.Services.Notifications import "." as M -import "../services" as S // Shared notification card: background, progress bar, urgency bar, icon, text, dismiss button. // Does NOT include dismiss animation or dismiss logic — emits dismissRequested() instead. @@ -15,7 +14,7 @@ Item { property bool dismissOnAction: true property int iconSize: 32 property int bodyMaxLines: 3 - property color accentColor: S.Theme.base0D + property color accentColor: M.Theme.base0D signal dismissRequested @@ -35,9 +34,9 @@ Item { // Background: base01, base02 on hover Rectangle { anchors.fill: parent - color: _hover.hovered ? S.Theme.base02 : S.Theme.base01 - opacity: _hover.hovered ? 1.0 : Math.max(S.Theme.barOpacity, 0.9) - radius: S.Theme.radius + color: _hover.hovered ? M.Theme.base02 : M.Theme.base01 + opacity: _hover.hovered ? 1.0 : Math.max(M.Theme.barOpacity, 0.9) + radius: M.Theme.radius Behavior on color { ColorAnimation { @@ -52,7 +51,7 @@ Item { anchors.bottom: parent.bottom anchors.left: parent.left width: parent.width * Math.min(1, Math.max(0, (root.notif?.hints?.value ?? 0) / 100)) - color: S.Theme.base03 + color: M.Theme.base03 radius: parent.radius Behavior on width { @@ -72,7 +71,7 @@ Item { radius: 1 color: { const u = root.notif?.urgency ?? NotificationUrgency.Normal; - return u === NotificationUrgency.Critical ? S.Theme.base08 : u === NotificationUrgency.Low ? S.Theme.base04 : S.Theme.base0D; + return u === NotificationUrgency.Critical ? M.Theme.base08 : u === NotificationUrgency.Low ? M.Theme.base04 : M.Theme.base0D; } } @@ -108,9 +107,9 @@ Item { anchors.top: parent.top anchors.topMargin: 8 text: "\uF00D" - color: _dismissHover.hovered ? S.Theme.base08 : S.Theme.base03 - font.pixelSize: S.Theme.fontSize - 1 - font.family: S.Theme.iconFontFamily + color: _dismissHover.hovered ? M.Theme.base08 : M.Theme.base03 + font.pixelSize: M.Theme.fontSize - 1 + font.family: M.Theme.iconFontFamily opacity: _hover.hovered ? 1 : 0 HoverHandler { @@ -164,9 +163,9 @@ Item { Text { text: root.notif?.appName ?? "Notification" - 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: parent.width - _timeText.implicitWidth - 4 elide: Text.ElideRight } @@ -174,9 +173,9 @@ Item { Text { id: _timeText text: root.notif?.timeStr ?? "" - color: S.Theme.base03 - font.pixelSize: S.Theme.fontSize - 2 - font.family: S.Theme.fontFamily + color: M.Theme.base03 + font.pixelSize: M.Theme.fontSize - 2 + font.family: M.Theme.fontFamily } } @@ -187,9 +186,9 @@ Item { Text { text: root.notif?.summary ?? "" - color: S.Theme.base05 - font.pixelSize: S.Theme.fontSize - font.family: S.Theme.fontFamily + color: M.Theme.base05 + font.pixelSize: M.Theme.fontSize + font.family: M.Theme.fontFamily font.bold: true elide: Text.ElideRight width: parent.width - _inlineTime.implicitWidth - 4 @@ -198,9 +197,9 @@ Item { Text { id: _inlineTime text: root.notif?.timeStr ?? "" - color: S.Theme.base03 - font.pixelSize: S.Theme.fontSize - 2 - font.family: S.Theme.fontFamily + color: M.Theme.base03 + font.pixelSize: M.Theme.fontSize - 2 + font.family: M.Theme.fontFamily anchors.verticalCenter: parent.verticalCenter } } @@ -209,9 +208,9 @@ Item { visible: root.showAppName width: parent.width text: root.notif?.summary ?? "" - color: S.Theme.base05 - font.pixelSize: S.Theme.fontSize - font.family: S.Theme.fontFamily + color: M.Theme.base05 + font.pixelSize: M.Theme.fontSize + font.family: M.Theme.fontFamily font.bold: true elide: Text.ElideRight wrapMode: Text.WordWrap @@ -221,9 +220,9 @@ Item { Text { width: parent.width text: root.notif?.body ?? "" - 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 wrapMode: Text.WordWrap maximumLineCount: root.bodyMaxLines @@ -244,9 +243,9 @@ Item { required property var modelData width: _actText.implicitWidth + 12 height: _actText.implicitHeight + 6 - radius: S.Theme.radius - color: _actHover.hovered ? S.Theme.base03 : "transparent" - border.color: S.Theme.base03 + radius: M.Theme.radius + color: _actHover.hovered ? M.Theme.base03 : "transparent" + border.color: M.Theme.base03 border.width: 1 Text { @@ -254,8 +253,8 @@ Item { anchors.centerIn: parent text: parent.modelData.text color: root.accentColor - font.pixelSize: S.Theme.fontSize - 2 - font.family: S.Theme.fontFamily + font.pixelSize: M.Theme.fontSize - 2 + font.family: M.Theme.fontFamily } HoverHandler { diff --git a/shell/modules/NotifCenter.qml b/shell/modules/NotifCenter.qml index 3e4c5bd..442be79 100644 --- a/shell/modules/NotifCenter.qml +++ b/shell/modules/NotifCenter.qml @@ -1,7 +1,6 @@ import QtQuick import Quickshell import "." as M -import "../services" as S M.HoverPanel { id: menuWindow @@ -19,9 +18,9 @@ M.HoverPanel { anchors.leftMargin: 12 anchors.verticalCenter: parent.verticalCenter text: "Notifications" - 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 } @@ -34,9 +33,9 @@ M.HoverPanel { // DND toggle Text { text: M.NotifService.dnd ? "\uDB82\uDE93" : "\uDB80\uDC9C" - color: M.NotifService.dnd ? S.Theme.base09 : S.Theme.base04 - font.pixelSize: S.Theme.fontSize - font.family: S.Theme.iconFontFamily + color: M.NotifService.dnd ? M.Theme.base09 : M.Theme.base04 + font.pixelSize: M.Theme.fontSize + font.family: M.Theme.iconFontFamily anchors.verticalCenter: parent.verticalCenter MouseArea { @@ -49,9 +48,9 @@ M.HoverPanel { // Clear all Text { text: "\uF1F8" - color: clearArea.containsMouse ? S.Theme.base08 : S.Theme.base04 - font.pixelSize: S.Theme.fontSize - font.family: S.Theme.iconFontFamily + color: clearArea.containsMouse ? M.Theme.base08 : M.Theme.base04 + font.pixelSize: M.Theme.fontSize + font.family: M.Theme.iconFontFamily anchors.verticalCenter: parent.verticalCenter visible: M.NotifService.count > 0 @@ -220,14 +219,14 @@ M.HoverPanel { width: menuWindow.contentWidth - 16 height: 1 anchors.horizontalCenter: parent.horizontalCenter - color: S.Theme.base03 + color: M.Theme.base03 } // Notification list (scrollable) ListView { id: notifList width: menuWindow.contentWidth - height: Math.min(contentHeight, 60 * (S.Modules.notifications.maxVisible || 10)) + height: Math.min(contentHeight, 60 * (M.Modules.notifications.maxVisible || 10)) clip: true boundsBehavior: Flickable.StopAtBounds model: menuWindow._flatModel @@ -254,7 +253,7 @@ M.HoverPanel { readonly property real _targetHeight: { if (_type === "header") - return modelData.collapsed ? (28 + modelData.count * (S.Theme.fontSize + 4)) : 28; + return modelData.collapsed ? (28 + modelData.count * (M.Theme.fontSize + 4)) : 28; return _notifCard.implicitHeight; } @@ -324,8 +323,8 @@ M.HoverPanel { anchors.leftMargin: 10 anchors.top: parent.top anchors.topMargin: (28 - height) / 2 - width: S.Theme.fontSize + 2 - height: S.Theme.fontSize + 2 + width: M.Theme.fontSize + 2 + height: M.Theme.fontSize + 2 source: { if (notifDelegate._type !== "header") return ""; @@ -336,7 +335,7 @@ M.HoverPanel { } visible: status === Image.Ready fillMode: Image.PreserveAspectFit - sourceSize: Qt.size(S.Theme.fontSize + 2, S.Theme.fontSize + 2) + sourceSize: Qt.size(M.Theme.fontSize + 2, M.Theme.fontSize + 2) asynchronous: true } @@ -349,9 +348,9 @@ M.HoverPanel { height: 28 verticalAlignment: Text.AlignVCenter text: notifDelegate._type === "header" && notifDelegate.modelData.collapsed ? "\u25B8" : "\u25BE" - 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 opacity: _headerHover.hovered ? 1 : 0 } @@ -365,9 +364,9 @@ M.HoverPanel { height: 28 verticalAlignment: Text.AlignVCenter text: notifDelegate._type === "header" ? (notifDelegate.modelData.appName || "Unknown") : "" - 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 } @@ -381,9 +380,9 @@ M.HoverPanel { height: 28 verticalAlignment: Text.AlignVCenter text: "\uF1F8" - color: _groupDismissHover.hovered ? S.Theme.base08 : S.Theme.base04 - font.pixelSize: S.Theme.fontSize - 1 - font.family: S.Theme.iconFontFamily + color: _groupDismissHover.hovered ? M.Theme.base08 : M.Theme.base04 + font.pixelSize: M.Theme.fontSize - 1 + font.family: M.Theme.iconFontFamily opacity: _headerHover.hovered ? 1 : 0 HoverHandler { @@ -410,14 +409,14 @@ M.HoverPanel { anchors.leftMargin: 10 anchors.right: parent.right anchors.rightMargin: 10 - y: 28 + index * (S.Theme.fontSize + 4) - height: S.Theme.fontSize + 4 + y: 28 + index * (M.Theme.fontSize + 4) + height: M.Theme.fontSize + 4 verticalAlignment: Text.AlignVCenter text: modelData elide: Text.ElideRight - font.pixelSize: S.Theme.fontSize - 2 - font.family: S.Theme.fontFamily - color: S.Theme.base04 + font.pixelSize: M.Theme.fontSize - 2 + font.family: M.Theme.fontFamily + color: M.Theme.base04 } } } @@ -480,8 +479,8 @@ M.HoverPanel { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter text: "No notifications" - 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 } } diff --git a/shell/modules/NotifItem.qml b/shell/modules/NotifItem.qml index ac7f4cf..fc5d552 100644 --- a/shell/modules/NotifItem.qml +++ b/shell/modules/NotifItem.qml @@ -1,7 +1,6 @@ import QtQuick import Quickshell.Services.Notifications import "." as M -import "../services" as S QtObject { id: root diff --git a/shell/modules/NotifPopup.qml b/shell/modules/NotifPopup.qml index 4214894..425a962 100644 --- a/shell/modules/NotifPopup.qml +++ b/shell/modules/NotifPopup.qml @@ -3,7 +3,6 @@ import Quickshell import Quickshell.Wayland import Quickshell.Services.Notifications import "." as M -import "../services" as S PanelWindow { id: root @@ -34,7 +33,7 @@ PanelWindow { property var _knownIds: ({}) Repeater { - model: M.NotifService.popups.slice(0, S.Modules.notifications.maxPopups || 4) + model: M.NotifService.popups.slice(0, M.Modules.notifications.maxPopups || 4) delegate: Item { id: popupItem diff --git a/shell/modules/NotifService.qml b/shell/modules/NotifService.qml index fe012d9..925dcb6 100644 --- a/shell/modules/NotifService.qml +++ b/shell/modules/NotifService.qml @@ -4,7 +4,6 @@ import QtQuick import Quickshell import Quickshell.Services.Notifications import "." as M -import "../services" as S QtObject { id: root @@ -97,7 +96,7 @@ QtObject { }); // Trim excess popups - const max = S.Modules.notifications.maxPopups || 4; + const max = M.Modules.notifications.maxPopups || 4; const currentPopups = root.list.filter(n => n.popup); if (currentPopups.length > max) { for (let i = max; i < currentPopups.length; i++) @@ -107,13 +106,13 @@ QtObject { // Auto-expire popup (skip for critical) if (item.popup && !isCritical) { - const timeout = notif.expireTimeout > 0 ? notif.expireTimeout : (S.Modules.notifications.timeout || 3000); + const timeout = notif.expireTimeout > 0 ? notif.expireTimeout : (M.Modules.notifications.timeout || 3000); item._expireTimer.interval = timeout; item._expireTimer.running = true; } // Trim history (-1 = unlimited) - const maxHistory = S.Modules.notifications.maxHistory ?? -1; + const maxHistory = M.Modules.notifications.maxHistory ?? -1; while (maxHistory > 0 && root.list.length > maxHistory) { const old = root.list.pop(); old.finishDismiss(); diff --git a/shell/modules/NotificationsModule.qml b/shell/modules/Notifications.qml similarity index 93% rename from shell/modules/NotificationsModule.qml rename to shell/modules/Notifications.qml index 8adfe1f..a21a972 100644 --- a/shell/modules/NotificationsModule.qml +++ b/shell/modules/Notifications.qml @@ -2,11 +2,10 @@ import QtQuick import Quickshell import Quickshell.Services.Notifications import "." as M -import "../services" as S M.BarSection { id: root - spacing: S.Theme.moduleSpacing + spacing: M.Theme.moduleSpacing tooltip: { const parts = [M.NotifService.count + " notification" + (M.NotifService.count !== 1 ? "s" : "")]; if (M.NotifService.dnd) @@ -24,13 +23,13 @@ M.BarSection { return M.NotifService.count > 0 ? "\uDB80\uDCA0" : "\uDB82\uDE93"; return M.NotifService.count > 0 ? "\uDB84\uDD6B" : "\uDB80\uDC9C"; } - color: M.NotifService.dnd ? S.Theme.base04 : root.accentColor + color: M.NotifService.dnd ? M.Theme.base04 : root.accentColor anchors.verticalCenter: parent.verticalCenter } M.BarLabel { id: countLabel label: M.NotifService.count > 0 ? String(M.NotifService.count) + (root.hasUrgent ? "!" : "") : "" - color: root.hasUrgent ? S.Theme.base08 : root.accentColor + color: root.hasUrgent ? M.Theme.base08 : root.accentColor anchors.verticalCenter: parent.verticalCenter transform: Scale { diff --git a/shell/modules/OverviewBackdrop.qml b/shell/modules/OverviewBackdrop.qml index 58a67fb..0e0b050 100644 --- a/shell/modules/OverviewBackdrop.qml +++ b/shell/modules/OverviewBackdrop.qml @@ -2,8 +2,7 @@ import QtQuick import Quickshell import Quickshell.Wayland import "." as M -import "../services" as S -import "../applets" as C +import "content" as C PanelWindow { id: root diff --git a/shell/modules/PopupBackground.qml b/shell/modules/PopupBackground.qml index 1abc050..b4ea7dc 100644 --- a/shell/modules/PopupBackground.qml +++ b/shell/modules/PopupBackground.qml @@ -1,13 +1,12 @@ import QtQuick import "." as M -import "../services" as S Rectangle { - property color accentColor: S.Theme.base05 + property color accentColor: M.Theme.base05 - color: S.Theme.base01 - opacity: Math.max(S.Theme.barOpacity, 0.85) - radius: S.Theme.radius + color: M.Theme.base01 + opacity: Math.max(M.Theme.barOpacity, 0.85) + radius: M.Theme.radius border.color: accentColor border.width: 1 } diff --git a/shell/modules/PowerModule.qml b/shell/modules/Power.qml similarity index 97% rename from shell/modules/PowerModule.qml rename to shell/modules/Power.qml index f73c114..d94335e 100644 --- a/shell/modules/PowerModule.qml +++ b/shell/modules/Power.qml @@ -2,7 +2,6 @@ import QtQuick import Quickshell import Quickshell.Io import "." as M -import "../services" as S M.BarIcon { id: root diff --git a/shell/modules/PowerMenu.qml b/shell/modules/PowerMenu.qml index 4f71f5a..b93a5f6 100644 --- a/shell/modules/PowerMenu.qml +++ b/shell/modules/PowerMenu.qml @@ -1,7 +1,6 @@ import QtQuick import Quickshell import "." as M -import "../services" as S M.HoverPanel { id: menuWindow @@ -24,31 +23,31 @@ M.HoverPanel { label: "Lock", icon: "\uF023", cmd: ["loginctl", "lock-session"], - color: S.Theme.base0D + color: M.Theme.base0D }, { label: "Suspend", icon: "\uF186", cmd: ["systemctl", "suspend"], - color: S.Theme.base0E + color: M.Theme.base0E }, { label: "Logout", icon: "\uF2F5", cmd: menuWindow._isNiri ? ["niri", "msg", "action", "quit"] : ["loginctl", "terminate-user", ""], - color: S.Theme.base0A + color: M.Theme.base0A }, { label: "Reboot", icon: "\uF021", cmd: ["systemctl", "reboot"], - color: S.Theme.base09 + color: M.Theme.base09 }, { label: "Shutdown", icon: "\uF011", cmd: ["systemctl", "poweroff"], - color: S.Theme.base08 + color: M.Theme.base08 } ] @@ -65,8 +64,8 @@ M.HoverPanel { anchors.fill: parent anchors.leftMargin: 4 anchors.rightMargin: 4 - color: entryArea.containsMouse ? S.Theme.base02 : "transparent" - radius: S.Theme.radius + color: entryArea.containsMouse ? M.Theme.base02 : "transparent" + radius: M.Theme.radius } Text { @@ -76,8 +75,8 @@ M.HoverPanel { anchors.leftMargin: 12 text: entry.modelData.icon color: entry.modelData.color - font.pixelSize: S.Theme.fontSize + 1 - font.family: S.Theme.iconFontFamily + font.pixelSize: M.Theme.fontSize + 1 + font.family: M.Theme.iconFontFamily } Text { @@ -85,9 +84,9 @@ M.HoverPanel { anchors.left: entryIcon.right anchors.leftMargin: 10 text: entry.modelData.label - color: S.Theme.base05 - font.pixelSize: S.Theme.fontSize - font.family: S.Theme.fontFamily + color: M.Theme.base05 + font.pixelSize: M.Theme.fontSize + font.family: M.Theme.fontFamily } MouseArea { diff --git a/shell/modules/PowerProfileModule.qml b/shell/modules/PowerProfile.qml similarity index 87% rename from shell/modules/PowerProfileModule.qml rename to shell/modules/PowerProfile.qml index 8367f3a..cb6fead 100644 --- a/shell/modules/PowerProfileModule.qml +++ b/shell/modules/PowerProfile.qml @@ -1,12 +1,11 @@ import QtQuick import "." as M -import "../services" as S M.BarIcon { id: root tooltip: "Power profile: " + (M.PowerProfileService.profile || "unknown") - color: M.PowerProfileService.profile === "performance" ? S.Theme.base09 : M.PowerProfileService.profile === "power-saver" ? S.Theme.base0B : root.accentColor + color: M.PowerProfileService.profile === "performance" ? M.Theme.base09 : M.PowerProfileService.profile === "power-saver" ? M.Theme.base0B : root.accentColor icon: { if (M.PowerProfileService.profile === "performance") diff --git a/shell/modules/PowerProfileService.qml b/shell/modules/PowerProfileService.qml index 432ca18..2c11f65 100644 --- a/shell/modules/PowerProfileService.qml +++ b/shell/modules/PowerProfileService.qml @@ -3,7 +3,6 @@ pragma Singleton import QtQuick import Quickshell.Io import "." as M -import "../services" as S QtObject { id: root @@ -12,7 +11,7 @@ QtObject { readonly property bool powerSaver: profile === "power-saver" property var _proc: Process { - running: S.Modules.powerProfile.enable + running: M.Modules.powerProfile.enable command: ["powerprofilesctl", "get"] stdout: StdioCollector { onStreamFinished: root.profile = text.trim() @@ -20,7 +19,7 @@ QtObject { } property var _monitor: Process { - running: S.Modules.powerProfile.enable + running: M.Modules.powerProfile.enable command: ["sh", "-c", "dbus-monitor --system \"interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path='/net/hadess/PowerProfiles'\" 2>/dev/null"] stdout: SplitParser { splitMarker: "\n" @@ -35,7 +34,7 @@ QtObject { property var _poll: Timer { interval: 60000 - running: S.Modules.powerProfile.enable + running: M.Modules.powerProfile.enable repeat: true onTriggered: root._proc.running = true } diff --git a/shell/modules/PrivacyModule.qml b/shell/modules/Privacy.qml similarity index 85% rename from shell/modules/PrivacyModule.qml rename to shell/modules/Privacy.qml index 1f7b29d..9bdfc56 100644 --- a/shell/modules/PrivacyModule.qml +++ b/shell/modules/Privacy.qml @@ -2,11 +2,10 @@ import QtQuick import QtQuick.Effects import Quickshell.Services.Pipewire import "." as M -import "../services" as S Row { id: root - spacing: S.Theme.moduleSpacing + spacing: M.Theme.moduleSpacing // Only detect active client streams, not hardware sources/devices readonly property bool _videoCapture: { @@ -35,21 +34,21 @@ Row { return false; } - visible: S.Modules.privacy.enable && (root._videoCapture || root._audioIn) + visible: M.Modules.privacy.enable && (root._videoCapture || root._audioIn) // Screenshare indicator Text { visible: root._videoCapture text: "\uF03D" - color: S.Theme.base08 - font.pixelSize: S.Theme.fontSize + 2 - font.family: S.Theme.iconFontFamily + color: M.Theme.base08 + font.pixelSize: M.Theme.fontSize + 2 + font.family: M.Theme.iconFontFamily anchors.verticalCenter: parent.verticalCenter layer.enabled: true layer.effect: MultiEffect { shadowEnabled: true - shadowColor: S.Theme.base08 + shadowColor: M.Theme.base08 shadowBlur: 0.8 shadowVerticalOffset: 0 shadowHorizontalOffset: 0 @@ -75,15 +74,15 @@ Row { Text { visible: root._audioIn text: "\uF130" - color: S.Theme.base0B - font.pixelSize: S.Theme.fontSize + 2 - font.family: S.Theme.iconFontFamily + color: M.Theme.base0B + font.pixelSize: M.Theme.fontSize + 2 + font.family: M.Theme.iconFontFamily anchors.verticalCenter: parent.verticalCenter layer.enabled: true layer.effect: MultiEffect { shadowEnabled: true - shadowColor: S.Theme.base0B + shadowColor: M.Theme.base0B shadowBlur: 0.8 shadowVerticalOffset: 0 shadowHorizontalOffset: 0 diff --git a/shell/modules/ScreenCorners.qml b/shell/modules/ScreenCorners.qml index 8b81097..baa82b2 100644 --- a/shell/modules/ScreenCorners.qml +++ b/shell/modules/ScreenCorners.qml @@ -2,7 +2,6 @@ import QtQuick import Quickshell import Quickshell.Wayland import "." as M -import "../services" as S // Draws rounded black corners at the edges of each screen. // Disabled when screenRadius is 0. @@ -11,7 +10,7 @@ Item { required property var screen - readonly property int _r: S.Theme.screenRadius + readonly property int _r: M.Theme.screenRadius component Corner: PanelWindow { id: win diff --git a/shell/services/SystemStats.qml b/shell/modules/SystemStats.qml similarity index 100% rename from shell/services/SystemStats.qml rename to shell/modules/SystemStats.qml diff --git a/shell/modules/TemperatureModule.qml b/shell/modules/Temperature.qml similarity index 76% rename from shell/modules/TemperatureModule.qml rename to shell/modules/Temperature.qml index 7533e6b..dd69e3a 100644 --- a/shell/modules/TemperatureModule.qml +++ b/shell/modules/Temperature.qml @@ -1,29 +1,28 @@ import QtQuick import Quickshell import "." as M -import "../services" as S -import "../applets" as C +import "content" as C M.BarSection { id: root - spacing: Math.max(1, S.Theme.moduleSpacing - 2) + spacing: Math.max(1, M.Theme.moduleSpacing - 2) tooltip: "" - readonly property int _warm: S.Modules.temperature.warm || 80 - readonly property int _hot: S.Modules.temperature.hot || 90 - readonly property string _deviceFilter: S.Modules.temperature.device || "" + readonly property int _warm: M.Modules.temperature.warm || 80 + readonly property int _hot: M.Modules.temperature.hot || 90 + readonly property string _deviceFilter: M.Modules.temperature.device || "" // If a device filter is set, use that device's temp; otherwise fall back to system max readonly property int _temp: { if (_deviceFilter !== "") { - const dev = S.SystemStats.tempDevices.find(d => d.name === _deviceFilter); + const dev = M.SystemStats.tempDevices.find(d => d.name === _deviceFilter); if (dev) return dev.celsius; } - return S.SystemStats.tempCelsius; + return M.SystemStats.tempCelsius; } - 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 @@ -77,13 +76,13 @@ M.BarSection { panelTitle: "Temperature" contentWidth: 220 - C.TemperatureApplet { + C.TemperatureContent { width: hoverPanel.contentWidth temp: root._temp warm: root._warm hot: root._hot - history: S.SystemStats.tempHistory - devices: S.SystemStats.tempDevices + history: M.SystemStats.tempHistory + devices: M.SystemStats.tempDevices accentColor: root.accentColor deviceFilter: root._deviceFilter active: root._showPanel diff --git a/shell/services/Theme.qml b/shell/modules/Theme.qml similarity index 100% rename from shell/services/Theme.qml rename to shell/modules/Theme.qml diff --git a/shell/modules/TrayModule.qml b/shell/modules/Tray.qml similarity index 88% rename from shell/modules/TrayModule.qml rename to shell/modules/Tray.qml index 6453d78..de89254 100644 --- a/shell/modules/TrayModule.qml +++ b/shell/modules/Tray.qml @@ -5,12 +5,11 @@ import Quickshell import Quickshell.Services.SystemTray import "." as M -import "../services" as S RowLayout { id: root - spacing: S.Theme.moduleSpacing + 2 - visible: S.Modules.tray.enable && SystemTray.items.length > 0 + spacing: M.Theme.moduleSpacing + 2 + visible: M.Modules.tray.enable && SystemTray.items.length > 0 required property var bar property var _activeMenu: null @@ -26,8 +25,8 @@ RowLayout { property bool _hovered: false property real _pulseOpacity: 1 - implicitWidth: S.Theme.fontSize + 4 - implicitHeight: S.Theme.fontSize + 4 + implicitWidth: M.Theme.fontSize + 4 + implicitHeight: M.Theme.fontSize + 4 SequentialAnimation { running: iconItem._needsAttention @@ -57,16 +56,16 @@ RowLayout { layer.enabled: iconItem._needsAttention || iconItem._hovered layer.effect: MultiEffect { shadowEnabled: true - shadowColor: iconItem._needsAttention ? S.Theme.base08 : S.Theme.base05 + shadowColor: iconItem._needsAttention ? M.Theme.base08 : M.Theme.base05 shadowBlur: iconItem._needsAttention ? 0.8 : 0.5 shadowVerticalOffset: 0 shadowHorizontalOffset: 0 } - S.ThemedIcon { + M.ThemedIcon { anchors.fill: parent source: iconItem.modelData.icon - tint: iconItem._needsAttention ? S.Theme.base08 : (root.parent?.accentColor ?? S.Theme.base05) + tint: iconItem._needsAttention ? M.Theme.base08 : (root.parent?.accentColor ?? M.Theme.base05) } } @@ -78,7 +77,7 @@ RowLayout { M.FlyoutState.text = tip; M.FlyoutState.itemX = iconItem.mapToGlobal(iconItem.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0); M.FlyoutState.screen = QsWindow.window?.screen ?? null; - M.FlyoutState.accentColor = root.parent?.accentColor ?? S.Theme.base05; + M.FlyoutState.accentColor = root.parent?.accentColor ?? M.Theme.base05; M.FlyoutState.visible = true; } else if (!hovered) { M.FlyoutState.visible = false; @@ -111,7 +110,7 @@ RowLayout { id: menuLoader active: false M.TrayMenu { - accentColor: root.parent?.accentColor ?? S.Theme.base05 + accentColor: root.parent?.accentColor ?? M.Theme.base05 handle: iconItem.modelData.menu screen: root.bar.screen anchorX: iconItem.mapToGlobal(iconItem.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0) diff --git a/shell/modules/TrayMenu.qml b/shell/modules/TrayMenu.qml index 7d273fa..36794ee 100644 --- a/shell/modules/TrayMenu.qml +++ b/shell/modules/TrayMenu.qml @@ -1,7 +1,6 @@ import QtQuick import Quickshell import "." as M -import "../services" as S M.HoverPanel { id: menuWindow @@ -27,8 +26,8 @@ M.HoverPanel { anchors.fill: parent anchors.leftMargin: 4 anchors.rightMargin: 4 - color: backArea.containsMouse ? S.Theme.base02 : "transparent" - radius: S.Theme.radius + color: backArea.containsMouse ? M.Theme.base02 : "transparent" + radius: M.Theme.radius } Text { @@ -36,9 +35,9 @@ M.HoverPanel { anchors.left: parent.left anchors.leftMargin: 12 text: "\u2039 Back" - color: S.Theme.base05 - font.pixelSize: S.Theme.fontSize - font.family: S.Theme.fontFamily + color: M.Theme.base05 + font.pixelSize: M.Theme.fontSize + font.family: M.Theme.fontFamily } MouseArea { @@ -72,7 +71,7 @@ M.HoverPanel { anchors.leftMargin: 8 anchors.rightMargin: 8 height: 1 - color: S.Theme.base03 + color: M.Theme.base03 } Rectangle { @@ -80,18 +79,18 @@ M.HoverPanel { anchors.fill: parent anchors.leftMargin: 4 anchors.rightMargin: 4 - color: rowArea.containsMouse && entryItem.modelData.enabled ? S.Theme.base02 : "transparent" - radius: S.Theme.radius + color: rowArea.containsMouse && entryItem.modelData.enabled ? M.Theme.base02 : "transparent" + radius: M.Theme.radius } - S.ThemedIcon { + M.ThemedIcon { id: entryIcon visible: !entryItem.modelData.isSeparator && entryItem.modelData.icon !== "" anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left anchors.leftMargin: 12 - width: S.Theme.fontSize - height: S.Theme.fontSize + width: M.Theme.fontSize + height: M.Theme.fontSize source: entryItem.modelData.icon tint: menuWindow.accentColor fillMode: Image.PreserveAspectFit @@ -105,9 +104,9 @@ M.HoverPanel { anchors.right: entryChevron.visible ? entryChevron.left : parent.right anchors.rightMargin: entryChevron.visible ? 4 : 12 text: entryItem.modelData.text - color: entryItem.modelData.enabled ? S.Theme.base05 : S.Theme.base03 - font.pixelSize: S.Theme.fontSize - font.family: S.Theme.fontFamily + color: entryItem.modelData.enabled ? M.Theme.base05 : M.Theme.base03 + font.pixelSize: M.Theme.fontSize + font.family: M.Theme.fontFamily elide: Text.ElideRight } @@ -118,9 +117,9 @@ M.HoverPanel { anchors.right: parent.right anchors.rightMargin: 12 text: "\u203A" - color: entryItem.modelData.enabled ? S.Theme.base05 : S.Theme.base03 - font.pixelSize: S.Theme.fontSize - font.family: S.Theme.fontFamily + color: entryItem.modelData.enabled ? M.Theme.base05 : M.Theme.base03 + font.pixelSize: M.Theme.fontSize + font.family: M.Theme.fontFamily } MouseArea { diff --git a/shell/modules/VolumeModule.qml b/shell/modules/Volume.qml similarity index 95% rename from shell/modules/VolumeModule.qml rename to shell/modules/Volume.qml index 8ce6ac8..97a93eb 100644 --- a/shell/modules/VolumeModule.qml +++ b/shell/modules/Volume.qml @@ -2,12 +2,11 @@ import QtQuick import Quickshell import Quickshell.Services.Pipewire import "." as M -import "../services" as S -import "../applets" as C +import "content" as C M.BarSection { id: root - spacing: S.Theme.moduleSpacing + spacing: M.Theme.moduleSpacing tooltip: "" PwObjectTracker { @@ -18,7 +17,7 @@ M.BarSection { readonly property real volume: sink?.audio?.volume ?? 0 readonly 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 readonly property var _sinkList: { const sinks = []; @@ -115,7 +114,7 @@ M.BarSection { panelTitle: "Sound" contentWidth: 220 - C.VolumeApplet { + C.VolumeContent { width: hoverPanel.contentWidth sink: root.sink sinkList: root._sinkList diff --git a/shell/modules/WeatherModule.qml b/shell/modules/Weather.qml similarity index 82% rename from shell/modules/WeatherModule.qml rename to shell/modules/Weather.qml index a1bff49..4cdec41 100644 --- a/shell/modules/WeatherModule.qml +++ b/shell/modules/Weather.qml @@ -1,11 +1,10 @@ import QtQuick import Quickshell.Io import "." as M -import "../services" as S M.BarSection { id: root - spacing: S.Theme.moduleSpacing + spacing: M.Theme.moduleSpacing tooltip: root.weatherTooltip property string weatherTooltip: "" @@ -13,7 +12,7 @@ M.BarSection { Process { id: proc running: true - command: ["wttrbar"].concat(S.Modules.weather.args) + command: ["wttrbar"].concat(M.Modules.weather.args) stdout: StdioCollector { onStreamFinished: { try { @@ -28,7 +27,7 @@ M.BarSection { } } Timer { - interval: S.Modules.weather.interval || 3600000 + interval: M.Modules.weather.interval || 3600000 running: true repeat: true onTriggered: proc.running = true diff --git a/shell/modules/WindowTitleModule.qml b/shell/modules/WindowTitle.qml similarity index 92% rename from shell/modules/WindowTitleModule.qml rename to shell/modules/WindowTitle.qml index 822d46b..9c4415b 100644 --- a/shell/modules/WindowTitleModule.qml +++ b/shell/modules/WindowTitle.qml @@ -3,11 +3,10 @@ import QtQuick.Effects import Quickshell import Quickshell.Widgets import "." as M -import "../services" as S M.BarSection { id: root - spacing: S.Theme.moduleSpacing + spacing: M.Theme.moduleSpacing tooltip: M.NiriIpc.focusedAppId ? M.NiriIpc.focusedAppId + "\n" + M.NiriIpc.focusedTitle : M.NiriIpc.focusedTitle readonly property string _iconSource: { @@ -26,7 +25,7 @@ M.BarSection { id: _icon visible: root._iconSource !== "" source: root._iconSource - implicitSize: S.Theme.fontSize + 2 + implicitSize: M.Theme.fontSize + 2 anchors.verticalCenter: parent.verticalCenter layer.enabled: true layer.effect: MultiEffect { diff --git a/shell/modules/WorkspacesModule.qml b/shell/modules/Workspaces.qml similarity index 86% rename from shell/modules/WorkspacesModule.qml rename to shell/modules/Workspaces.qml index d261238..bac38d2 100644 --- a/shell/modules/WorkspacesModule.qml +++ b/shell/modules/Workspaces.qml @@ -2,7 +2,6 @@ import QtQuick import Quickshell import Quickshell.Io import "." as M -import "../services" as S Row { id: root @@ -71,7 +70,7 @@ Row { M.FlyoutState.text = name; M.FlyoutState.itemX = pill.mapToGlobal(pill.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0); M.FlyoutState.screen = QsWindow.window?.screen ?? null; - M.FlyoutState.accentColor = root.parent?.accentColor ?? S.Theme.base05; + M.FlyoutState.accentColor = root.parent?.accentColor ?? M.Theme.base05; M.FlyoutState.visible = true; } else { M.FlyoutState.visible = false; @@ -79,10 +78,10 @@ Row { } } - width: S.Theme.fontSize + 4 - height: S.Theme.fontSize + 4 + width: M.Theme.fontSize + 4 + height: M.Theme.fontSize + 4 radius: width / 2 - color: pill.active ? (root.parent?.accentColor ?? S.Theme.base0D) : (pill._hovered ? S.Theme.base03 : S.Theme.base02) + color: pill.active ? (root.parent?.accentColor ?? M.Theme.base0D) : (pill._hovered ? M.Theme.base03 : M.Theme.base02) Behavior on color { ColorAnimation { duration: 150 @@ -92,9 +91,9 @@ Row { Text { anchors.centerIn: parent text: pill.modelData.idx - color: pill.active ? S.Theme.base00 : (root.parent?.accentColor ?? S.Theme.base05) - font.pixelSize: S.Theme.fontSize - 2 - font.family: S.Theme.fontFamily + color: pill.active ? M.Theme.base00 : (root.parent?.accentColor ?? M.Theme.base05) + font.pixelSize: M.Theme.fontSize - 2 + font.family: M.Theme.fontFamily font.bold: pill.active } diff --git a/shell/applets/CpuApplet.qml b/shell/modules/content/CpuContent.qml similarity index 99% rename from shell/applets/CpuApplet.qml rename to shell/modules/content/CpuContent.qml index 4b8ae88..9411538 100644 --- a/shell/applets/CpuApplet.qml +++ b/shell/modules/content/CpuContent.qml @@ -1,5 +1,5 @@ import QtQuick -import "../services" as M +import ".." as M Column { id: root diff --git a/shell/applets/DiskApplet.qml b/shell/modules/content/DiskContent.qml similarity index 99% rename from shell/applets/DiskApplet.qml rename to shell/modules/content/DiskContent.qml index 88f2e31..4fe65f8 100644 --- a/shell/applets/DiskApplet.qml +++ b/shell/modules/content/DiskContent.qml @@ -1,5 +1,5 @@ import QtQuick -import "../services" as M +import ".." as M Column { id: root diff --git a/shell/applets/HexWaveBackground.qml b/shell/modules/content/HexWaveBackground.qml similarity index 99% rename from shell/applets/HexWaveBackground.qml rename to shell/modules/content/HexWaveBackground.qml index 72ae4f2..a840acc 100644 --- a/shell/applets/HexWaveBackground.qml +++ b/shell/modules/content/HexWaveBackground.qml @@ -1,6 +1,6 @@ import QtQuick import Quickshell -import "../services" as M +import ".." as M Item { id: root diff --git a/shell/applets/MemoryApplet.qml b/shell/modules/content/MemoryContent.qml similarity index 99% rename from shell/applets/MemoryApplet.qml rename to shell/modules/content/MemoryContent.qml index e8dc4bd..3ca568e 100644 --- a/shell/applets/MemoryApplet.qml +++ b/shell/modules/content/MemoryContent.qml @@ -1,5 +1,5 @@ import QtQuick -import "../services" as M +import ".." as M Column { id: root diff --git a/shell/applets/MprisApplet.qml b/shell/modules/content/MprisContent.qml similarity index 99% rename from shell/applets/MprisApplet.qml rename to shell/modules/content/MprisContent.qml index ca63f92..c916ae1 100644 --- a/shell/applets/MprisApplet.qml +++ b/shell/modules/content/MprisContent.qml @@ -1,6 +1,6 @@ import QtQuick import Quickshell.Services.Mpris -import "../services" as M +import ".." as M Column { id: root diff --git a/shell/applets/TemperatureApplet.qml b/shell/modules/content/TemperatureContent.qml similarity index 99% rename from shell/applets/TemperatureApplet.qml rename to shell/modules/content/TemperatureContent.qml index 49129aa..fe9ce70 100644 --- a/shell/applets/TemperatureApplet.qml +++ b/shell/modules/content/TemperatureContent.qml @@ -1,5 +1,5 @@ import QtQuick -import "../services" as M +import ".." as M Column { id: root diff --git a/shell/applets/VolumeApplet.qml b/shell/modules/content/VolumeContent.qml similarity index 99% rename from shell/applets/VolumeApplet.qml rename to shell/modules/content/VolumeContent.qml index ac50847..43363a9 100644 --- a/shell/applets/VolumeApplet.qml +++ b/shell/modules/content/VolumeContent.qml @@ -1,6 +1,6 @@ import QtQuick import Quickshell.Services.Pipewire -import "../services" as M +import ".." as M Column { id: root diff --git a/shell/modules/content/qmldir b/shell/modules/content/qmldir new file mode 100644 index 0000000..cb33d81 --- /dev/null +++ b/shell/modules/content/qmldir @@ -0,0 +1,8 @@ +module content +HexWaveBackground 1.0 HexWaveBackground.qml +VolumeContent 1.0 VolumeContent.qml +MprisContent 1.0 MprisContent.qml +CpuContent 1.0 CpuContent.qml +MemoryContent 1.0 MemoryContent.qml +TemperatureContent 1.0 TemperatureContent.qml +DiskContent 1.0 DiskContent.qml diff --git a/shell/modules/qmldir b/shell/modules/qmldir index 8cb3af5..d363a44 100644 --- a/shell/modules/qmldir +++ b/shell/modules/qmldir @@ -1,47 +1,46 @@ module modules +singleton Theme 1.0 Theme.qml singleton FlyoutState 1.0 FlyoutState.qml +singleton Modules 1.0 Modules.qml Bar 1.0 Bar.qml BarGroup 1.0 BarGroup.qml BarSection 1.0 BarSection.qml Flyout 1.0 Flyout.qml -WorkspacesModule 1.0 WorkspacesModule.qml -WindowTitleModule 1.0 WindowTitleModule.qml -ClockModule 1.0 ClockModule.qml -VolumeModule 1.0 VolumeModule.qml -TrayModule 1.0 TrayModule.qml +Workspaces 1.0 Workspaces.qml +WindowTitle 1.0 WindowTitle.qml +Clock 1.0 Clock.qml +Volume 1.0 Volume.qml +Tray 1.0 Tray.qml TrayMenu 1.0 TrayMenu.qml PopupBackground 1.0 PopupBackground.qml HoverPanel 1.0 HoverPanel.qml PowerMenu 1.0 PowerMenu.qml ScreenCorners 1.0 ScreenCorners.qml ThemedIcon 1.0 ThemedIcon.qml -BatteryModule 1.0 BatteryModule.qml -MprisModule 1.0 MprisModule.qml -NetworkModule 1.0 NetworkModule.qml +Battery 1.0 Battery.qml +Mpris 1.0 Mpris.qml +Network 1.0 Network.qml NetworkMenu 1.0 NetworkMenu.qml -BluetoothModule 1.0 BluetoothModule.qml +Bluetooth 1.0 Bluetooth.qml BluetoothMenu 1.0 BluetoothMenu.qml -BacklightModule 1.0 BacklightModule.qml -CpuModule 1.0 CpuModule.qml -MemoryModule 1.0 MemoryModule.qml -DiskModule 1.0 DiskModule.qml -TemperatureModule 1.0 TemperatureModule.qml -WeatherModule 1.0 WeatherModule.qml -PowerProfileModule 1.0 PowerProfileModule.qml -IdleInhibitorModule 1.0 IdleInhibitorModule.qml -NotificationsModule 1.0 NotificationsModule.qml +Backlight 1.0 Backlight.qml +Cpu 1.0 Cpu.qml +Memory 1.0 Memory.qml +Disk 1.0 Disk.qml +Temperature 1.0 Temperature.qml +Weather 1.0 Weather.qml +PowerProfile 1.0 PowerProfile.qml +IdleInhibitor 1.0 IdleInhibitor.qml +Notifications 1.0 Notifications.qml singleton NiriIpc 1.0 NiriIpc.qml singleton PowerProfileService 1.0 PowerProfileService.qml +singleton SystemStats 1.0 SystemStats.qml ProcessList 1.0 ProcessList.qml singleton NotifService 1.0 NotifService.qml NotifItem 1.0 NotifItem.qml NotifPopup 1.0 NotifPopup.qml NotifCenter 1.0 NotifCenter.qml -NotifCard 1.0 NotifCard.qml -PowerModule 1.0 PowerModule.qml -PrivacyModule 1.0 PrivacyModule.qml +Power 1.0 Power.qml +Privacy 1.0 Privacy.qml BackgroundOverlay 1.0 BackgroundOverlay.qml OverviewBackdrop 1.0 OverviewBackdrop.qml -GpuModule 1.0 GpuModule.qml -BarIcon 1.0 BarIcon.qml -BarLabel 1.0 BarLabel.qml diff --git a/shell/services/qmldir b/shell/services/qmldir deleted file mode 100644 index 0131301..0000000 --- a/shell/services/qmldir +++ /dev/null @@ -1,4 +0,0 @@ -module services -singleton Theme 1.0 Theme.qml -singleton SystemStats 1.0 SystemStats.qml -singleton Modules 1.0 Modules.qml diff --git a/shell/shell.qml b/shell/shell.qml index 6fe03cf..a429291 100644 --- a/shell/shell.qml +++ b/shell/shell.qml @@ -1,7 +1,6 @@ //@ pragma Env QS_NO_RELOAD_POPUP=1 import "modules" -import "services" import "lock" as Lock import Quickshell