add storage
This commit is contained in:
parent
334c48e9b4
commit
743374628a
4 changed files with 60 additions and 0 deletions
44
modules/bar/components/Storage.qml
Normal file
44
modules/bar/components/Storage.qml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import "../../../config/"
|
||||
import "../../../constants/"
|
||||
import "../../../services/"
|
||||
import "../../../styled/"
|
||||
import "../../../utils/"
|
||||
|
||||
StyledLabel {
|
||||
implicitWidth: childrenRect.width
|
||||
implicitHeight: Dimensions.storage.height
|
||||
|
||||
Ref {
|
||||
service: SystemInfo
|
||||
}
|
||||
|
||||
Row {
|
||||
StyledText {
|
||||
id: icon
|
||||
|
||||
font.family: Theme.lucide.font.family
|
||||
font.pixelSize: Dimensions.storage.iconSize
|
||||
font.bold: true
|
||||
text: Icons.hardDrive
|
||||
|
||||
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.storagePerc * 100).toFixed()}%`
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue