mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
autofmt
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Services.UPower
|
||||
import QtQuick
|
||||
import qs.Commons
|
||||
import qs.Services.Networking
|
||||
import qs.Services.UI
|
||||
@@ -99,9 +99,10 @@ Singleton {
|
||||
id: healthProcess
|
||||
command: ["sh", "-c", "upower -i $(upower -e | grep battery | head -n 1) 2>/dev/null | grep -iE 'capacity'"]
|
||||
stdout: SplitParser {
|
||||
onRead: function(data) {
|
||||
onRead: function (data) {
|
||||
var line = data.trim();
|
||||
if (line === "") return;
|
||||
if (line === "")
|
||||
return;
|
||||
|
||||
var capacityMatch = line.match(/^\s*capacity:\s*(\d+(?:\.\d+)?)\s*%/i);
|
||||
if (capacityMatch) {
|
||||
|
||||
Reference in New Issue
Block a user