import AstalTray from "gi://AstalTray"; import { bind, Variable } from "astal"; import AstalHyprland from "gi://AstalHyprland"; import { Gtk } from "astal/gtk4"; const SysTray = () => { const tray = AstalTray.get_default(); return {bind(tray, "items").as( items => items.map( item => ( ) ) ) } } const Workspace = () => { const hypr = AstalHyprland.get_default() return {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 => ( )) )} } const ActiveWindow = () => { const hypr = AstalHyprland.get_default(); const focused = bind( hypr, "focusedClient" ); let visible = Variable( false ); const toggleOverlay = () => { visible.set( !visible.get() ); } return {focused.as( client => ( client && v )} name="popover-container"> } export default { Workspace, ActiveWindow, SysTray }