From 3e3f045d650a839d21f7b649da7aa5c19bd2e38b Mon Sep 17 00:00:00 2001 From: Aylur Date: Sun, 1 Sep 2024 14:17:36 +0200 Subject: monorepo structuring --- hyprland/src/workspace.vala | 57 --------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 hyprland/src/workspace.vala (limited to 'hyprland/src/workspace.vala') diff --git a/hyprland/src/workspace.vala b/hyprland/src/workspace.vala deleted file mode 100644 index 075f86f..0000000 --- a/hyprland/src/workspace.vala +++ /dev/null @@ -1,57 +0,0 @@ -namespace AstalHyprland { -public class Workspace : Object { - public signal void removed (); - - public List _clients = new List(); - - public int id { get; private set; } - public string name { get; private set; } - public Monitor monitor { get; private set; } - public List clients { owned get { return _clients.copy(); } } - public bool has_fullscreen { get; private set; } - public Client last_client { get; private set; } - - public Workspace.dummy(int id, Monitor? monitor) { - this.id = id; - this.name = id.to_string(); - this.monitor = monitor; - } - - internal List filter_clients() { - var hyprland = Hyprland.get_default(); - var list = new List(); - foreach (var client in hyprland.clients) { - if (client.workspace == this) { - list.append(client); - } - } - - return list; - } - - internal void sync(Json.Object obj) { - var hyprland = Hyprland.get_default(); - - id = (int)obj.get_int_member("id"); - name = obj.get_string_member("name"); - has_fullscreen = obj.get_boolean_member("hasfullscreen"); - - monitor = hyprland.get_monitor((int)obj.get_int_member("monitorID")); - last_client = hyprland.get_client(obj.get_string_member("lastwindow")); - - var list = filter_clients(); - if (_clients.length() != list.length()) { - _clients = list.copy(); - notify_property("clients"); - } - } - - public void focus() { - Hyprland.get_default().dispatch("workspace", id.to_string()); - } - - public void move_to(Monitor m) { - Hyprland.get_default().dispatch("moveworkspacetomonitor", id.to_string() + " " + m.id.to_string()); - } -} -} -- cgit v1.2.3