- AGS v3.1.0 (Astal/GTK3) Ghost Shell avec ghost mode (heartbeat + hover reveal) - Modules : clock, battery, volume (interactif), network, MPRIS, CPU/RAM, systray - Brain Power panel (Super + B) — lecture live focus/todos/session - tetardtek_ prompt avec curseur clignotant - Palette violet-chaton v2 documentée (Mitsuri Kanroji gradient magenta → green) - Autostart COSMIC via .desktop - Archive AGS v1 conservée pour référence
33 lines
701 B
TypeScript
33 lines
701 B
TypeScript
import { createPoll } from "ags/time"
|
|
|
|
function formatTime(): string {
|
|
const now = new Date()
|
|
return now.toLocaleTimeString("fr-FR", {
|
|
hour: "2-digit",
|
|
minute: "2-digit",
|
|
second: "2-digit",
|
|
})
|
|
}
|
|
|
|
function formatDate(): string {
|
|
const now = new Date()
|
|
return now.toLocaleDateString("fr-FR", {
|
|
weekday: "short",
|
|
day: "numeric",
|
|
month: "short",
|
|
})
|
|
}
|
|
|
|
export default function Clock() {
|
|
const time = createPoll("", 1000, () => formatTime())
|
|
const date = createPoll("", 60000, () => formatDate())
|
|
|
|
return (
|
|
<box>
|
|
<label class="clock" label={time} />
|
|
<label class="separator" label="│" />
|
|
<label class="date" label={date} />
|
|
</box>
|
|
)
|
|
}
|