Can now flip the floating rule on and off

This commit is contained in:
2025-06-10 15:45:25 +02:00
parent ee3cddc7ca
commit d1a2ef710f
3 changed files with 21 additions and 72 deletions

View File

@@ -57,5 +57,14 @@ void HyprlandService::setClientTiled(Client& c) {
}
void HyprlandService::toggleClientFloating(Client& c) {
exec("/usr/bin/hyprctl dispatch togglefloating address:" + c.address);
exec(HYPRCTL_BINARY " dispatch togglefloating address:" + c.address);
};
void HyprlandService::setFloatingRule(bool b) {
if (b) {
exec(SET_FLOATING_RULE);
}
else {
exec(REMOVE_FLOATING_RULE);
}
};