Commit Graph

4385 Commits

Author SHA1 Message Date
Austin Horstman
6dfe1c3111 feat(util): add ScopedFd RAII utility for file descriptors
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-02 08:21:12 -06:00
Austin Horstman
04ddc5fd23 chore(test-hyprland): remove unused IPC test fixture
The hyprland IPC fixture was no longer used by the current test setup.

I removed the dead fixture so the test code reflects the actual execution path
and is easier to maintain.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-02 08:17:29 -06:00
Austin Horstman
87a5b7ed0f test(hyprland): add failure-path fd-leak coverage
Hyprland tests did not explicitly verify descriptor behavior on key failure
paths.

I added focused tests for missing instance signature and connect-failure paths
that assert file descriptor counts stay stable across repeated attempts.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-02 08:17:29 -06:00
Austin Horstman
d0363313b8 fix(hyprland-ipc): harden fd lifecycle and listener loop
Hyprland IPC had fd lifecycle risks on failure/shutdown paths and used a
spin-sleep listener model.

I initialized fd state defensively, tightened connect/close/shutdown handling,
moved to blocking read with newline framing, and added RAII-style fd cleanup in
socket1 reply paths.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-02 08:09:44 -06:00
Alexis Rouillard
fd086d0f33 Merge pull request #4890 from khaneliman/bugfix/perf-001-safe-signal-bounded-queue
fix(util): bound SafeSignal queue growth under burst load
2026-03-01 18:19:25 +01:00
Alexis Rouillard
47b2dfc6db Merge pull request #4889 from khaneliman/bugfix/stab-001-002-sleeper-thread
fix(util): ensure SleeperThread lifecycle safety and thread sync
2026-03-01 18:19:03 +01:00
Austin Horstman
e4ff024fa8 fix(util): bound SafeSignal queue growth under burst load
SafeSignal could queue events forever when worker threads emitted faster than
the main loop could consume, which risks memory growth and stale updates.

I added a queue cap with a drop-oldest policy so growth stays bounded under
burst load, plus a regression test that validates bounded delivery.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-02-28 22:57:49 -06:00
Austin Horstman
864523772d test(utils): stress SleeperThread wake and stop control flow
SleeperThread concurrency paths needed stress coverage around wake/stop races.

I added a subprocess stress test that repeatedly interleaves wake_up() and
stop() and verifies the worker exits cleanly.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-02-28 22:47:52 -06:00
Austin Horstman
44eed7afea fix(sleeper-thread): synchronize control flags with atomics
SleeperThread control flags were shared across threads without consistent
synchronization.

I converted the run/signal flags to atomics and updated wait predicates and
lifecycle transitions to use explicit atomic loads/stores.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-02-28 22:47:52 -06:00
Austin Horstman
1c61ecf864 test(utils): add SleeperThread reassignment regression
We needed a regression test for reassignment safety after lifecycle fixes.

I added a subprocess test that reassigns SleeperThread workers and verifies the
process exits normally instead of terminating.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-02-28 22:47:52 -06:00
Austin Horstman
dbbad059f7 fix(sleeper-thread): stop and join before worker reassignment
Reassigning SleeperThread could replace a joinable std::thread and trigger
std::terminate.

I now stop and join any existing worker before reassignment, then reset control
state before starting the replacement worker.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-02-28 22:28:22 -06:00
Alexis Rouillard
31b373b984 Merge pull request #4888 from Alexays/copilot/fix-waybar-deadlock-issue
[WIP] Fix waybar responsiveness and interaction issues
2026-02-28 15:29:02 +01:00
copilot-swe-agent[bot]
d5297bc424 fix: resolve PulseAudio/WirePlumber deadlock and freeze issues
- Fix AudioBackend destructor: properly lock the PA mainloop before
  disconnecting the context to prevent race conditions with PA callbacks

