Commit Graph
278 Commits
Author SHA1 Message Date
Alexis Rouillard bbf6af23e7 Merge branch 'master' into output-classes 2026-07-03 22:22:04 +02:00
Alexis Rouillard ac08a7e856 Merge branch 'master' into codex-label-update-hotpath 2026-07-03 21:47:47 +02:00
Alexis Rouillard 778ef49efd Merge branch 'master' into sayrus-gh/sway-workspaces-markup 2026-07-03 21:30:59 +02:00
Alexis Rouillard c43f9f25b8 Merge pull request #5039 from mil-ad/fix/sway-language-flag-disappears
fix(sway/language): keep flag visible across hot-plug and unknown layouts
2026-07-03 21:00:52 +02:00
Alexis Rouillard c8bcbfb057 Merge pull request #5072 from Lege19/master
(Fix) (sway workspace module) persistent workspaces always removed
2026-07-03 20:59:05 +02:00
Alexis Rouillard fa79b931e9 Merge branch 'master' into sayrus-gh/sway-workspaces-quotes 2026-07-03 20:45:01 +02:00
Alexey Ivanov 2190871a68 perf(label): skip redundant markup updates 2026-06-04 15:18:43 -07:00
jacobs ec2651370e (Fix) (sway workspace module) persistent workspaces always removed 2026-05-26 11:09:45 +01:00
Milad Alizadeh 0ec6d06472 Guard set_current_layout against unknown layout names (wtype, hot-plugged
devices) so transient events stop blanking layout_. Refresh layouts_map_
on "added"/"xkb_keymap" input events and union layouts across all
keyboards so new devices contribute their layouts. Release mutex_ before
the refresh sendCmd to avoid self-deadlock from the synchronous
signal_cmd emit.
2026-05-15 17:29:21 +01:00
Alexis Rouillard 100d4ec4a4 Merge pull request #4891 from khaneliman/bugfix/stab-003-test-001-hyprland-ipc
fix(hyprland-ipc): harden fd lifecycle and listener loop
2026-03-04 22:41:30 +01: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
Austin Horstman 8d22d3e07a refactor(sway): use shared ScopedFd for IPC sockets
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-02 08:23:06 -06:00
Prakhar Chhalotre 3e7976c8eb fix: use pango markup for consistent formatting in format and tooltip-format 2026-02-13 02:23:16 +05:30
Alex 47fb21a2c1 chore: upgrade to clang-format@21 2026-02-04 09:24:14 +01:00
Mathis Raguin c2a038c222 fix(sway/workspaces): escape markup in workspace if enabled 2025-12-31 16:16:38 +01:00
Mathis Raguin da4367df2f fix(sway/workspaces): use number when available to avoid parsing issues 2025-12-31 15:40:31 +01:00
Mathis Raguin 0a5da13fbf fix(workspaces/sway): handle workspaces with quotes 2025-12-31 15:28:10 +01:00
mliszcz e362550e27 fix(sway/workspaces): window-rewrite: do not check for window-format
Remove check for unused window-format option.

Fixes #3797.
2025-12-02 17:19:44 +01:00
xb-bx 4d74bb3004 sway/workspaces: implement reverse-scroll 2025-07-07 14:17:18 +03:00
Alexis Rouillard cbdbc492bb Merge pull request #4097 from RobertMueller2/sway-window-marks
feat: sway/window: provide {marks} format replacement
2025-06-22 08:43:27 +01:00
Alexis Rouillard 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
peelz b8a985d606 style: fix formatting 2025-06-21 10:54:16 -04:00
burbschat d6f9dc911a Apply format according to .clang-format 2025-06-14 22:59:32 +09:00
burbschat 9b6590b972 Add CSS classes for sway workspace indicators depending on associated output
Allows for different styles of workspace indicators (buttons) depending
on the output the workspace is located at.
Using this one can for example color the indicators depending on the
output making it easy to infer on which output a workspace is located.

Example config:

"sway/workspaces": {
    "all-outputs": true,
    "format": "{name}",
    "output-classes": {
        "DP-1": "output1",
        "LVDS-2": "output2"
    }
}

Example CSS:

#workspaces button.output1{
    background-color: green;
}
#workspaces button.output2{
    background-color: blue;
}
2025-06-14 22:40:58 +09:00
Rene D. Obermueller f4b68f41e6 feat: sway/window: provide {marks} format replacement 2025-05-04 07:50:28 +02:00
Almarhoon Ibraheem 7e845f506e sway workspace: fix workspace button not shown in nested layouts 2025-04-12 18:31:34 +03:00
Torstein Husebø 6004316f1a Fix typos in function, variable names and in documentation 2025-01-16 13:25:19 +01:00
Carlo Teubner 8e276bb3f6 sway: fix "Mapping is not an object" warning
Fixes #3763.

