Skip to content

Conversation

@Brumus14
Copy link
Contributor

Describe your PR, what does it fix/add?

Implements #11818. Added bind flag (u) that makes the bind ignore the submap so it is active no matter the current submap.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

I updated syntax in the bind argument loop to remove {} as many cases are one liners, just checking that this is the correct style.
https://github.com/Brumus14/Hyprland/blob/71052a3850eebfae67275c60828a5efdfbde2d01/src/config/ConfigManager.cpp#L2568-L2601

Is it ready for merging, or does it need work?

Should be ready for merging.

vaxerski
vaxerski previously approved these changes Oct 24, 2025
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Tests and wiki MR needed

@cannedbeef
Copy link

About the {} removal, wouldn't that just be better as a switch?

@Brumus14
Copy link
Contributor Author

Yes think that would be a good idea will change it


// keybind works on default submap
OK(getFromSocket("/dispatch plugin:test:keybind 1,7,29"));
std::this_thread::sleep_for(std::chrono::milliseconds(50));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't sleep in tests. Runner VMs are very slow and unpredictable. Just don't rely on timings.

I don't think this sleep (and the one further down) is even needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did try removing the sleeping and the test failed, seemed like key press wasn't being registered because it was too fast but works fine not sleeping on the other key presses which is weird.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's touching a file and you check if the file exists, this is to be expected.
The socket call is async and so is the exec so without the sleep hyprtester just moves along and checks if the file exists before the file have been created.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, check for the file in a loop every x ms like 30 times

EXPECT_CONTAINS(getFromSocket("/submap"), "submap1");
OK(getFromSocket("/dispatch plugin:test:keybind 1,7,29"));
OK(getFromSocket("/dispatch plugin:test:keybind 0,7,29"));
EXPECT(waitCheckFlag(30, 5), true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you dont clear the flag beforehand, is that intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checkFlag() function already clears it though

@Brumus14
Copy link
Contributor Author

Brumus14 commented Nov 6, 2025

Just updated commit to change the name of the function I added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants