break change: remove tgmix layout

This commit is contained in:
DreamMaoMao 2026-05-09 22:07:21 +08:00
parent bb1443a063
commit 2d47728957
7 changed files with 6 additions and 30 deletions

View file

@ -48,7 +48,7 @@ https://github.com/user-attachments/assets/bb83004a-0563-4b48-ad89-6461a9b78b1f
- vertical_tile - vertical_tile
- vertical_grid - vertical_grid
- vertical_scroller - vertical_scroller
- tgmix - dwindle
# Installation # Installation

View file

@ -64,7 +64,7 @@ mmsg -s -t 2^
### Layouts ### 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 ```bash
# Switch to Scroller # Switch to Scroller

View file

@ -18,7 +18,7 @@ mangowm supports a variety of layouts that can be assigned per tag.
- `vertical_scroller` - `vertical_scroller`
- `vertical_grid` - `vertical_grid`
- `vertical_deck` - `vertical_deck`
- `tgmix` - `dwindle`
--- ---

View file

@ -558,7 +558,7 @@ bool client_is_in_same_stack(Client *sc, Client *tc, Client *fc) {
if (id != SCROLLER && id != VERTICAL_SCROLLER && id != TILE && if (id != SCROLLER && id != VERTICAL_SCROLLER && id != TILE &&
id != VERTICAL_TILE && id != DECK && id != VERTICAL_DECK && id != VERTICAL_TILE && id != DECK && id != VERTICAL_DECK &&
id != CENTER_TILE && id != RIGHT_TILE && id != TGMIX) id != CENTER_TILE && id != RIGHT_TILE)
return false; return false;
if (id == SCROLLER || id == VERTICAL_SCROLLER) { if (id == SCROLLER || id == VERTICAL_SCROLLER) {
@ -583,15 +583,6 @@ bool client_is_in_same_stack(Client *sc, Client *tc, Client *fc) {
return true; 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 (id == CENTER_TILE) {
if (tc->ismaster ^ sc->ismaster) if (tc->ismaster ^ sc->ismaster)
return false; return false;

View file

@ -707,8 +707,7 @@ void resize_tile_client(Client *grabc, bool isdrag, int32_t offsetx,
const Layout *current_layout = const Layout *current_layout =
grabc->mon->pertag->ltidxs[grabc->mon->pertag->curtag]; grabc->mon->pertag->ltidxs[grabc->mon->pertag->curtag];
if (current_layout->id == TILE || current_layout->id == DECK || if (current_layout->id == TILE || current_layout->id == DECK ||
current_layout->id == CENTER_TILE || current_layout->id == RIGHT_TILE || current_layout->id == CENTER_TILE || current_layout->id == RIGHT_TILE
(current_layout->id == TGMIX && grabc->mon->visible_tiling_clients <= 3)
) { ) {
resize_tile_master_horizontal(grabc, isdrag, offsetx, offsety, time, resize_tile_master_horizontal(grabc, isdrag, offsetx, offsety, time,

View file

@ -993,15 +993,4 @@ monocle(Monitor *m) {
} }
if ((c = focustop(m))) if ((c = focustop(m)))
wlr_scene_node_raise_to_top(&c->scene->node); 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;
}
}

View file

@ -11,7 +11,6 @@ static void vertical_overview(Monitor *m);
static void vertical_grid(Monitor *m); static void vertical_grid(Monitor *m);
static void vertical_scroller(Monitor *m); static void vertical_scroller(Monitor *m);
static void vertical_deck(Monitor *mon); static void vertical_deck(Monitor *mon);
static void tgmix(Monitor *m);
static void dwindle(Monitor *m); static void dwindle(Monitor *m);
/* layout(s) */ /* layout(s) */
@ -29,7 +28,6 @@ enum {
VERTICAL_GRID, VERTICAL_GRID,
VERTICAL_DECK, VERTICAL_DECK,
RIGHT_TILE, RIGHT_TILE,
TGMIX,
DWINDLE, DWINDLE,
}; };
@ -48,6 +46,5 @@ Layout layouts[] = {
{"VT", vertical_tile, "vertical_tile", VERTICAL_TILE}, // 垂直平铺布局 {"VT", vertical_tile, "vertical_tile", VERTICAL_TILE}, // 垂直平铺布局
{"VG", vertical_grid, "vertical_grid", VERTICAL_GRID}, // 垂直格子布局 {"VG", vertical_grid, "vertical_grid", VERTICAL_GRID}, // 垂直格子布局
{"VK", vertical_deck, "vertical_deck", VERTICAL_DECK}, // 垂直卡片布局 {"VK", vertical_deck, "vertical_deck", VERTICAL_DECK}, // 垂直卡片布局
{"TG", tgmix, "tgmix", TGMIX}, // 混合布局
{"DW", dwindle, "dwindle", DWINDLE}, {"DW", dwindle, "dwindle", DWINDLE},
}; };