76 lines
1.7 KiB
QML
76 lines
1.7 KiB
QML
pragma ComponentBehavior: Bound
|
|
import Quickshell
|
|
import QtQuick
|
|
import QtQuick.Window
|
|
|
|
import "."
|
|
import "constants"
|
|
import "ui"
|
|
import "services"
|
|
|
|
ShellRoot {
|
|
id: root
|
|
|
|
// put RandomWallpaper and SystemStats here so they only get instantiated once
|
|
RandomWallpaper {}
|
|
|
|
SystemStats {
|
|
id: stats
|
|
}
|
|
|
|
NowPlayingService {
|
|
id: nowPlayingService
|
|
}
|
|
|
|
Variants {
|
|
model: Quickshell.screens
|
|
|
|
// qmllint disable uncreatable-type
|
|
PanelWindow {
|
|
id: rootPanel
|
|
|
|
required property ShellScreen modelData
|
|
screen: modelData
|
|
|
|
// =====================
|
|
// Layout
|
|
// =====================
|
|
anchors.top: true
|
|
anchors.left: true
|
|
anchors.right: true
|
|
implicitHeight: 25
|
|
color: Colors.md3.background
|
|
|
|
Loader {
|
|
id: wallpaperLoader
|
|
sourceComponent: RandomWallpaper {}
|
|
active: false
|
|
}
|
|
|
|
TopBar {
|
|
anchors.fill: parent
|
|
|
|
cpuUsage: stats.cpuUsage
|
|
memUsage: stats.memUsage
|
|
gpuUsage: stats.gpuUsage
|
|
nowPlayingArtist: nowPlayingService.artist
|
|
nowPlayingTitle: nowPlayingService.title
|
|
nowPlayingArtUrl: nowPlayingService.artUrl
|
|
nowPlaying: nowPlayingService.isPlaying
|
|
}
|
|
}
|
|
}
|
|
|
|
Variants {
|
|
model: Quickshell.screens
|
|
|
|
FortuneBox {
|
|
id: fortuneBox
|
|
anchors.right: true
|
|
anchors.bottom: true
|
|
margins.right: 10
|
|
margins.bottom: 10
|
|
}
|
|
}
|
|
}
|