diff --git a/config/Dimensions.qml b/config/Dimensions.qml index 9c5c094..d768bf8 100644 --- a/config/Dimensions.qml +++ b/config/Dimensions.qml @@ -13,7 +13,6 @@ Singleton { property Clock clock: Clock {} property Pipewire pipewire: Pipewire {} property Storage storage: Storage {} - property Cpu cpu: Cpu {} property Caffeine caffeine: Caffeine {} property Workspace workspace: Workspace {} property Tray tray: Tray {} @@ -68,16 +67,6 @@ Singleton { property int verticalPadding: 6 } - component Cpu: QtObject { - id: clock - - property int iconSize: 14 - property int fontSize: 14 - property int height: 30 - property int horizontalPadding: 8 - property int verticalPadding: 6 - } - component Caffeine: QtObject { id: clock diff --git a/constants/Icons.qml b/constants/Icons.qml index 22e6268..7c947e6 100644 --- a/constants/Icons.qml +++ b/constants/Icons.qml @@ -5,7 +5,6 @@ import Quickshell Singleton { property string brickWall: "\u{E586}" property string coffee: "\u{E09a}" - property string cpu: "\u{E0ad}" property string hardDrive: "\u{E0f1}" property string triangle: "\u{E192}" property string triangleDashed: "\u{E642}" diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml index db9ea4a..17d043e 100644 --- a/modules/bar/Bar.qml +++ b/modules/bar/Bar.qml @@ -108,10 +108,6 @@ Scope { anchors.verticalCenter: parent.verticalCenter } - Cpu { - anchors.verticalCenter: parent.verticalCenter - } - Clock { anchors.verticalCenter: parent.verticalCenter } diff --git a/modules/bar/components/Cpu.qml b/modules/bar/components/Cpu.qml deleted file mode 100644 index d6be494..0000000 --- a/modules/bar/components/Cpu.qml +++ /dev/null @@ -1,65 +0,0 @@ -import QtQuick -import Quickshell -import "../../../config/" -import "../../../constants/" -import "../../../services/" -import "../../../styled/" -import "../../../utils/" - -Clickable { - id: root - - property bool showTemp: true - - implicitWidth: row.width - implicitHeight: Dimensions.storage.height - - Ref { - service: SystemInfo - } - - onClicked: { - root.showTemp = !root.showTemp; - } - - Row { - id: row - StyledText { - id: icon - - font.family: Theme.lucide.font.family - font.pixelSize: Dimensions.storage.iconSize - font.bold: true - text: Icons.cpu - - anchors.verticalCenter: parent.verticalCenter - topPadding: Dimensions.storage.verticalPadding - bottomPadding: Dimensions.storage.verticalPadding - leftPadding: Dimensions.storage.horizontalPadding - } - - StyledText { - id: text - anchors.verticalCenter: parent.verticalCenter - topPadding: Dimensions.storage.verticalPadding - bottomPadding: Dimensions.storage.verticalPadding - rightPadding: Dimensions.storage.horizontalPadding - - font.pixelSize: Dimensions.storage.fontSize - - text: ` ${(SystemInfo.cpuPerc * 100).toFixed()}%` - - states: [ - State { - name: "temp" - when: root.showTemp - PropertyChanges { - text { - text: ` ${(SystemInfo.cpuTemp)}℃` - } - } - } - ] - } - } -} diff --git a/modules/bar/components/Storage.qml b/modules/bar/components/Storage.qml index 5c41b72..01713cd 100644 --- a/modules/bar/components/Storage.qml +++ b/modules/bar/components/Storage.qml @@ -11,7 +11,7 @@ StyledLabel { implicitHeight: Dimensions.storage.height Ref { - service: SystemInfo + service: SystemInfo } Row { @@ -39,6 +39,11 @@ StyledLabel { font.pixelSize: Dimensions.storage.fontSize text: ` ${(SystemInfo.storagePerc * 100).toFixed()}%` + + SystemClock { + id: clock + precision: SystemClock.Seconds + } } } }