diff options
Diffstat (limited to 'modules/bar.tsx')
| -rw-r--r-- | modules/bar.tsx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/bar.tsx b/modules/bar.tsx index a928ae8..a6ff6d1 100644 --- a/modules/bar.tsx +++ b/modules/bar.tsx @@ -8,6 +8,7 @@ import AstalNotifd from "gi://AstalNotifd"; import AstalTray from "gi://AstalTray"; import { bar as config } from "../config"; import Players from "../services/players"; +import Updates from "../services/updates"; import { getAppCategoryIcon } from "../utils/icons"; import { ellipsize } from "../utils/strings"; import { osIcon } from "../utils/system"; @@ -307,6 +308,21 @@ const StatusIcons = () => ( </box> ); +const PkgUpdates = () => ( + <box + className="module updates" + setup={self => + setupCustomTooltip( + self, + bind(Updates.get_default(), "numUpdates").as(n => `${n} update${n === 1 ? "" : "s"} available`) + ) + } + > + <label className="icon" label="download" /> + <label label={bind(Updates.get_default(), "numUpdates").as(String)} /> + </box> +); + const Notifications = () => { const unreadCount = Variable(0); return ( @@ -396,6 +412,7 @@ export default ({ monitor }: { monitor: AstalHyprland.Monitor }) => ( <box halign={Gtk.Align.END}> <Tray /> <StatusIcons /> + <PkgUpdates /> <Notifications /> <DateTime /> <Power /> |