Commit Graph
187 Commits
Author SHA1 Message Date
Austin Horstman dd47a2b826 fix(hyprland/workspaces): stabilize reload and event handling
Hyprland workspace reloads could stack duplicate scroll-event connections,
causing a single wheel gesture to switch multiple workspaces after repeated
config reloads. The persistent-workspaces monitor-array form also created the
monitor name instead of the configured workspace name.

Disconnect and replace the scroll handler on reinit, fix the persistent
workspace name selection, normalize urgent-window address matching, and reject
malformed workspace payloads before they corrupt the local state machine.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-07 21:06:30 -06:00
Austin Horstman fe03dfaa3b perf(memory): eliminate deep copies in range-based for loops and lambdas
This commit addresses memory churn caused by implicit deep copies during traversal and allocation of complex structures:

- Replaced pass-by-value 'Json::Value' in std::ranges and range-based for loops with 'const auto&' or 'const Json::Value&' in Hyprland modules, preventing large JSON tree duplications on every update.

- Fixed implicit string and pair copies in UPower and CPU Frequency loops by converting 'auto' to 'const auto&' where possible.

- Added 'std::vector::reserve' calls before 'push_back' loops in MPRIS, Niri, and CFFI modules to prevent exponential vector reallocation during initialization.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-02 22:54:07 -06:00
Austin Horstman 4c71b2bf9f perf(memory): optimize C++ string operations to reduce heap fragmentation
- Replaced pass-by-value std::string parameters with const std::string&
or std::string_view to prevent SSO overallocations.

- Refactored static mapping functions in UPower to return
std::string_view instead of constructing std::string literals, enabling
perfect cache locality.

- Optimized string concatenation in hot loops (network IPs, inhibitor
lists, sway window marks) by using std::string::append() and
pre-reserving capacity instead of overloaded operator+ which produces
temporary heap instances.

