From 2d477289578916028d71dac319ebb5aae670eeb9 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sat, 9 May 2026 22:07:21 +0800 Subject: [PATCH] break change: remove tgmix layout --- README.md | 2 +- docs/ipc.md | 2 +- docs/window-management/layouts.md | 2 +- src/fetch/client.h | 11 +---------- src/layout/arrange.h | 3 +-- src/layout/horizontal.h | 13 +------------ src/layout/layout.h | 3 --- 7 files changed, 6 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index bb48cd97..d3f6e7cf 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ https://github.com/user-attachments/assets/bb83004a-0563-4b48-ad89-6461a9b78b1f - vertical_tile - vertical_grid - vertical_scroller -- tgmix +- dwindle # Installation diff --git a/docs/ipc.md b/docs/ipc.md index 72beefb5..8bb0f5c1 100644 --- a/docs/ipc.md +++ b/docs/ipc.md @@ -64,7 +64,7 @@ mmsg -s -t 2^ ### Layouts -Switch layouts programmatically. Layout codes: `S` (Scroller), `T` (Tile), `G` (Grid), `M` (Monocle), `K` (Deck), `CT` (Center Tile), `RT` (Right Tile), `VS` (Vertical Scroller), `VT` (Vertical Tile), `VG` (Vertical Grid), `VK` (Vertical Deck), `TG` (TGMix). +Switch layouts programmatically. Layout codes: `S` (Scroller), `T` (Tile), `G` (Grid), `M` (Monocle), `K` (Deck), `CT` (Center Tile), `RT` (Right Tile), `VS` (Vertical Scroller), `VT` (Vertical Tile), `VG` (Vertical Grid), `VK` (Vertical Deck), `DW` (Dwindle). ```bash # Switch to Scroller diff --git a/docs/window-management/layouts.md b/docs/window-management/layouts.md index 26c05fe4..9b957b29 100644 --- a/docs/window-management/layouts.md +++ b/docs/window-management/layouts.md @@ -18,7 +18,7 @@ mangowm supports a variety of layouts that can be assigned per tag. - `vertical_scroller` - `vertical_grid` - `vertical_deck` -- `tgmix` +- `dwindle` --- diff --git a/src/fetch/client.h b/src/fetch/client.h index 8fe831be..be9be420 100644 --- a/src/fetch/client.h +++ b/src/fetch/client.h @@ -558,7 +558,7 @@ bool client_is_in_same_stack(Client *sc, Client *tc, Client *fc) { if (id != SCROLLER && id != VERTICAL_SCROLLER && id != TILE && id != VERTICAL_TILE && id != DECK && id != VERTICAL_DECK && - id != CENTER_TILE && id != RIGHT_TILE && id != TGMIX) + id != CENTER_TILE && id != RIGHT_TILE) return false; if (id == SCROLLER || id == VERTICAL_SCROLLER) { @@ -583,15 +583,6 @@ bool client_is_in_same_stack(Client *sc, Client *tc, Client *fc) { return true; } - if (id == TGMIX) { - if (tc->ismaster ^ sc->ismaster) - return false; - if (fc && !(fc->ismaster ^ sc->ismaster)) - return false; - if (!sc->ismaster && sc->mon->visible_tiling_clients <= 3) - return true; - } - if (id == CENTER_TILE) { if (tc->ismaster ^ sc->ismaster) return false; diff --git a/src/layout/arrange.h b/src/layout/arrange.h index 9e0c6fa7..b822a729 100644 --- a/src/layout/arrange.h +++ b/src/layout/arrange.h @@ -707,8 +707,7 @@ void resize_tile_client(Client *grabc, bool isdrag, int32_t offsetx, const Layout *current_layout = grabc->mon->pertag->ltidxs[grabc->mon->pertag->curtag]; if (current_layout->id == TILE || current_layout->id == DECK || - current_layout->id == CENTER_TILE || current_layout->id == RIGHT_TILE || - (current_layout->id == TGMIX && grabc->mon->visible_tiling_clients <= 3) + current_layout->id == CENTER_TILE || current_layout->id == RIGHT_TILE ) { resize_tile_master_horizontal(grabc, isdrag, offsetx, offsety, time, diff --git a/src/layout/horizontal.h b/src/layout/horizontal.h index eaa7b5c2..e69b4cdd 100644 --- a/src/layout/horizontal.h +++ b/src/layout/horizontal.h @@ -993,15 +993,4 @@ monocle(Monitor *m) { } if ((c = focustop(m))) wlr_scene_node_raise_to_top(&c->scene->node); -} - -void tgmix(Monitor *m) { - int32_t n = m->visible_tiling_clients; - if (n <= 3) { - tile(m); - return; - } else { - grid(m); - return; - } -} +} \ No newline at end of file diff --git a/src/layout/layout.h b/src/layout/layout.h index 557ce571..16773dc7 100644 --- a/src/layout/layout.h +++ b/src/layout/layout.h @@ -11,7 +11,6 @@ static void vertical_overview(Monitor *m); static void vertical_grid(Monitor *m); static void vertical_scroller(Monitor *m); static void vertical_deck(Monitor *mon); -static void tgmix(Monitor *m); static void dwindle(Monitor *m); /* layout(s) */ @@ -29,7 +28,6 @@ enum { VERTICAL_GRID, VERTICAL_DECK, RIGHT_TILE, - TGMIX, DWINDLE, }; @@ -48,6 +46,5 @@ Layout layouts[] = { {"VT", vertical_tile, "vertical_tile", VERTICAL_TILE}, // 垂直平铺布局 {"VG", vertical_grid, "vertical_grid", VERTICAL_GRID}, // 垂直格子布局 {"VK", vertical_deck, "vertical_deck", VERTICAL_DECK}, // 垂直卡片布局 - {"TG", tgmix, "tgmix", TGMIX}, // 混合布局 {"DW", dwindle, "dwindle", DWINDLE}, }; \ No newline at end of file