sway: warp-on-scroll toggle

This commit is contained in:
sigboe
2023-06-07 15:25:59 +02:00
parent c5379fa52d
commit a67e692d4a
3 changed files with 12 additions and 0 deletions

View File

@ -326,11 +326,17 @@ bool Workspaces::handleScroll(GdkEventScroll *e) {
return true;
}
}
if (!config_["warp-on-scroll"].asBool()) {
ipc_.sendCmd(IPC_COMMAND, fmt::format("mouse_warping none"));
}
try {
ipc_.sendCmd(IPC_COMMAND, fmt::format(workspace_switch_cmd_, "--no-auto-back-and-forth", name));
} catch (const std::exception &e) {
spdlog::error("Workspaces: {}", e.what());
}
if (!config_["warp-on-scroll"].asBool()) {
ipc_.sendCmd(IPC_COMMAND, fmt::format("mouse_warping container"));
}
return true;
}