feat: init quickshell

This commit is contained in:
2025-07-13 22:10:17 +08:00
parent a63be876f7
commit 237a62ea8a
103 changed files with 14997 additions and 498 deletions

View File

@@ -0,0 +1,64 @@
import QtQuick
import QtQuick.Controls
import Quickshell
import "root:/Data" as Data
import "root:/Core" as Core
// Clock with border integration
Item {
id: clockRoot
width: clockBackground.width
height: clockBackground.height
Rectangle {
id: clockBackground
width: clockText.implicitWidth + 24
height: 32
color: Data.ThemeManager.bgColor
// Rounded corner for border integration
topRightRadius: height / 2
Text {
id: clockText
anchors.centerIn: parent
font.family: "monospace"
font.pixelSize: 14
font.bold: true
color: Data.ThemeManager.accentColor
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: Qt.formatTime(new Date(), "HH:mm")
}
}
// Update every minute
Timer {
interval: 60000
running: true
repeat: true
onTriggered: clockText.text = Qt.formatTime(new Date(), "HH:mm")
}
// Border integration corner pieces
Core.Corners {
id: topLeftCorner
position: "topleft"
size: 1.3
fillColor: Data.ThemeManager.bgColor
offsetX: -39
offsetY: -26
z: 0 // Same z-level as clock background
}
Core.Corners {
id: topLeftCorner2
position: "topleft"
size: 1.3
fillColor: Data.ThemeManager.bgColor
offsetX: 20
offsetY: 6
z: 0 // Same z-level as clock background
}
}