Add lshift + printscreen hotkey to take a screenshot of a window (or desktop portal on wayland)

This commit is contained in:
dec05eba
2025-07-20 01:55:02 +02:00
parent b64cb6a3fd
commit ad94cff59e
9 changed files with 107 additions and 18 deletions

View File

@@ -95,6 +95,11 @@ static void rpc_add_commands(gsr::Rpc *rpc, gsr::Overlay *overlay) {
fprintf(stderr, "rpc command executed: %s\n", name.c_str());
overlay->take_screenshot_region();
});
rpc->add_handler("take-screenshot-window", [overlay](const std::string &name) {
fprintf(stderr, "rpc command executed: %s\n", name.c_str());
overlay->take_screenshot_window();
});
}
static bool is_gsr_ui_virtual_keyboard_running() {