From ce64b076e6930dfc499d889ad992191a4fbb7b11 Mon Sep 17 00:00:00 2001
From: kotontrion <kotontrion@tutanota.de>
Date: Sat, 16 Nov 2024 11:48:43 +0100
Subject: gjs: add actionGroup property

---
 examples/js/simple-bar/widget/Bar.tsx | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

(limited to 'examples/js/simple-bar/widget/Bar.tsx')

diff --git a/examples/js/simple-bar/widget/Bar.tsx b/examples/js/simple-bar/widget/Bar.tsx
index efc065a..029aca1 100644
--- a/examples/js/simple-bar/widget/Bar.tsx
+++ b/examples/js/simple-bar/widget/Bar.tsx
@@ -13,19 +13,14 @@ function SysTray() {
 
     return <box>
         {bind(tray, "items").as(items => items.map(item => {
-            if (item.iconThemePath)
-                App.add_icons(item.iconThemePath)
-
-            const menu = item.create_menu()
-
-            return <button
+            
+            return <menubutton
                 tooltipMarkup={bind(item, "tooltipMarkup")}
-                onDestroy={() => menu?.destroy()}
-                onClickRelease={self => {
-                    menu?.popup_at_widget(self, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null)
-                }}>
+                usePopover={false}
+                actionGroup={bind(item, "action-group").as(ag => { return { prefix: "dbusmenu", actionGroup: ag}})}
+                menuModel={bind(item, "menu-model")} >
                 <icon gIcon={bind(item, "gicon")} />
-            </button>
+            </menubutton>
         }))}
     </box>
 }
-- 
cgit v1.2.3


From c5664e2941b33609de0743a8475a40b24522a3dc Mon Sep 17 00:00:00 2001
From: Aylur <k.demeter@protonmail.com>
Date: Thu, 19 Dec 2024 23:42:33 +0100
Subject: update examples, fix styling

---
 examples/js/simple-bar/widget/Bar.tsx | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

(limited to 'examples/js/simple-bar/widget/Bar.tsx')

diff --git a/examples/js/simple-bar/widget/Bar.tsx b/examples/js/simple-bar/widget/Bar.tsx
index f5e96cb..87cc20d 100644
--- a/examples/js/simple-bar/widget/Bar.tsx
+++ b/examples/js/simple-bar/widget/Bar.tsx
@@ -11,17 +11,16 @@ import Tray from "gi://AstalTray"
 function SysTray() {
     const tray = Tray.get_default()
 
-    return <box>
-        {bind(tray, "items").as(items => items.map(item => {
-            
-            return <menubutton
+    return <box className="SysTray">
+        {bind(tray, "items").as(items => items.map(item => (
+            <menubutton
                 tooltipMarkup={bind(item, "tooltipMarkup")}
                 usePopover={false}
-                actionGroup={bind(item, "action-group").as(ag => { return { prefix: "dbusmenu", actionGroup: ag}})}
-                menuModel={bind(item, "menu-model")} >
+                actionGroup={bind(item, "action-group").as(ag => ["dbusmenu", ag])}
+                menuModel={bind(item, "menu-model")}>
                 <icon gIcon={bind(item, "gicon")} />
             </menubutton>
-        }))}
+        ))}
     </box>
 }
 
-- 
cgit v1.2.3


From d16c856074531b9fb867b8922be370bcfc749614 Mon Sep 17 00:00:00 2001
From: rRedLim <82714753+rRedLim@users.noreply.github.com>
Date: Fri, 20 Dec 2024 02:21:09 +0300
Subject: chore: simple-bar filter special workspaces (#168)

---
 examples/js/simple-bar/widget/Bar.tsx | 1 +
 1 file changed, 1 insertion(+)

(limited to 'examples/js/simple-bar/widget/Bar.tsx')

diff --git a/examples/js/simple-bar/widget/Bar.tsx b/examples/js/simple-bar/widget/Bar.tsx
index 87cc20d..54a14b0 100644
--- a/examples/js/simple-bar/widget/Bar.tsx
+++ b/examples/js/simple-bar/widget/Bar.tsx
@@ -89,6 +89,7 @@ function Workspaces() {
 
     return <box className="Workspaces">
         {bind(hypr, "workspaces").as(wss => wss
+            .filter(ws => !(ws.id >= -99 && ws.id <= -2)) // filter out special workspaces
             .sort((a, b) => a.id - b.id)
             .map(ws => (
                 <button
-- 
cgit v1.2.3

