lxqt-panel icon indicating copy to clipboard operation
lxqt-panel copied to clipboard

[Feature request] Workspace switcher: implement ext-work-workspace protocol

Open stefonarch opened this issue 1 year ago • 10 comments

As cosmic-workspace-unstable-v1 is merged in labwc and will be in 0.8.1 a labwc backend could be created, enabling the workspace switcher.

EDIT: fixed link

stefonarch avatar Oct 04 '24 19:10 stefonarch

I recently investigated Wayland and found: https://wayland.app/protocols/

I think we shouldn't be too broad with supporting protocols.

isf63 avatar Oct 04 '24 19:10 isf63

Reality is: waybar and sfwbar (screenshot below) do it already, and as we support already the correspondent KDE protocol https://github.com/lxqt/lxqt-panel/tree/master/panel/backends/wayland/protocols I see no reason for excluding it as it will add functionality for labwc.

From the (fixed) link:

but version 1 of the cosmic-workspaces protocol is basically the same as what is proposed in the upstream protocol.

image

stefonarch avatar Oct 04 '24 20:10 stefonarch

If waybar and swfbar do it, then it should be quite easy. We can use their code as a reference. If the license is compatible, then we might be able to borrow it (with attribution, of course) directly.

marcusbritanicus avatar Oct 05 '24 15:10 marcusbritanicus

If waybar and swfbar do it, then it should be quite easy. We can use their code as a reference. If the license is compatible, then we might be able to borrow it (with attribution, of course) directly.

Actually I didn't manage to make it work on waybar (it complained always about "module cosmic/workspaces not found"). Sfwbar with default config works out of the box.

stefonarch avatar Oct 05 '24 17:10 stefonarch

https://gitlab.freedesktop.org/wayland/wayland-protocols/-/commit/605436b591729f70fb319fafbe3414657696841d

Labwc is implementing it already, don't know others, Hyprland dev isn't enthusiastic about it.

stefonarch avatar Dec 26 '24 09:12 stefonarch

Labwc is implementing it already, don't know others, Hyprland dev isn't enthusiastic about it.

From Phoronix: "The new Labwc release adds support for the ext-workspace protocol as well as menu enhancements that include icons and dynamic root menus. Labwc 0.8.3 also brings new configuration options, a "WarpCursor" action, and many bug fixes."

jeremywh7 avatar Mar 11 '25 15:03 jeremywh7

Niri is now the second compositor besides labwc implementing it: https://github.com/YaLTeR/niri/pull/1800 @marcusbritanicus Any time to look into it?

stefonarch avatar Jun 14 '25 14:06 stefonarch

@stefonarch Sure. Let's do it sometime in the coming weeks.

marcusbritanicus avatar Jun 14 '25 18:06 marcusbritanicus

Would this also take the taskbar limitByDesktop setting into account?

Jogai avatar Jun 18 '25 08:06 Jogai

Testing Niri PR with pager from sfwbar master is working perfectly with dual monitor setup, xfce4-panel has issues with 2 monitors though, showing only workspaces from the first.

stefonarch avatar Jun 23 '25 10:06 stefonarch

Would this also take the taskbar limitByDesktop setting into account?

Afaik no, this would need a IPC implementation similar of the one for Wayfire which is WIP; including move to desktop in right click menu.

stefonarch avatar Jul 13 '25 10:07 stefonarch

It's merged in master Niri, and also xfce has fixed apparently multimonitor pager issues. @marcusbritanicus any free time?

stefonarch avatar Jul 13 '25 10:07 stefonarch

@stefonarch Thanks for the update. Let's see how we can implement it. I will have to start out by installing niri first.

marcusbritanicus avatar Jul 15 '25 06:07 marcusbritanicus

Let's see how we can implement it. I will have to start out by installing niri first.

Labwc is fine too, but doesn't have per-output-workspaces (where xfce4-panel stumbled hard, should be fixed now in git).

stefonarch avatar Jul 15 '25 06:07 stefonarch

Let's see how we can implement it.

Looking forward to your work. As usual, I'll appear when you write a code, because only then I'll know how things are done ;)

tsujan avatar Jul 15 '25 20:07 tsujan

@marcusbritanicus waybar has merged support now too: https://github.com/Alexays/Waybar/commit/f1b7d829c287cbad69833e6f764399cc26f85637

stefonarch avatar Aug 19 '25 20:08 stefonarch

@stefonarch #2322 I got some time yesterday and today, so made a little progress. The classes themselves are quite simple and easy to use.

If you, or @tsujan or @gfgit have some time, please feel free to work on this. Feel free to open a PR against my branch. Or you can always fork my repo and continue my work. I do not mind either.

marcusbritanicus avatar Aug 27 '25 18:08 marcusbritanicus