summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-15 13:15:06 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-15 13:15:06 +1100
commit9f843558c029daa85cdcb6bc20e7b837c751be08 (patch)
treeaa51dbd7b5eb2f4fa71b6578bed93c127bac8d11 /modules
parentPass home and cache through bundler (diff)
downloadcaelestia-shell-9f843558c029daa85cdcb6bc20e7b837c751be08.tar.gz
caelestia-shell-9f843558c029daa85cdcb6bc20e7b837c751be08.tar.bz2
caelestia-shell-9f843558c029daa85cdcb6bc20e7b837c751be08.zip
bar: update indicator
Diffstat (limited to 'modules')
-rw-r--r--modules/bar.tsx17
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 />