diff --git a/hyprscrolling/README.md b/hyprscrolling/README.md index 02a7089..d2d089a 100644 --- a/hyprscrolling/README.md +++ b/hyprscrolling/README.md @@ -20,7 +20,7 @@ Adds a scrolling layout to Hyprland. | name | description | params | | --- | --- | --- | | move | move the layout horizontally, by either a relative logical px (`-200`, `+200`) or columns (`+col`, `-col`) | move data | -| colresize | resize the current column, to either a value or by a relative value e.g. `0.5`, `+0.2`, `-0.2` or cycle the preconfigured ones with `+conf` or `-conf` | relative float / relative conf | +| colresize | resize the current column, to either a value or by a relative value e.g. `0.5`, `+0.2`, `-0.2` or cycle the preconfigured ones with `+conf` or `-conf`. Can also be `all (number)` for resizing all columns to a specific width | relative float / relative conf | | movewindowto | same as the movewindow dispatcher but supports promotion to the right at the end | direction | | fit | executes a fit operation based on the argument. Available: `active`, `visible`, `all`, `toend`, `tobeg` | fit mode | | focus | moves the focus and centers the layout, while also wrapping instead of moving to neighbring monitors. | direction | \ No newline at end of file diff --git a/hyprscrolling/Scrolling.cpp b/hyprscrolling/Scrolling.cpp index 92e0cd1..7ce44ab 100644 --- a/hyprscrolling/Scrolling.cpp +++ b/hyprscrolling/Scrolling.cpp @@ -690,6 +690,19 @@ std::any CScrollingLayout::layoutMessage(SLayoutMessageHeader header, std::strin if (!WDATA) return {}; + if (ARGS[1] == "all") { + float abs = 0; + try { + abs = std::stof(ARGS[2]); + } catch (...) { return {}; } + + for (const auto& c : WDATA->column->workspace->columns) { + c->columnWidth = abs; + } + + return {}; + } + if (ARGS[1][0] == '+' || ARGS[1][0] == '-') { if (ARGS[1] == "+conf") { for (size_t i = 0; i < m_config.configuredWidths.size(); ++i) {