diff --git a/packages/client-api/package.json b/packages/client-api/package.json index 4ef397dc..14484a71 100644 --- a/packages/client-api/package.json +++ b/packages/client-api/package.json @@ -28,7 +28,7 @@ "@tauri-apps/api": "2.0.2", "@tauri-apps/plugin-dialog": "2.0.0", "@tauri-apps/plugin-shell": "2.0.0", - "glazewm": "1.6.0", + "glazewm": "1.7.0", "luxon": "3.4.4", "zod": "3.22.4" }, diff --git a/packages/client-api/src/providers/glazewm/create-glazewm-provider.ts b/packages/client-api/src/providers/glazewm/create-glazewm-provider.ts index 05d50e01..0db4327b 100644 --- a/packages/client-api/src/providers/glazewm/create-glazewm-provider.ts +++ b/packages/client-api/src/providers/glazewm/create-glazewm-provider.ts @@ -10,6 +10,7 @@ import { type WorkspaceActivatedEvent, type WorkspaceDeactivatedEvent, type WorkspaceUpdatedEvent, + type PauseChangedEvent, } from 'glazewm'; import { z } from 'zod'; @@ -52,6 +53,7 @@ export function createGlazeWmProvider( WmEventType.WORKSPACE_ACTIVATED, WmEventType.WORKSPACE_DEACTIVATED, WmEventType.WORKSPACE_UPDATED, + WmEventType.PAUSE_CHANGED, ], onEvent, ); @@ -70,7 +72,8 @@ export function createGlazeWmProvider( | TilingDirectionChangedEvent | WorkspaceActivatedEvent | WorkspaceDeactivatedEvent - | WorkspaceUpdatedEvent, + | WorkspaceUpdatedEvent + | PauseChangedEvent, ) { switch (e.eventType) { case WmEventType.BINDING_MODES_CHANGED: { @@ -101,6 +104,10 @@ export function createGlazeWmProvider( state = { ...state, ...(await getMonitorState()) }; break; } + case WmEventType.PAUSE_CHANGED: { + state = { ...state, isPaused: e.isPaused }; + break; + } } queue.output(state); @@ -117,12 +124,14 @@ export function createGlazeWmProvider( const { focused: focusedContainer } = await client.queryFocused(); const { bindingModes } = await client.queryBindingModes(); const { tilingDirection } = await client.queryTilingDirection(); + const { paused: isPaused } = await client.queryPaused(); return { ...(await getMonitorState()), focusedContainer, tilingDirection, bindingModes, + isPaused, runCommand, }; } diff --git a/packages/client-api/src/providers/glazewm/glazewm-provider-types.ts b/packages/client-api/src/providers/glazewm/glazewm-provider-types.ts index 1048bcfe..79ef371e 100644 --- a/packages/client-api/src/providers/glazewm/glazewm-provider-types.ts +++ b/packages/client-api/src/providers/glazewm/glazewm-provider-types.ts @@ -5,6 +5,7 @@ import { type Monitor, type RunCommandResponse, type Workspace, + type Window, } from 'glazewm'; import type { Provider } from '../create-base-provider'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e0993252..e633a071 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -46,8 +46,8 @@ importers: specifier: 2.0.0 version: 2.0.0 glazewm: - specifier: 1.6.0 - version: 1.6.0 + specifier: 1.7.0 + version: 1.7.0 luxon: specifier: 3.4.4 version: 3.4.4 @@ -1410,8 +1410,8 @@ packages: git-hooks-list@3.1.0: resolution: {integrity: sha512-LF8VeHeR7v+wAbXqfgRlTSX/1BJR9Q1vEMR8JAz1cEg6GX07+zyj3sAdDvYjj/xnlIfVuGgj4qBei1K3hKH+PA==} - glazewm@1.6.0: - resolution: {integrity: sha512-JHDuL0Fda9NQVm0mJap8XsBNAatWhAOJj6HBy7nzrXvj4wUkKdbytI0LLGDUm/aLOYeT+XqdLJpH7HImggr5ig==} + glazewm@1.7.0: + resolution: {integrity: sha512-UWwtO4OZMOytA3KS70xihxJLqGJxtLE3XUnhLxrAgbXhIhy/0B4yF4RX3dEETozeB0sUbCnWc0a5KY8saErm2A==} engines: {node: '>=12'} peerDependencies: ws: '*' @@ -3311,7 +3311,7 @@ snapshots: git-hooks-list@3.1.0: {} - glazewm@1.6.0: + glazewm@1.7.0: dependencies: tslib: 2.6.1