From 37d65415920b1ca3132de5b1fd01c143b150a830 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Feb 2026 22:53:14 +0000 Subject: [PATCH 1/2] Initial plan From 49d4049ea3f347f207abafb03eea0bcd5f698838 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Feb 2026 22:55:05 +0000 Subject: [PATCH 2/2] Fix SIGABRT on USB unplug race condition in battery module Co-authored-by: Alexays <13947260+Alexays@users.noreply.github.com> --- src/modules/battery.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/battery.cpp b/src/modules/battery.cpp index 58a7f50e..bdf29ffb 100644 --- a/src/modules/battery.cpp +++ b/src/modules/battery.cpp @@ -139,7 +139,8 @@ void waybar::modules::Battery::refreshBatteries() { auto event_path = (node.path() / "uevent"); auto wd = inotify_add_watch(battery_watch_fd_, event_path.c_str(), IN_ACCESS); if (wd < 0) { - throw std::runtime_error("Could not watch events for " + node.path().string()); + spdlog::warn("Could not watch events for {} (device may have been removed)", node.path().string()); + continue; } batteries_[node.path()] = wd; }