Watch
1
0
Fork
You've already forked Zoe-Dotfiles
0
mirror of synced 2026-11-04 19:47:17 +00:00

Switched to Codeberg

This commit is contained in:
MysteryBirb 2026-08-29 21:21:08 +02:00
commit a611bcdf15
29 changed files with 2302 additions and 0 deletions

View file

@ -0,0 +1,44 @@
import Quickshell
import Quickshell.Io
import QtQuick
import qs
Rectangle {
id: root
property real ramUsage
implicitHeight: Appearance.appletRadHeight
radius: Appearance.appletRadHeight
implicitWidth: ramText.width + 25
color: Appearance.colAppBg
Process {
id: ramProc
command: ["sh", "-c", "free | grep Mem"]
running: true
stdout: SplitParser {
onRead: data => {
if (!data) {
return;
}
var parts = data.trim().split(/\s+/);
var used = parseInt(parts[2]) || 0;
root.ramUsage = used / 1048576;
}
}
}
Timer {
id: ramProcRestarter
interval: 2000
running: true
repeat: true
onTriggered: ramProc.running = true
}
Text {
id: ramText
anchors.centerIn: root
text: "RAM: " + root.ramUsage.toFixed(2) + " GiB"
font.family: Appearance.font
font.pixelSize: Appearance.fontSize
font.bold: true
color: Appearance.colFg
}
}