diff --git a/astal/bun.lock b/astal/bun.lock new file mode 100644 index 0000000..56a42a2 --- /dev/null +++ b/astal/bun.lock @@ -0,0 +1,14 @@ +{ + "lockfileVersion": 1, + "workspaces": { + "": { + "name": "astal-shell", + "dependencies": { + "astal": "/nix/store/pvb3x021mr6xknm91gqq76gy32n96vj0-astal-gjs/share/astal/gjs", + }, + }, + }, + "packages": { + "astal": ["astal@file:../../../../nix/store/pvb3x021mr6xknm91gqq76gy32n96vj0-astal-gjs/share/astal/gjs", {}], + } +} diff --git a/astal/widget/Bar.tsx b/astal/widget/Bar.tsx index c97364d..478911a 100644 --- a/astal/widget/Bar.tsx +++ b/astal/widget/Bar.tsx @@ -7,23 +7,23 @@ import GTop from "gi://GTop" import { calc_cpu_usage, get_cpu_snapshot, get_disk_space, get_ram_info } from "./cpu" import AstalBattery from "gi://AstalBattery" -const time = Variable("").poll(1000, "date") - -function Workspaces() { +function Workspaces({ monitor }: { monitor: Gdk.Monitor }) { const hypr = Hyprland.get_default() return {bind(hypr, "workspaces").as(wss => wss.filter(ws => !(ws.id >= -99 && ws.id <= -2)) .sort((a, b) => a.id - b.id) - .map(ws => ( - //@ts-ignore - - )))} + .map(ws => { + if (ws.monitor.model !== monitor.model) return <> + return ( + + ) + }))} } @@ -145,7 +145,7 @@ export default function Bar(gdkmonitor: Gdk.Monitor) { - +