Also a little code simplications while we're at it.
2024-12-17 22:05:16 +00:00
Jan Larres 4e05659109 sway/workspaces: use X11 class for XWayland windows
When using `window-rewrite`, the `class<>` rule would previously only
match against the `app_id` of a window. However, XWayland windows don't
have an app ID.

This change falls back to checking the `class` window property if there
is no app ID to support matching against XWayland windows.
2024-12-01 12:48:07 +13:00
Austin Horstman 90ac7d5d2c sway/workspaces: support ignore window-rewrite
Similar to hyprland implementation to ignore "" empty rules
2024-07-16 22:50:26 -05:00
Austin Horstman 9c40137d05 sway/workspaces: clang-tidy 2024-07-16 18:33:43 -05:00
Austin Horstman 17132b250d sway/workspaces: remove deprecated field
Was deprecated a long time ago, we removed the Hyprland version.
Removing this, as well.
2024-07-16 18:33:43 -05:00
Austin Horstman 08c5df3633 modules/sway/workspaces: clang-format fix 2024-06-09 13:05:47 -05:00
Peter Jones 637b220f82 sway/workspaces: Correct behavior when "current-only" is set
The `current-only` workspace setting should display only the active
workspace name as determined by its `focused` attribute.  However,
according to the `get_tree` output, workspaces that contain a focused
window will report `"focused": false` and the window will report
`"focused": true.` In this case, Waybar will not display a workspace
name at all.

This change updates the logic for determining if a workspace is
focused by also looking for a focused window.
2024-06-06 15:29:33 -07:00
vawvaw f75b2ae91f sway/workspaces: Fix scroll on unfocused monitor 2024-04-18 22:56:49 +02:00
Raphael Nestler 133dfc2e85 Remove unused variable in Workspaces::updateWindows 2024-04-15 13:50:41 +02:00
Alex a9088c7e7d fix: lint 2024-04-10 10:20:21 +02:00
kvark 9b4fc6d16b fix(sway/workspaces): floating_nodes and focused icon
Floating nodes are not taken into account for visible and empty workspaces

And fix focused icon (#3095)
2024-03-31 21:53:56 +07:00
Mauro Guida 7cd2a6c003 fix(sway/workspaces): Visible class doesn't work on visible and empty workspaces 2024-03-23 13:02:39 +01:00
Alexis Rouillard 38634a0ca8 Merge pull request #3034 from wispl/master
Add empty workspace style for Sway
2024-03-22 23:13:29 +01:00
Mauro Guida c841bf567b fix(sway/workspaces): visible class doesn't work 2024-03-20 15:03:25 +01:00
wispl cf3389e5d7 Add empty workspace style for Sway 2024-03-19 22:56:20 -04:00
Alexis Rouillard cbe42a8536 Merge pull request #3037 from grimpy/fixperistentclass
Fix peristent class on buttons
2024-03-19 22:56:37 +01:00
hrdl 856a34e16d Also consider floating nodes when checking for flags
Fixes #3030
2024-03-19 11:53:04 +01:00
Jo De Boeck 2ffd9a94a5 Fix peristent class on buttons
Fixes: #3009

Signed-off-by: Jo De Boeck <deboeck.jo@gmail.com>
2024-03-19 08:22:33 +02:00
Jo De Boeck 7b3d155608 Fix peristant workspaces for sway
Fixes: #2998

Signed-off-by: Jo De Boeck <deboeck.jo@gmail.com>
2024-03-12 04:40:54 +02:00
Erik Reider 9de0e393ab Sway-Workspaces: Fixed scrolling not working
Fixes regression in bb843e0 that caused scrolling over the bar not working
2024-03-02 23:08:21 +01:00
Jo De Boeck 5a887fe1ef Filter out special output __i3 which contains scratchpad
Fixes: #2966

Signed-off-by: Jo De Boeck <deboeck.jo@gmail.com>
2024-02-27 23:43:00 +02:00
Aleksei Bavshin 188789592e feat(sway/language): option to hide module with single layout 2024-02-24 00:30:45 -08:00
Jo De Boeck bb843e0494 Implement windows formating in sway/workspaces
This implementation mimics to some extend the implementation of hyprland

Signed-off-by: Jo De Boeck <deboeck.jo@gmail.com>
2024-02-20 19:12:26 +02:00