mirror of
https://github.com/xsghetti/HyprCrux.git
synced 2025-07-03 22:00:38 -04:00
12 lines
407 B
JavaScript
12 lines
407 B
JavaScript
import { SimpleToggleButton } from "../ToggleButton.js"
|
|
import icons from "../../../lib/icons.js"
|
|
|
|
const n = await Service.import("notifications")
|
|
const dnd = n.bind("dnd")
|
|
|
|
export const DND = () => SimpleToggleButton({
|
|
icon: dnd.as(dnd => icons.notifications[dnd ? "silent" : "noisy"]),
|
|
label: dnd.as(dnd => dnd ? "Silent" : "Noisy"),
|
|
toggle: () => n.dnd = !n.dnd,
|
|
connection: [n, () => n.dnd],
|
|
})
|