fix(ags-v3): nice-to-have — portabilité, perf, réactivité

- Prompt.tsx: GLib.get_user_name() au lieu de hardcode "tetardtek"
- ghost-shell.desktop: $HOME au lieu de chemin absolu
- SystemStats.tsx: lecture /proc/stat + /proc/meminfo (zero fork, économie batterie)
- Battery.tsx: createDerivedBinding percentage+charging — réactif sur branchement
This commit is contained in:
2026-03-26 09:13:36 +01:00
parent da22b6446d
commit 51b725e1f7
4 changed files with 74 additions and 33 deletions

View File

@@ -1,6 +1,9 @@
import GLib from "gi://GLib"
import { createPoll } from "ags/time"
export default function Prompt() {
const username = GLib.get_user_name() || "user"
const cursor = createPoll("_", 600, () => {
// alternate between _ and empty to create blink
return Date.now() % 1200 < 600 ? "_" : " "
@@ -8,7 +11,7 @@ export default function Prompt() {
return (
<box>
<label class="prompt-name" label="tetardtek" />
<label class="prompt-name" label={username} />
<label class="prompt-cursor" label={cursor} />
</box>
)