Commit Graph
15 Commits
Author SHA1 Message Date
Austin Horstman 64f70caa46 fix(niri): keep the initial IPC connect synchronous
#5158 (6672e924) moved connectToSocket() off the constructing thread and
into the detached IPC worker's own try/catch, so a missing NIRI_SOCKET no
longer throws out of IPC::IPC(). That was needed to fix #5117 (the worker
should reconnect instead of dying when an established stream drops), but
it also meant the very first connection attempt can never fail anymore.

Factory::makeModule()/Bar::getModules() rely on that constructor throwing
to disable a module it can't construct. With niri/workspaces and
niri/window always constructing successfully now, they get added to every
bar regardless of which compositor is actually running, showing up as a
permanently-empty widget next to the real workspace modules under
Hyprland/Sway.

Restore the old semantics for the first connection: connectToSocket() runs
synchronously in IPC::IPC() again, so a missing socket still throws and
the module gets disabled as before. Only a drop *after* that succeeds
falls into the retrying reconnect loop, preserving the #5117 fix.
2026-07-05 00:29:27 -05:00
Alex 6672e924df fix(niri): reconnect IPC and stop per-event throttling to prevent freeze
The niri IPC worker slept 1ms per event and never reconnected. Under an
event burst the per-event cap back-pressures the socket, niri fills its
send buffer and drops the stream; read_line then returns false, the
detached thread exits and the module freezes permanently.

Remove the per-event sleep so events drain as fast as they arrive, and
wrap the socket setup and read loop in a reconnect loop that backs off
and re-establishes the stream on drop. A running_ flag lets the thread
exit cleanly on teardown.

Fixes #5117.
2026-07-04 03:14:13 +02:00
sewaustav 9cd09c2569 feat(niri): add workspace-taskbar support
Adds a per-workspace app-icon taskbar (Workspace class) to the
niri/workspaces module. Rebased onto master: integrated with the
existing window-rewrite feature so the {windows} and {total} format
replacements continue to work alongside the new taskbar.
2026-07-04 01:50:16 +02:00
Abhijeet 9e10a9aec9 feat(niri/workspaces): add window icons via window-rewrite
Adds format-window-separator, window-rewrite and window-rewrite-default
options plus the {windows} format replacement to the niri/workspaces
module (rebased onto master; coexists with ignore-workspaces).
2026-07-04 01:42:23 +02:00
Alex 9f3e5c09a3 Merge remote-tracking branch 'origin/master' into pr-4537
# Conflicts:
#	include/modules/niri/workspaces.hpp
#	src/modules/niri/workspaces.cpp
2026-07-04 00:40:14 +02:00
Alex b9d5b3b4a2 Merge remote-tracking branch 'origin/master' into pr-5041
# Conflicts:
#	src/modules/niri/workspaces.cpp
2026-07-03 23:50:53 +02:00
Alex b7e5805f4b Merge remote-tracking branch 'origin/master' into RaphaelKimmig/master
# Conflicts:
#	include/modules/niri/workspaces.hpp
2026-07-03 22:11:34 +02:00
Jack Barnes 51becf2fbc feat(niri/workspaces): Add enable-bar-scroll option 2026-05-16 13:03:53 +08: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
Alex 47fb21a2c1 chore: upgrade to clang-format@21 2026-02-04 09:24:14 +01:00
Raphael Kimmig 85a8fca0de feat: allow sorting niri workspaces 2025-12-07 12:18:24 +01:00
Thomas Crha e1d4967d8e feat(niri/worspaces): add ignore-workspaces configuration option 2025-10-09 18:03:24 +11:00
workflow 862ba2f568 feat(niri/language): add CSS classes 2025-09-29 17:43:23 +03:00
Alex 1142979581 chore: lint 2024-09-13 09:43:19 +02:00
Ivan Molodetskikh 46e7ed35de Add niri/workspaces, niri/window, niri/language 2024-09-13 10:34:55 +03:00