aboutsummaryrefslogtreecommitdiffstats
path: root/src/defs.h
diff options
context:
space:
mode:
authorGravatar BanceDev 2026-02-20 16:26:30 -0500
committerGravatar BanceDev 2026-02-20 16:26:30 -0500
commitc11d9ddfe4d743bb16cc387c99b971bc4540aa0c (patch)
tree7822ad20b119aabe2895ac609b59f13391e5c722 /src/defs.h
parenta more normal default config (diff)
changed to bsp style tiling
Diffstat (limited to 'src/defs.h')
-rw-r--r--src/defs.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/defs.h b/src/defs.h
index 4e48a68..652dff3 100644
--- a/src/defs.h
+++ b/src/defs.h
@@ -136,9 +136,24 @@ typedef enum {
ATOM_COUNT
} atom_type_t;
+typedef enum { BSP_LEAF, BSP_SPLIT_V, BSP_SPLIT_H } bsp_type_t;
+
+typedef struct bsp_node_t {
+ bsp_type_t type;
+ /* for leaf nodes */
+ client_t *client;
+ /* for internal nodes */
+ struct bsp_node_t *first; /* left / top */
+ struct bsp_node_t *second; /* right / bottom */
+ struct bsp_node_t *parent;
+} bsp_node_t;
+
const char **build_argv(const char *cmd);
client_t *add_client(Window w, int ws);
void apply_fullscreen(client_t *c, Bool on);
+bsp_node_t *bsp_insert(bsp_node_t **root, client_t *old_client,
+ client_t *new_client);
+void bsp_remove(bsp_node_t **root, client_t *c);
void change_workspace(int ws);
int check_parent(pid_t p, pid_t c);
int clean_mask(int mask);