Commit Graph

138 Commits

Author SHA1 Message Date
b8a985d606 style: fix formatting 2025-06-21 10:54:16 -04:00
7e845f506e sway workspace: fix workspace button not shown in nested layouts 2025-04-12 18:31:34 +03:00
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
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
90ac7d5d2c sway/workspaces: support ignore window-rewrite
Similar to hyprland implementation to ignore "" empty rules
2024-07-16 22:50:26 -05:00
9c40137d05 sway/workspaces: clang-tidy 2024-07-16 18:33:43 -05:00
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
08c5df3633 modules/sway/workspaces: clang-format fix 2024-06-09 13:05:47 -05:00
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
f75b2ae91f sway/workspaces: Fix scroll on unfocused monitor 2024-04-18 22:56:49 +02:00
133dfc2e85 Remove unused variable in Workspaces::updateWindows 2024-04-15 13:50:41 +02:00
a9088c7e7d fix: lint 2024-04-10 10:20:21 +02:00
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
7cd2a6c003 fix(sway/workspaces): Visible class doesn't work on visible and empty workspaces 2024-03-23 13:02:39 +01:00
38634a0ca8 Merge pull request #3034 from wispl/master
Add empty workspace style for Sway
2024-03-22 23:13:29 +01:00
c841bf567b fix(sway/workspaces): visible class doesn't work 2024-03-20 15:03:25 +01:00
cf3389e5d7 Add empty workspace style for Sway 2024-03-19 22:56:20 -04:00
cbe42a8536 Merge pull request #3037 from grimpy/fixperistentclass
Fix peristent class on buttons
2024-03-19 22:56:37 +01:00
856a34e16d Also consider floating nodes when checking for flags
Fixes #3030
2024-03-19 11:53:04 +01:00
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
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
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
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
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
ee2407496f Revert "Implement windows formating in sway/workspaces" 2024-02-19 23:28:08 +01:00
ae1e11db22 Merge pull request #2773 from grimpy/waybarwindows
Implement windows formating in sway/workspaces
2024-02-19 23:05:24 +01:00
d590d508ca feat: add module class to the root elements of the modules
Previously, the only way to select all the module labels was with the
following kind of selector:
```css
.modules-left > widget > label,
.modules-center > widget > label,
.modules-right > widget > label {
    /* ... */
}
```
(and a matching block for the `box` containers).

Now, this can be expressed as
```css
label.module, box.module {
    /* ... */
}
```
2024-02-14 22:41:13 -08:00
2f555a6936 refactor(bar): use Gtk enums for position and orientation
Ensure that the position and the corresponding CSS class on window are
always set.
2024-02-14 22:11:21 -08:00
c641d52e06 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-03 12:31:06 +02:00
4822f967b2 Sway/workspaces: fix persistent icon 2023-12-11 00:17:35 +07:00
c9e1899594 refactor: deprecate instead of remove persistent_workspaces 2023-09-05 16:02:45 -05:00
4a6c1269fb refactor!: sway persistent workspaces config name rename 2023-09-05 16:02:21 -05:00
05efdb74f0 format 2023-07-20 22:57:33 +03:00
d3bcff31e5 add high-priority-named optiion 2023-07-20 22:56:15 +03:00
d774de6c46 fix, default to true, sway/workspaces: warp-on-scroll 2023-07-08 21:32:19 +02:00
fc632f50ec fix: lint 2023-07-04 22:52:24 +02:00
12725f4418 Merge pull request #2220 from sigboe/warp-on-scroll-toggle
sway/workspaces: setting to not warp to window when scrolling
2023-07-04 22:42:53 +02:00
43434254e0 Add output port of workspace to template 2023-06-26 11:01:50 +02:00
62f4125927 change order 2023-06-08 23:31:14 +03:00
a67e692d4a sway: warp-on-scroll toggle 2023-06-07 15:49:11 +02:00
23f39938fb Revert "feat(sway): add workspace css class"
This reverts commit a10464d9bb.
2023-03-01 10:55:15 +01:00
8cc8820369 Merge pull request #2017 from pascal-huber/master 2023-03-01 09:43:44 +01:00
1af25094b7 Fix some typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2023-02-25 09:55:04 +01:00
a10464d9bb feat(sway): add workspace css class 2023-02-18 20:31:12 +01:00
ea17a66dfc fix: compilation errors with cpp_std=c++20
There were two main issues with fmtlib and C++20 mode:

 - `fmt::format` defaults to compile-time argument checking and requires
   using `fmt::runtime(format_string)` to bypass that.
 - `std::format` implementation introduces conflicting declarations and
   we have to specify the namespace for all `format`/`format_to` calls.
2023-01-20 22:50:02 -08:00
1938bb5d28 fix: lint 2023-01-04 16:26:50 +01:00
8b512e7b22 sway,feat: allow alphabetical sort
for users who do not utilize any form of "workspace prev/next" commands,
it can be very handle to sort the workspaces alphabetically.

this commit adds a new "alphabetical_sort" to the `sway/workspaces`
module which allows the module to alway sort workspaces alphabetically.

this docs are updated to warn the user of the implications involved.

Signed-off-by: Louis DeLosSantos <louis.delos@gmail.com>
2023-01-02 17:03:28 -05:00
51670f0506 Fix typo 2022-08-21 12:35:33 +08:00
f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
4a85ec0f59 fix: match sway workspace order with sway one
Ensure that sway workspaces are always displayed in the same order as
used internally by sway. The previous sorting code always sorted
unnumbered workspaces lexicographically. This isn't the order used by
sway internally. Therefore, commands such as "workspace next" might have
jumped arbitrarily in waybar.

This commit reworks the sorting code such that the internal order is
always obeyed. Additionally, numbered persistent workspaces are inserted
at their natural position at the front of the workspace list while
unnumbered ones are appended. This should match the expectations of
workspace ordering known from sway's behavior.

The changes make the configuration property "numeric-first" unnecessary
as this will always be the case now. There's also no reasonable way
around this behavior now. Otherwise, persistent workspaces would jump
around in the visual representation as soon as they become known to
sway.

Fixes #802
2022-01-07 10:26:27 +01:00