btrtile: update

This commit is contained in:
julmajustus
2026-09-21 21:31:58 +03:00
parent 40da88b1ee
commit 701d0756a1
3 changed files with 20 additions and 34 deletions
+4 -4
View File
@@ -75,10 +75,10 @@ If resizing feels sluggish, try compiling dwl with -O2/-O3.
### Download ### Download
- [git branch](https://codeberg.org/julmajustus/dwl/src/branch/btrtile-0.9) - [git branch](https://codeberg.org/julmajustus/dwl/src/branch/btrtile-0.9)
- [0.8](./btrtile-v0.8.patch) - [btrtile-0.9](/dwl/dwl-patches/raw/branch/main/patches/btrtile/btrtile-v0.9.patch)
- [0.8 WITH gaps](./btrtile-v0.8-gaps.patch) - [btrtile-0.9 WITH gaps](/dwl/dwl-patches/raw/branch/main/patches/btrtile/btrtile-gaps-v0.9.patch)
- [main-d16036e](./btrtile-d16036e.patch) - [btrtile-0.8](/dwl/dwl-patches/raw/branch/main/patches/btrtile/btrtile-v0.8.patch)
- [main-d16036e WITH gaps](./btrtile-gaps-d16036e.patch) - [btrtile-0.8 WITH gaps](/dwl/dwl-patches/raw/branch/main/patches/btrtile/btrtile-v0.8-gaps.patch)
### Authors ### Authors
- [julmajustus](https://codeberg.org/julmajustus) - [julmajustus](https://codeberg.org/julmajustus)
@@ -1,15 +1,8 @@
From 6084ff30e1a85ab76b50e7827208337dbccc1926 Mon Sep 17 00:00:00 2001 From 3703c920073a98d48c386465f86d8b9168ab8121 Mon Sep 17 00:00:00 2001
From: julmajustus <julmajustus@tutanota.com> From: julmajustus <julmajustus@tutanota.com>
Date: Sun, 20 Sep 2026 01:35:56 +0300 Date: Mon, 21 Sep 2026 21:23:37 +0300
Subject: [PATCH] btrtile: refactor and few features and code simplification Subject: [PATCH] btrtile: update for v0.9
- Refactor to current upstream main
- Added more user toggles to control the behaviour of btrtile into
config.h
- Simplified the btrtile gapps logic
- Simplified the changes to dwl.c
- Added two keybind functions to swap and toggle splits
- Minor code cleanups
--- ---
Makefile | 3 +- Makefile | 3 +-
btrtile.h | 884 +++++++++++++++++++++++++++++++++++++++++++++++++++ btrtile.h | 884 +++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -34,7 +27,7 @@ index 8304245..063ba0a 100644
# wayland-scanner is a tool which generates C headers and rigging for Wayland # wayland-scanner is a tool which generates C headers and rigging for Wayland
diff --git a/btrtile.h b/btrtile.h diff --git a/btrtile.h b/btrtile.h
new file mode 100644 new file mode 100644
index 0000000..9f91be2 index 0000000..b202fcd
--- /dev/null --- /dev/null
+++ b/btrtile.h +++ b/btrtile.h
@@ -0,0 +1,884 @@ @@ -0,0 +1,884 @@
@@ -48,7 +41,7 @@ index 0000000..9f91be2
+/* By: julmajustus <julmajustus@tutanota.com> !!: !!:! !!! */ +/* By: julmajustus <julmajustus@tutanota.com> !!: !!:! !!! */
+/* ::! :!: !:! */ +/* ::! :!: !:! */
+/* Created: 2024/12/15 00:26:07 by julmajustus :: ::::::: :: */ +/* Created: 2024/12/15 00:26:07 by julmajustus :: ::::::: :: */
+/* Updated: 2026/09/20 01:07:46 by julmajustus : : : : : : */ +/* Updated: 2026/09/21 21:20:08 by julmajustus : : : : : : */
+/* */ +/* */
+/* ************************************************************************** */ +/* ************************************************************************** */
+ +
@@ -457,7 +450,7 @@ index 0000000..9f91be2
+ return; + return;
+ } + }
+ +
+ if (right_count == 0) { + if (right_count == 0) {
+ layout_node(m, node->left, area, 0); + layout_node(m, node->left, area, 0);
+ return; + return;
+ } + }
@@ -895,7 +888,7 @@ index 0000000..9f91be2
+ +
+ /* If no client was found at cursor position fallback to closest. */ + /* If no client was found at cursor position fallback to closest. */
+ wl_list_for_each_reverse(c, &clients, link) { + wl_list_for_each_reverse(c, &clients, link) {
+ if (VISIBLEON(c, m) && !c->isfloating && !c->isfullscreen && c->node) { + if (VISIBLEON(c, m) && !c->isfloating && !c->isfullscreen && c->node) {
+ dx = 0, dy = 0; + dx = 0, dy = 0;
+ +
+ if (x < c->geom.x) { + if (x < c->geom.x) {
@@ -913,7 +906,7 @@ index 0000000..9f91be2
+ } + }
+ +
+ dist = dx * dx + dy * dy; + dist = dx * dx + dy * dy;
+ if (dist < mindist) { + if (dist < mindist) {
+ mindist = dist; + mindist = dist;
+ closest = c; + closest = c;
+ } + }
@@ -1,15 +1,8 @@
From fd672091bce3ab7db7ab89725db94df8a7bb5a6d Mon Sep 17 00:00:00 2001 From ea691d9618f5cd500d539e6fd16856b2554828ff Mon Sep 17 00:00:00 2001
From: julmajustus <julmajustus@tutanota.com> From: julmajustus <julmajustus@tutanota.com>
Date: Sun, 20 Sep 2026 01:30:50 +0300 Date: Mon, 21 Sep 2026 21:20:29 +0300
Subject: [PATCH] btrtile: refactor and few features and code simplification Subject: [PATCH] btrtile: update for v0.9
- Refactor to current upstream main
- Added more user toggles to control the behaviour of btrtile into
config.h
- Simplified the btrtile gapps logic
- Simplified the changes to dwl.c
- Added two keybind functions to swap and toggle splits
- Minor code cleanups
--- ---
Makefile | 3 +- Makefile | 3 +-
btrtile.h | 884 +++++++++++++++++++++++++++++++++++++++++++++++++++ btrtile.h | 884 +++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -34,7 +27,7 @@ index 8304245..063ba0a 100644
# wayland-scanner is a tool which generates C headers and rigging for Wayland # wayland-scanner is a tool which generates C headers and rigging for Wayland
diff --git a/btrtile.h b/btrtile.h diff --git a/btrtile.h b/btrtile.h
new file mode 100644 new file mode 100644
index 0000000..9f91be2 index 0000000..b202fcd
--- /dev/null --- /dev/null
+++ b/btrtile.h +++ b/btrtile.h
@@ -0,0 +1,884 @@ @@ -0,0 +1,884 @@
@@ -48,7 +41,7 @@ index 0000000..9f91be2
+/* By: julmajustus <julmajustus@tutanota.com> !!: !!:! !!! */ +/* By: julmajustus <julmajustus@tutanota.com> !!: !!:! !!! */
+/* ::! :!: !:! */ +/* ::! :!: !:! */
+/* Created: 2024/12/15 00:26:07 by julmajustus :: ::::::: :: */ +/* Created: 2024/12/15 00:26:07 by julmajustus :: ::::::: :: */
+/* Updated: 2026/09/20 01:07:46 by julmajustus : : : : : : */ +/* Updated: 2026/09/21 21:20:08 by julmajustus : : : : : : */
+/* */ +/* */
+/* ************************************************************************** */ +/* ************************************************************************** */
+ +
@@ -457,7 +450,7 @@ index 0000000..9f91be2
+ return; + return;
+ } + }
+ +
+ if (right_count == 0) { + if (right_count == 0) {
+ layout_node(m, node->left, area, 0); + layout_node(m, node->left, area, 0);
+ return; + return;
+ } + }
@@ -895,7 +888,7 @@ index 0000000..9f91be2
+ +
+ /* If no client was found at cursor position fallback to closest. */ + /* If no client was found at cursor position fallback to closest. */
+ wl_list_for_each_reverse(c, &clients, link) { + wl_list_for_each_reverse(c, &clients, link) {
+ if (VISIBLEON(c, m) && !c->isfloating && !c->isfullscreen && c->node) { + if (VISIBLEON(c, m) && !c->isfloating && !c->isfullscreen && c->node) {
+ dx = 0, dy = 0; + dx = 0, dy = 0;
+ +
+ if (x < c->geom.x) { + if (x < c->geom.x) {
@@ -913,7 +906,7 @@ index 0000000..9f91be2
+ } + }
+ +
+ dist = dx * dx + dy * dy; + dist = dx * dx + dy * dy;
+ if (dist < mindist) { + if (dist < mindist) {
+ mindist = dist; + mindist = dist;
+ closest = c; + closest = c;
+ } + }