aboutsummaryrefslogtreecommitdiff
path: root/.config/ags/widget/bar/buttons/Messages.ts
blob: a8971e909b487036c928d1702db1bdf997357c10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import icons from "lib/icons"
import PanelButton from "../PanelButton"
import options from "options"

const n = await Service.import("notifications")
const notifs = n.bind("notifications")
const action = options.bar.messages.action.bind()

export default () => PanelButton({
    class_name: "messages",
    on_clicked: action,
    visible: notifs.as(n => n.length > 0),
    child: Widget.Box([
        Widget.Icon(icons.notifications.message),
    ]),
})