From 2309270752383be30857d9c15cd3e259c4e6ed58 Mon Sep 17 00:00:00 2001 From: nyx Date: Mon, 31 Mar 2025 12:06:17 -0400 Subject: anr: add config for ping number before popup shows up (#9782) * anr: make pings configurable makes the pings of the dialog popup configurable --- src/config/ConfigDescriptions.hpp | 6 ++++++ src/config/ConfigManager.cpp | 1 + 2 files changed, 7 insertions(+) (limited to 'src/config') diff --git a/src/config/ConfigDescriptions.hpp b/src/config/ConfigDescriptions.hpp index 3e9563ee..234c3743 100644 --- a/src/config/ConfigDescriptions.hpp +++ b/src/config/ConfigDescriptions.hpp @@ -1223,6 +1223,12 @@ inline static const std::vector CONFIG_OPTIONS = { .type = CONFIG_OPTION_BOOL, .data = SConfigOptionDescription::SBoolData{true}, }, + SConfigOptionDescription{ + .value = "misc:anr_missed_pings", + .description = "number of missed pings before showing the ANR dialog", + .type = CONFIG_OPTION_INT, + .data = SConfigOptionDescription::SRangeData{1, 1, 10}, + }, /* * binds: diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 276e6db0..9fae42e1 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -460,6 +460,7 @@ CConfigManager::CConfigManager() { registerConfigVar("misc:disable_hyprland_qtutils_check", Hyprlang::INT{0}); registerConfigVar("misc:lockdead_screen_delay", Hyprlang::INT{1000}); registerConfigVar("misc:enable_anr_dialog", Hyprlang::INT{1}); + registerConfigVar("misc:anr_missed_pings", Hyprlang::INT{1}); registerConfigVar("group:insert_after_current", Hyprlang::INT{1}); registerConfigVar("group:focus_removed_window", Hyprlang::INT{1}); -- cgit v1.2.3