These optimizations reduce high-frequency memory churn and overall heap
fragmentation within the main rendering loops.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-02 22:54:07 -06:00
Alex e18939210b fix: lint 2026-02-24 00:00:57 +01:00
vawvawandvaw 5b595a4dfe hyprland/workspaces: Add enable-bar-scroll option 2026-02-13 20:48:59 +01:00
Alex 39e59e557f fix: double free / uncatched errors 2026-02-04 09:47:00 +01:00
Alex 47fb21a2c1 chore: upgrade to clang-format@21 2026-02-04 09:24:14 +01:00
zjeffer 8f5fc990a5 hyprland/workspaces: don't show persistent special workspaces if show-special is disabled 2026-01-10 13:29:40 +01:00
Alexis RouillardandGitHub a16d53b30d Merge branch 'master' into fix/zjeffer/thread-sanitizer-warning 2025-10-05 10:51:47 +02:00
Alexis RouillardandGitHub 4f16ec16f9 Merge pull request #4395 from pol-rivero/workspace-taskbar-improvements
[hyprland/workspaces] Taskbar improvements
2025-10-01 14:27:13 +02:00
Pol Rivero 45d01ce6e5 Implement "active-window-position" 2025-08-18 21:23:36 +02:00
Pol Rivero 691b7d427b Implement "reverse-direction" 2025-08-18 20:49:14 +02:00
zjeffer 5079884b78 Hyprland IPC improvements, fix tsan warning, WindowCount shouldn't create a separate IPC 2025-08-12 19:39:36 +02:00
Skylar Abruzese 64b64d0316 Moved workspace id failing to parse from an error to part of the trace.
With named persistent workspaces it is expected behavior that they have
no id since their workspace may not have been created by hyprland yet.
2025-08-09 18:33:35 -04:00
Pol Rivero 5bbace1d43 Merge remote-tracking branch 'upstream/master' 2025-07-29 23:30:44 +02:00
peelz b4d95b405c style: clang-format 2025-07-20 22:40:29 -04:00
arnaud-ma 8dcdd97879 small fixes 2025-07-19 05:01:29 +02:00
arnaud-ma 2dc2b5ccfd fix #4307 2025-07-19 04:50:59 +02:00
arnaud-ma a4f200cdb5 revert 2025-07-19 04:47:31 +02:00
arnaud-ma 64ed2cd970 fix indentation 2025-07-19 03:23:32 +02:00
arnaud-ma e45883088d hyprland: Remove redundant workspace rules loading 2025-07-19 03:18:48 +02:00
Alexis RouillardandGitHub 94777921d9 Merge pull request #4272 from labruzese/master
fix: hyprland named persistent workspaces
2025-07-13 09:07:26 +02:00
Andy Carlson fd67002662 fix: prevent persistent workspaces from being duplicated if they exist under a different name 2025-07-06 23:11:00 -04:00
Pol Rivero c98cb7095d Merge remote-tracking branch 'upstream/master' 2025-07-06 10:18:59 +02:00
Skylar Abruzese 6d3b93bbf7 fix: added active workspace matching by name as fallback
fixes bug where persistent workspaces would not be marked as active
because their id is based on creation time by hyprland and thus we can't
consistently match the id's without constantly changing them (this would
also cause issues with workspace sorting).
2025-07-03 18:48:04 -04:00
Skylar Abruzese 9ef6dc7380 fix: hyprland named persistent workspaces
allowed persistent workspaces to be defined with names instead of just
id's
2025-07-03 17:44:37 -04:00
Alex ee91d18ad9 fix: lint 2025-06-22 10:01:36 +02:00
Alexis RouillardandGitHub 77b42105a6 Merge pull request #4136 from Roc25/special-centered
hyprland workspaces: Add sorting Special Centered
2025-06-22 08:57:12 +01:00
Alexis RouillardandGitHub 71c6c6032b Merge pull request #4133 from Roc25/persistent-only
Add persistent-only setting for hyprland/workspaces
2025-06-22 08:50:33 +01:00
Alexis RouillardandGitHub 6206cebd75 Merge pull request #3887 from torstehu/fix-typo
Fix typos in function, variable names and in documentation
2025-06-22 08:39:23 +01:00
gred 715503ec3e Rename vector to hiddenWorkspaces 2025-06-07 10:50:29 +03:00
gred 15f54cd6ef Fix hidden buttons 2025-05-21 01:38:03 +03:00
gred 24a30b7ffd Add sorting with centered special workspaces 2025-05-21 01:01:23 +03:00
gred 4f55d7da90 Add persistent-only setting for hyprland/workspaces 2025-05-20 23:00:09 +03:00
Pol Rivero 4ae2b6f1ba Implement ignore-list 2025-05-02 15:48:34 +02:00
Pol Rivero c9215ad818 Minor code cleanup 2025-05-02 14:29:44 +02:00
Pol Rivero 61c5dad895 Fix some windows not being marked as active when opened
In some cases, the active event is arriving before the create event. We need to store the currently active address and initialize the windows accordingly
2025-05-01 21:03:46 +02:00
Pol Rivero 998fd7a192 Fix window title not being updated properly 2025-05-01 20:51:12 +02:00
Pol Rivero 72404a77f0 Initial implementation of active window
TODO:
- Sometimes the active event arrives before the create, in which case the window is not activated.
- The window title event also looks unreliable in some cases, will need to investigate
2025-05-01 20:22:34 +02:00
Pol Rivero 4222032fa1 Merge remote-tracking branch 'upstream/master' 2025-04-29 19:59:42 +02:00
Austin Horstman 91ef6e51ed hyprland/workspaces: range find lint cleanup 2025-04-03 23:31:18 -05:00
Austin Horstman c5bc3bc59a hyprland/workspaces: fix crash 2025-04-03 23:31:14 -05:00
Pol Rivero e541936df9 Merge remote-tracking branch 'upstream/master' 2025-03-08 17:18:31 +01:00
Matthew White f7b4451564 fix(hyprland): support additional v2 events 2025-03-04 10:23:19 -07:00
Matt WhiteandMatthew White 17cee0d876 feat(hyprland): support workspacev2 2025-02-26 18:56:11 -07:00
Matt WhiteandMatthew White 0c6ca8321c feat(hyprland): support destroyworkspacev2 2025-02-26 18:56:11 -07:00
Matt WhiteandMatthew White 26a344b131 feat(hyprland): support createworkspacev2 2025-02-26 18:56:11 -07:00
Alexis RouillardandGitHub fe3dda4c23 Merge pull request #3932 from rokiden/fix-urgent-special
hyprland/workspaces: fixed urgent for special workspaces
2025-02-20 09:11:07 +01:00
Alexis RouillardandGitHub 0d8d42573b Merge pull request #3945 from zjeffer/fix/zjeffer/hyprland-ipc
Hyprland IPC improvements
2025-02-20 09:10:26 +01:00
zjeffer bcee548f5e Fix workspacerules not taking into account defaultName 2025-02-20 00:06:05 +01:00