fix(ags-v3): audit fixes — portable brain path, reactive volume, SCSS dedup

- brain.ts: BRAIN_ROOT résolu via $BRAIN_ROOT env / ~/.config/brain-path / fallback ~/Dev/Brain
- Volume.tsx: bindings volume + mute séparés et réactifs
- style.scss: importe _bar.scss et _heartbeat.scss via @use, supprime 199 lignes dupliquées
This commit is contained in:
2026-03-26 08:58:33 +01:00
parent 932b174c36
commit da22b6446d
4 changed files with 86 additions and 217 deletions

View File

@@ -4,7 +4,10 @@ import { createBinding } from "ags"
export default function Volume() {
const speaker = AstalWp.get_default()!.defaultSpeaker!
const text = createBinding(speaker, "volume")((v: number) => {
const volume = createBinding(speaker, "volume")
const mute = createBinding(speaker, "mute")
const text = volume((v: number) => {
const pct = Math.round(v * 100)
const muted = speaker.mute
let icon = "󰕾"
@@ -16,7 +19,7 @@ export default function Volume() {
return `${icon} ${pct}%`
})
const cls = createBinding(speaker, "mute")((m: boolean) =>
const cls = mute((m: boolean) =>
m ? "volume muted" : "volume"
)