feat: ags

This commit is contained in:
2026-08-19 21:41:31 +03:00
committed by Sweetbread
parent d07853a8d1
commit 122ab982e6
21 changed files with 357 additions and 1214 deletions
@@ -0,0 +1,28 @@
import { bind } from "astal"
import { Gtk } from "astal/gtk3"
import Mpris from "gi://AstalMpris"
export default function Media() {
const mpris = Mpris.get_default()
return <box className="Media">
{bind(mpris, "players").as(ps => ps[0] ? (
<box>
<box
className="Cover"
valign={Gtk.Align.CENTER}
css={bind(ps[0], "coverArt").as(cover =>
`background-image: url('${cover}');`
)}
/>
<label
label={bind(ps[0], "title").as(() =>
`${ps[0].title} - ${ps[0].artist}`
)}
/>
</box>
) : (
"Nothing Playing"
))}
</box>
}