From f40a5c5aa8a5242190464c30521e9aca8e8dc2f0 Mon Sep 17 00:00:00 2001 From: noname Date: Fri, 7 Mar 2025 17:42:02 +1100 Subject: change indent to 4 spaces --- lib/sway/container.vala | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'lib/sway/container.vala') diff --git a/lib/sway/container.vala b/lib/sway/container.vala index 7a0fc93..414c902 100644 --- a/lib/sway/container.vala +++ b/lib/sway/container.vala @@ -1,27 +1,30 @@ namespace AstalSway { - public class Container : Node { +public class Container : Node { public bool sticky; public bool floating; public bool focused; public string border; public int border_width; public int fullscreen_mode; + public float percent { get; private set; } public Container() { - node_type = NodeType.CONTAINER; + node_type = NodeType.CONTAINER; } internal override void sync(Json.Object obj) { - border = obj.get_string_member("border"); - border_width = (int)obj.get_int_member("current_border_width"); - sticky = obj.get_boolean_member("sticky"); - floating = obj.get_string_member("type") == "floating_con"; - fullscreen_mode = (int)obj.get_int_member("fullscreen_mode"); - base.sync(obj); + border = obj.get_string_member("border"); + border_width = (int)obj.get_int_member("current_border_width"); + sticky = obj.get_boolean_member("sticky"); + floating = obj.get_string_member("type") == "floating_con"; + fullscreen_mode = (int)obj.get_int_member("fullscreen_mode"); + percent = (float)obj.get_double_member("percent"); + + base.sync(obj); } public override void focus() { - Sway.get_default().run_command(@"[con_id=$id] focus"); + Sway.get_default().run_command(@"[con_id=$id] focus"); } - } +} } -- cgit v1.2.3