1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-27 06:52:50 -05:00

Systematic cleanup and qmlfmt of all services

- qmlfmt kinda sucks but it's what qt creator uses
This commit is contained in:
bbedward
2025-09-02 22:45:06 -04:00
parent 21089aa66e
commit 531d6334fb
21 changed files with 1119 additions and 1223 deletions

View File

@@ -1,5 +1,6 @@
pragma Singleton
pragma ComponentBehavior: Bound
pragma ComponentBehavior
import QtQuick
import Quickshell
@@ -33,7 +34,6 @@ Singleton {
getUptime()
}
// Get username and full name
Process {
id: userInfoProcess
@@ -60,7 +60,6 @@ Singleton {
}
}
// Get system uptime
Process {
id: uptimeProcess
@@ -81,17 +80,21 @@ Singleton {
const minutes = Math.floor((seconds % 3600) / 60)
const parts = []
if (days > 0)
parts.push(`${days} day${days === 1 ? "" : "s"}`)
if (hours > 0)
parts.push(`${hours} hour${hours === 1 ? "" : "s"}`)
if (minutes > 0)
parts.push(`${minutes} minute${minutes === 1 ? "" : "s"}`)
if (days > 0) {
parts.push(`${days} day${days === 1 ? "" : "s"}`)
}
if (hours > 0) {
parts.push(`${hours} hour${hours === 1 ? "" : "s"}`)
}
if (minutes > 0) {
parts.push(`${minutes} minute${minutes === 1 ? "" : "s"}`)
}
if (parts.length > 0)
root.uptime = "up " + parts.join(", ")
else
root.uptime = `up ${seconds} seconds`
if (parts.length > 0) {
root.uptime = `up ${parts.join(", ")}`
} else {
root.uptime = `up ${seconds} seconds`
}
}
}
}