- Scaling 16px base pour ultrawide 3440x1440 - Bar: CPU/RAM/GPU visible, media single player (skip playerctld), network tooltip LAN/WAN IPv4 - Volume: class module pour sizing cohérent - Battery: désactivé (PC fixe) - Clock: tooltip calendrier + uptime - BrainPower: panel enrichi (focus, session, intentions, todos, repos git, derniers commits) - App: BrainPower sur moniteur principal uniquement - Heartbeat: Layer.TOP pour compatibilité COSMIC
28 lines
648 B
TypeScript
28 lines
648 B
TypeScript
import app from "ags/gtk3/app"
|
|
import { Astal, Gtk, Gdk } from "ags/gtk3"
|
|
|
|
export default function Heartbeat(gdkmonitor: Gdk.Monitor) {
|
|
const { TOP, LEFT, RIGHT } = Astal.WindowAnchor
|
|
|
|
return (
|
|
<window
|
|
class="Heartbeat"
|
|
gdkmonitor={gdkmonitor}
|
|
exclusivity={Astal.Exclusivity.NONE}
|
|
anchor={TOP | LEFT | RIGHT}
|
|
application={app}
|
|
layer={Astal.Layer.TOP}
|
|
>
|
|
<eventbox
|
|
onHover={() => {
|
|
// reveal the bar
|
|
const bar = app.get_window("bar")
|
|
if (bar) bar.visible = true
|
|
}}
|
|
>
|
|
<box class="heartbeat-line" />
|
|
</eventbox>
|
|
</window>
|
|
)
|
|
}
|