- Fix context leak on reconnect: call pa_context_unref() when the old
  context is replaced after PA_CONTEXT_FAILED to avoid resource leaks

- Fix PA mainloop killed on reconnect (critical): PA_CONTEXT_TERMINATED
  was unconditionally calling quit() on the mainloop, even during
  reconnection when the old context fires TERMINATED after the new one
  was created. This was killing the new context and preventing successful
  reconnection, causing Waybar to appear frozen. The fix only quits
  the mainloop when the terminating context is still the active one.

- Fix Wireplumber use-after-free: explicitly disconnect GObject signal
  handlers for mixer_api_, def_nodes_api_, and om_ before clearing the
  object references in the destructor to prevent callbacks from firing
  with a destroyed self pointer.

- Fix GVariant memory leak in Wireplumber::handleScroll: unref the
  GVariant created for the set-volume signal after the emit call.

Co-authored-by: Alexays <13947260+Alexays@users.noreply.github.com>
2026-02-28 14:27:22 +00:00
copilot-swe-agent[bot]
c504b7f437 Initial plan 2026-02-28 14:00:25 +00:00
Alex
7744320ab2 fix: build 2026-02-24 00:55:27 +01:00
Alex
802bf184fb fix: lint 2026-02-24 00:49:23 +01:00
Alex
ef3d55980e fix: some crashes 2026-02-24 00:49:08 +01:00
Alexis Rouillard
a32413a74f Merge pull request #4880 from Alexays/copilot/fix-mpd-module-crash
mpd: fix socket FD leak on system-level connection errors
2026-02-24 00:06:11 +01:00
copilot-swe-agent[bot]
82f076c6c2 mpd: fix FD leak by resetting connection on MPD_ERROR_SYSTEM errors
Co-authored-by: Alexays <13947260+Alexays@users.noreply.github.com>
2026-02-23 23:04:36 +00:00
Alex
e18939210b fix: lint 2026-02-24 00:00:57 +01:00
Alexis Rouillard
aacf0cbc99 Merge pull request #4881 from Alexays/copilot/fix-sigabrt-usb-unplug-issue
battery: fix SIGABRT on USB device unplug race condition
2026-02-24 00:00:19 +01:00
Alexis Rouillard
3e2a50d59f Merge pull request #4879 from Alexays/copilot/fix-waybar-bluetooth-crash
bluetooth: fix segfault when DBus manager fails to initialize
2026-02-23 23:58:51 +01:00
copilot-swe-agent[bot]
49d4049ea3 Fix SIGABRT on USB unplug race condition in battery module
Co-authored-by: Alexays <13947260+Alexays@users.noreply.github.com>
2026-02-23 22:55:05 +00:00
copilot-swe-agent[bot]
0c46818e95 Fix crash when bluetooth DBus manager returns null on timeout
Co-authored-by: Alexays <13947260+Alexays@users.noreply.github.com>
2026-02-23 22:54:23 +00:00
copilot-swe-agent[bot]
37d6541592 Initial plan 2026-02-23 22:53:14 +00:00
copilot-swe-agent[bot]
65fadcf94b Initial plan 2026-02-23 22:52:00 +00:00
copilot-swe-agent[bot]
f806ec03ed Initial plan 2026-02-23 22:51:45 +00:00
Alexis Rouillard
64ecdcfa87 Merge pull request #4846 from BlueManCZ/fix-mpris-fallback-player
fix(mpris): fall back to next non-ignored player and prefer playing players
2026-02-23 23:51:04 +01:00
Alexis Rouillard
4aa8f98552 Merge pull request #4821 from cebem1nt/group-scroll-cutout
fix: owerwrite handleScroll to remove any scrolling handling from group
2026-02-23 23:46:02 +01:00
Alexis Rouillard
730e558cf4 Merge pull request #4834 from khaneliman/niri
feat(niri): niri depends on socket
2026-02-23 23:43:30 +01:00
Alexis Rouillard
22fd2da40e Merge pull request #4836 from Cprakhar/fix/tooltip-return-type-in-format-strings
feat: add `{tooltip}` in format replacements in custom module
2026-02-23 23:26:07 +01:00
Alexis Rouillard
6fa8ad3430 Merge pull request #4849 from 44vladimirov/power_switch_events
battery: power switch events
2026-02-22 18:32:08 +01:00
Alexis Rouillard
54e7451cf0 Merge pull request #4856 from Cprakhar/feat/tooltip-format-cpu
feat: add tooltip-format config option in cpu module
2026-02-20 17:36:17 +01:00
Austin Horstman
ae60ca6233 refactor(niri): declared constructor
Move constructor from hpp to cpp to align with other modules

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-02-20 08:16:56 -06:00
Austin Horstman
a194b576be feat(niri): niri depends on socket
Don't attempt to use niri modules when socket connection fails. Prevents
rendering modules when running another compositor. In same concept as
previous Hyprland change
4295faa7c4

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-02-20 08:16:56 -06:00
Alexis Rouillard
d31b131f80 Merge pull request #4874 from GG2R10/fix/cava-silence-fix
fix(cava): remove silent CSS class on reactivation
2026-02-19 21:55:22 +01:00
GG2R10
9c871c90a7 fix: move silence_ = false inside idle lambda 2026-02-19 15:12:23 -05:00
Alexis Rouillard
a74adc54e5 Merge pull request #4863 from olliestone/fix-aappiconlabel-image-visibility
fix: ensure AAppIconLabel image remains not visibile if icons are disabled
2026-02-18 20:47:27 +01:00
Alexis Rouillard
14a30cd4b7 Merge pull request #4869 from cebem1nt/master
bump: niri/workspaces: change icons priority
2026-02-17 15:45:35 +01:00
cebem1nt
f1140f00f9 niri/workspaces: change icons priority 2026-02-17 11:23:27 -03:00
Ollie Stone
6f9dee979b fix: ensure AAppIconLabel image remains not visibile if icons are
disabled
2026-02-15 18:39:28 +00:00
Alexis Rouillard
e4e47cad5c Merge pull request #3088 from VAWVAW/hyprland-bar-scroll
hyprland/workspaces: Add `enable-bar-scroll` option
2026-02-13 23:43:12 +01:00
Alexis Rouillard
01628dda85 Merge pull request #4852 from tobixen/fix/keyboard-state-hotplug-crash
fix(keyboard-state): fix segfault on device hotplug removal
2026-02-13 23:27:05 +01:00
Alexis Rouillard
9e57d75fe5 Merge pull request #4854 from sliedes/ipc-safesignal
fix: use SafeSignal in ipc in order to not call GTK funcs from a thread
2026-02-13 23:26:46 +01:00
Prakhar Chhalotre
2337d308ce Merge branch 'master' into feat/tooltip-format-cpu 2026-02-14 03:28:29 +05:30
Alexis Rouillard
fc4e2a3534 Merge pull request #4857 from Cprakhar/fix/pango-markup-all
fix: use pango markup for consistent formatting in format and tooltip-format
2026-02-13 22:44:49 +01:00
Alexis Rouillard
a3d7902337 Merge pull request #4858 from chrisvittal/memory-module/tooltip-markup
memory: use markup rather than text for memory tooltip
2026-02-13 22:44:24 +01:00
vawvaw
5b595a4dfe hyprland/workspaces: Add enable-bar-scroll option 2026-02-13 20:48:59 +01:00
Chris Vittal
e0e36b6d81 memory: use markup rather than text for memory tooltip
Seems a little strange to me that we can format the tooltip text, but
can't use markup like we can elsewhere.
2026-02-13 14:17:48 -05:00
Prakhar Chhalotre
3e7976c8eb fix: use pango markup for consistent formatting in format and tooltip-format 2026-02-13 02:23:16 +05:30