3
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2026-02-04 15:05:36 +00:00

config: support more than 1 window rule per rule line. (#11689)

Adds support for specifying multiple rules in one line
This commit is contained in:
ItsOhen
2025-09-26 00:33:58 +02:00
committed by GitHub
parent 7ce451d20c
commit d8f615751a
3 changed files with 119 additions and 165 deletions

View File

@ -228,6 +228,23 @@ static bool test() {
testSwapWindow();
NLog::log("{}Testing window rules", Colors::YELLOW);
if (!spawnKitty("wr_kitty"))
return false;
{
auto str = getFromSocket("/activewindow");
const int SIZE = 200;
EXPECT_CONTAINS(str, "floating: 1");
EXPECT_CONTAINS(str, std::format("size: {},{}", SIZE, SIZE));
EXPECT_NOT_CONTAINS(str, "pinned: 1");
}
NLog::log("{}Killing all windows", Colors::YELLOW);
Tests::killAllWindows();
NLog::log("{}Expecting 0 windows", Colors::YELLOW);
EXPECT(Tests::windowCount(), 0);
return !ret;
}

View File

@ -334,3 +334,6 @@ gesture = 3, horizontal, mod:ALT, workspace
gesture = 4, up, dispatcher, sendshortcut, ctrl, d, activewindow
windowrule = float, pin, class:wr_kitty
windowrule = size 200 200, class:wr_kitty
windowrule = unset pin, class:wr_kitty