diff options
author | Aylur <[email protected]> | 2024-11-24 23:43:28 +0000 |
---|---|---|
committer | Aylur <[email protected]> | 2024-11-24 23:44:09 +0000 |
commit | b7af61d770510b1c797e1c7137a4da934cdca7a2 (patch) | |
tree | 297283c482bdee283badff74ef5d69d7116a9221 | |
parent | 3d9c50cb8ade0319c33fbd2daefeaaa698141256 (diff) |
example: cleanup
-rw-r--r-- | examples/js/notifications/notifications/NotificationPopups.tsx | 4 | ||||
-rw-r--r-- | examples/js/simple-bar/widget/Bar.tsx | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/examples/js/notifications/notifications/NotificationPopups.tsx b/examples/js/notifications/notifications/NotificationPopups.tsx index a8088c9..9b84d84 100644 --- a/examples/js/notifications/notifications/NotificationPopups.tsx +++ b/examples/js/notifications/notifications/NotificationPopups.tsx @@ -2,7 +2,7 @@ import { Astal, Gtk, Gdk } from "astal/gtk3" import Notifd from "gi://AstalNotifd" import Notification from "./Notification" import { type Subscribable } from "astal/binding" -import { GLib, Variable, bind, timeout } from "astal" +import { Variable, bind, timeout } from "astal" // see comment below in constructor const TIMEOUT_DELAY = 5000 @@ -23,7 +23,7 @@ class NotifiationMap implements Subscribable { this.var.set([...this.map.values()].reverse()) } - private constructor() { + constructor() { const notifd = Notifd.get_default() /** diff --git a/examples/js/simple-bar/widget/Bar.tsx b/examples/js/simple-bar/widget/Bar.tsx index efc065a..8a0126e 100644 --- a/examples/js/simple-bar/widget/Bar.tsx +++ b/examples/js/simple-bar/widget/Bar.tsx @@ -133,15 +133,13 @@ function Time({ format = "%H:%M - %A %e." }) { } export default function Bar(monitor: Gdk.Monitor) { - const anchor = Astal.WindowAnchor.TOP - | Astal.WindowAnchor.LEFT - | Astal.WindowAnchor.RIGHT + const { TOP, LEFT, RIGHT } = Astal.WindowAnchor return <window className="Bar" gdkmonitor={monitor} exclusivity={Astal.Exclusivity.EXCLUSIVE} - anchor={anchor}> + anchor={TOP | LEFT | RIGHT}> <centerbox> <box hexpand halign={Gtk.Align.START}> <Workspaces /> |