From 6c03137610ff70623a22e786a072e89bee4e33e8 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 3 Jan 2025 22:35:49 +0100 Subject: Add option to disable hotkeys, add gsr-ui-cli tool to control gsr-ui remotely --- include/Config.hpp | 1 + include/Overlay.hpp | 2 ++ include/gui/GlobalSettingsPage.hpp | 2 ++ 3 files changed, 5 insertions(+) (limited to 'include') diff --git a/include/Config.hpp b/include/Config.hpp index 87d71dd..dcfdee1 100644 --- a/include/Config.hpp +++ b/include/Config.hpp @@ -43,6 +43,7 @@ namespace gsr { struct MainConfig { int32_t config_file_version = 0; bool software_encoding_warning_shown = false; + bool enable_hotkeys = true; std::string tint_color; }; diff --git a/include/Overlay.hpp b/include/Overlay.hpp index 596d0fc..e802cd0 100644 --- a/include/Overlay.hpp +++ b/include/Overlay.hpp @@ -58,6 +58,8 @@ namespace gsr { bool is_open() const; bool should_exit(std::string &reason) const; void exit(); + + const Config& get_config() const; private: void xi_setup(); void handle_xi_events(); diff --git a/include/gui/GlobalSettingsPage.hpp b/include/gui/GlobalSettingsPage.hpp index c55648b..06098f0 100644 --- a/include/gui/GlobalSettingsPage.hpp +++ b/include/gui/GlobalSettingsPage.hpp @@ -31,6 +31,7 @@ namespace gsr { private: std::unique_ptr create_appearance_subsection(ScrollablePage *parent_page); std::unique_ptr create_startup_subsection(ScrollablePage *parent_page); + std::unique_ptr create_hotkey_subsection(ScrollablePage *parent_page); std::unique_ptr