97 lines
1.9 KiB
QML
97 lines
1.9 KiB
QML
pragma ComponentBehavior: Bound
|
|
|
|
import Quickshell
|
|
import Quickshell.Wayland
|
|
import Quickshell.Hyprland
|
|
import Quickshell.Io
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
|
|
import "../constants"
|
|
import "../helpers"
|
|
import "."
|
|
|
|
Item {
|
|
id: root
|
|
|
|
property int cpuUsage: 0
|
|
property int memUsage: 0
|
|
property int gpuUsage: 0
|
|
property string nowPlayingArtist: ""
|
|
property string nowPlayingTitle: ""
|
|
property string nowPlayingArtUrl: ""
|
|
property bool nowPlaying: false
|
|
|
|
RowLayout {
|
|
anchors.fill: parent
|
|
// anchors.centerIn: verticalCenter
|
|
anchors.leftMargin: 8
|
|
anchors.rightMargin: 8
|
|
|
|
WorkspaceHelpers {
|
|
id: workspaceHelpers
|
|
}
|
|
|
|
WorkspacesList {
|
|
id: workspacesList
|
|
}
|
|
|
|
// small spacer
|
|
Item {
|
|
anchors.leftMargin: 10
|
|
}
|
|
|
|
NowPlaying {
|
|
artist: root.nowPlayingArtist
|
|
title: root.nowPlayingTitle
|
|
artUrl: root.nowPlayingArtUrl
|
|
isPlaying: root.nowPlaying
|
|
Layout.fillHeight: true
|
|
Layout.alignment: Qt.AlignBottom
|
|
}
|
|
|
|
// Spacer
|
|
Item {
|
|
Layout.fillWidth: true
|
|
}
|
|
|
|
// =====================
|
|
// RIGHT: System info
|
|
// =====================
|
|
RowLayout {
|
|
spacing: 10
|
|
|
|
LineSeparator {}
|
|
|
|
BluetoothIcon {
|
|
parentWindow: root
|
|
}
|
|
|
|
LineSeparator {}
|
|
|
|
BarText {
|
|
prefix: "C"
|
|
value: cpuUsage
|
|
}
|
|
|
|
LineSeparator {}
|
|
|
|
BarText {
|
|
prefix: "M"
|
|
value: memUsage
|
|
}
|
|
|
|
LineSeparator {}
|
|
|
|
BarText {
|
|
prefix: "G"
|
|
value: gpuUsage
|
|
}
|
|
|
|
LineSeparator {}
|
|
|
|
Clock {}
|
|
}
|
|
}
|
|
}
|