This commit is contained in:
end-4
2024-05-14 22:03:04 +07:00
parent 5ec977c882
commit 3f048dc95d
2 changed files with 8 additions and 9 deletions
+1 -2
View File
@@ -67,8 +67,7 @@ const BarResource = (name, icon, command, circprogClassName = 'bar-batt-circprog
resourceProgress, resourceProgress,
resourceLabel, resourceLabel,
], ],
setup: (self) => self setup: (self) => self.poll(5000, () => execAsync(['bash', '-c', command])
.poll(5000, () => execAsync(['bash', '-c', command])
.then((output) => { .then((output) => {
resourceCircProg.css = `font-size: ${Number(output)}px;`; resourceCircProg.css = `font-size: ${Number(output)}px;`;
resourceLabel.label = `${Math.round(Number(output))}%`; resourceLabel.label = `${Math.round(Number(output))}%`;