From e9a47074e874aaa08fa781375f00930783ba99a8 Mon Sep 17 00:00:00 2001 From: noname Date: Mon, 3 Mar 2025 21:53:09 +1100 Subject: nodes properties and workspace events --- lib/sway/workspace.vala | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'lib/sway/workspace.vala') diff --git a/lib/sway/workspace.vala b/lib/sway/workspace.vala index a849a62..17795b3 100644 --- a/lib/sway/workspace.vala +++ b/lib/sway/workspace.vala @@ -1,12 +1,20 @@ namespace AstalSway { public class Workspace : Node { - public int num {get; private set; } + public string representation; - public NodeType type = NodeType.WORKSPACE; + public Workspace() { + node_type = NodeType.WORKSPACE; + } internal override void sync(Json.Object obj) { + var rep = obj.get_member("representation"); + if (rep != null) { + representation = rep.get_string(); + } else { + representation = ""; + print("aa"); + } base.sync(obj); - // num = (int)obj.get_int_member("num"); } } } -- cgit v1.2.3