aboutsummaryrefslogtreecommitdiff
path: root/modules/system/quickshell/Clock.qml
diff options
context:
space:
mode:
authorLeander Scherer <leander@schererleander.de>2026-06-29 21:08:42 +0200
committerLeander Scherer <leander@schererleander.de>2026-06-29 21:22:33 +0200
commit67b7245bf96cf954d90719e800cf9618ffaa4feb (patch)
tree2723c3db278840150985cdc630487ff175d330d9 /modules/system/quickshell/Clock.qml
parentd4fa3d0533c8dac688e38413403815de1802339e (diff)
chore: cleanup sway, quickshell
Diffstat (limited to 'modules/system/quickshell/Clock.qml')
-rw-r--r--modules/system/quickshell/Clock.qml205
1 files changed, 0 insertions, 205 deletions
diff --git a/modules/system/quickshell/Clock.qml b/modules/system/quickshell/Clock.qml
deleted file mode 100644
index 0ec3933..0000000
--- a/modules/system/quickshell/Clock.qml
+++ /dev/null
@@ -1,205 +0,0 @@
-import QtQuick
-import QtQuick.Layouts
-import Quickshell
-
-Item {
- id: root
- width: clock.implicitWidth
- height: parent.height
-
- Text {
- id: clock
- anchors.verticalCenter: parent.verticalCenter
- color: Theme.text
- text: Qt.formatDateTime(new Date(), "ddd d MMM HH:mm:ss")
- font {
- family: Theme.mainFont
- pixelSize: 13
- weight: Font.Medium
- }
-
- Timer {
- interval: 1000
- running: true
- repeat: true
- onTriggered: clock.text = Qt.formatDateTime(new Date(), "ddd d MMM HH:mm:ss")
- }
- }
-
- MouseArea {
- anchors.fill: parent
- cursorShape: Qt.PointingHandCursor
- onClicked: GlobalState.toggle("NotificationHistory")
- }
-
- AnchoredPopup {
- popupName: "NotificationHistory"
- anchorWindow: barWindow
- anchorItem: root
-
- PopupCard {
- width: 360
- maxHeight: 520
- margins: 14
-
- RowLayout {
- Layout.fillWidth: true
- Layout.leftMargin: 4
- Layout.rightMargin: 4
- spacing: 8
-
- Text {
- text: "Notifications"
- color: Theme.text
- font {
- family: Theme.mainFont
- pixelSize: 14
- weight: Font.DemiBold
- }
- }
-
- Item {
- Layout.fillWidth: true
- }
-
- Text {
- visible: GlobalState.notificationHistory.length > 0
- text: "Clear"
- color: clearArea.containsMouse ? Theme.text : Theme.textMuted
- font {
- family: Theme.mainFont
- pixelSize: 12
- weight: Font.Medium
- }
-
- MouseArea {
- id: clearArea
- anchors.fill: parent
- hoverEnabled: true
- cursorShape: Qt.PointingHandCursor
- onClicked: GlobalState.clearNotificationHistory()
- }
- }
- }
-
- Rectangle {
- Layout.fillWidth: true
- Layout.preferredHeight: 1
- color: Theme.border
- }
-
- Text {
- visible: GlobalState.notificationHistory.length === 0
- Layout.fillWidth: true
- Layout.topMargin: 20
- Layout.bottomMargin: 20
- horizontalAlignment: Text.AlignHCenter
- text: "No notifications"
- color: Theme.textMuted
- font {
- family: Theme.mainFont
- pixelSize: 13
- weight: Font.Medium
- }
- }
-
- Repeater {
- model: GlobalState.notificationHistory
-
- delegate: Squircle {
- id: historyItem
- required property var modelData
-
- Layout.fillWidth: true
- Layout.preferredHeight: Math.max(64, historyLayout.implicitHeight + 20)
- cornerRadius: 12
- fillColor: historyHover.containsMouse ? Theme.surfaceHover : Theme.surface
- strokeColor: Theme.border
- strokeWidth: 1
-
- MouseArea {
- id: historyHover
- anchors.fill: parent
- hoverEnabled: true
- acceptedButtons: Qt.NoButton
- }
-
- RowLayout {
- id: historyLayout
- anchors {
- fill: parent
- margins: 10
- }
- spacing: 10
-
- IconCircle {
- size: 32
- source: "notifications"
- active: false
- Layout.alignment: Qt.AlignTop
- }
-
- ColumnLayout {
- Layout.fillWidth: true
- spacing: 2
-
- RowLayout {
- Layout.fillWidth: true
-
- Text {
- Layout.fillWidth: true
- text: historyItem.modelData.nAppName || "Notification"
- color: Theme.textMuted
- elide: Text.ElideRight
- font {
- family: Theme.mainFont
- pixelSize: 11
- weight: Font.Medium
- }
- }
-
- Text {
- text: Qt.formatTime(historyItem.modelData.nTimestamp, "HH:mm")
- color: Theme.textPlaceholder
- font {
- family: Theme.mainFont
- pixelSize: 10
- }
- }
- }
-
- Text {
- visible: text !== ""
- Layout.fillWidth: true
- text: historyItem.modelData.nSummary || ""
- color: Theme.text
- elide: Text.ElideRight
- maximumLineCount: 1
- font {
- family: Theme.mainFont
- pixelSize: 13
- weight: Font.DemiBold
- }
- }
-
- Text {
- visible: text !== ""
- Layout.fillWidth: true
- text: historyItem.modelData.nBody || ""
- color: Theme.textMuted
- wrapMode: Text.WordWrap
- maximumLineCount: 2
- elide: Text.ElideRight
- textFormat: Text.StyledText
- font {
- family: Theme.mainFont
- pixelSize: 12
- }
- }
- }
- }
- }
- }
- }
- }
-}