From 5410c6f061e149a849b6f9b8dfae1b6445304d28 Mon Sep 17 00:00:00 2001 From: rasmusq Date: Sat, 15 Nov 2025 22:11:01 +0100 Subject: [PATCH] initial layout setup and config learning --- src/layout/horizontal.h | 13 ++++++++++++- src/layout/layout.h | 8 +++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/layout/horizontal.h b/src/layout/horizontal.h index ff517cc..61c2468 100644 --- a/src/layout/horizontal.h +++ b/src/layout/horizontal.h @@ -782,6 +782,17 @@ void right_tile(Monitor *m) { } } +void dual_scroller(Monitor *m) { + Client *c = NULL; + wl_list_for_each(c, &clients, link) { + c->geom.x = m->w.x; + c->geom.y = m->w.y; + c->geom.width = m->w.width; + c->geom.height = m->w.height; + resize(c, c->geom, 0); + } +} + void // 17 monocle(Monitor *m) { Client *c = NULL; @@ -804,4 +815,4 @@ monocle(Monitor *m) { } if ((c = focustop(m))) wlr_scene_node_raise_to_top(&c->scene->node); -} \ No newline at end of file +} diff --git a/src/layout/layout.h b/src/layout/layout.h index 62a3227..23e5aba 100644 --- a/src/layout/layout.h +++ b/src/layout/layout.h @@ -12,6 +12,8 @@ static void vertical_grid(Monitor *m); static void vertical_scroller(Monitor *m); static void vertical_deck(Monitor *mon); +static void dual_scroller(Monitor *mon); + /* layout(s) */ Layout overviewlayout = {"󰃇", overview, "overview"}; @@ -27,6 +29,8 @@ enum { VERTICAL_GRID, VERTICAL_DECK, RIGHT_TILE, + + DUAL_SCROLLER, }; Layout layouts[] = { @@ -44,4 +48,6 @@ Layout layouts[] = { {"VT", vertical_tile, "vertical_tile", VERTICAL_TILE}, // 垂直平铺布局 {"VG", vertical_grid, "vertical_grid", VERTICAL_GRID}, // 垂直格子布局 {"VK", vertical_deck, "vertical_deck", VERTICAL_DECK}, // 垂直卡片布局 -}; \ No newline at end of file + + {"DS", dual_scroller, "dual_scroller", DUAL_SCROLLER}, // 垂直卡片布局 +};