wf-shell icon indicating copy to clipboard operation
wf-shell copied to clipboard

Virtual-screens plugin

Open birdie-github opened this issue 3 years ago • 4 comments

Would be nice to have a plugin for virtual screens, like e.g. in KDE/IceWM/XFCE where you have small clickable squares on the panel which you can use to switch between virtual screens without using your keyboard.

birdie-github avatar Apr 25 '22 11:04 birdie-github

Do you mean, a way to change « workspaces » (the already existing things, that you can switch between with the Viewport swipe/switchers) in the panel ?

AKArien avatar Nov 03 '25 13:11 AKArien

Do you mean, a way to change « workspaces » (the already existing things, that you can switch between with the Viewport swipe/switchers) in the panel ?

Yes, "workspaces" indeed.

birdie-github avatar Nov 04 '25 14:11 birdie-github

I’m interested, i’ve been trying to think about a cursor-only way of switching between them. What would be your idea for an interface ? All i was able to come up with was for wayfire itself, by sufficiently pushing the cursor against an edge of the screen, which ofc wouldn’t work for multiple monitors

Though i’m way less familiar with wayfire itself, i would assume doing it from the panel would require expanding wf shell protocol ?

AKArien avatar Nov 04 '25 14:11 AKArien

I’m interested, i’ve been trying to think about a cursor-only way of switching between them. What would be your idea for an interface ? All i was able to come up with was for wayfire itself, by sufficiently pushing the cursor against an edge of the screen, which ofc wouldn’t work for multiple monitors

Though i’m way less familiar with wayfire itself, i would assume doing it from the panel would require expanding wf shell protocol ?

You can use Wayfire's IPC. Look at #301, the author there has some version of the IPC socket working, it might be worth updating it to gtk4, then you can use the ipc methods wayfire provides for switching workspaces.

ammen99 avatar Nov 04 '25 14:11 ammen99

At least in XFCE it looks like this:

Image

The active application becomes an icon for the workspace.

birdie-github avatar Nov 05 '25 07:11 birdie-github

Interesting, although i must say i’m not all too sure that would work well for wayfire ? the workspaces are by default 3*3, so i am under the impression that would quickly become way too little to click, and i feel like we should try to make something that can be used for most configurations that are reasonably close to the defaults. How about a widget that defines a space in the bar, in which we can click and then move freely by moving the cursor ? By moving freely, i mean the same effect as with the wayfire plugin to swipe with X fingers on a trackpad to move between workspaces, although i haven’t looked enough at the ipc to know if that could be done as is. More inspired by the XFCE one, we could have a popover to show buttons for all the workspaces with enough room, since we could add them until we cover the screen Alternatively how about simply a widget to activate the effect of the « expo » plugin ? Personally, that’s what i use all the time, but i don’t know if many people use it

AKArien avatar Nov 05 '25 11:11 AKArien

I don't think many users have more than four workspaces, and four can be placed perfectly in the taskbar. For values above four, your solution is fine by me — or you could use the mouse scroll to switch between them, with the current active workspace indicated by a number or letter — whatever works for you.

Actually, it would be great to have mouse scrolling over this "widget". This would be in addition to clicking individual workspaces when they fit.

Any solution would be an improvement on the current situation.

birdie-github avatar Nov 05 '25 18:11 birdie-github

Also, I think there should be a limit on the number of workspaces, as I doubt anyone can realistically operate with more than 24 of them.

If so, we could arrange them horizontally in two rows, displaying them as small squares.

Image

birdie-github avatar Nov 05 '25 18:11 birdie-github

Any solution would be an improvement on the current situation.

Ha, not wrong

If so, we could arrange them horizontally in two rows, displaying them as small squares.

Though i must say i’m not quite sure how the ordering and layout of non 2*x workspaces layout in the in-panel selector would be done, Whatever the case, you’re right, we would probably use the same widget in a popup and an xfce-like interface, only change being the arrangement. And hey, ✨ settings ✨ !

Actually, it would be great to have mouse scrolling over this "widget". This would be in addition to clicking individual workspaces when they fit.

Hm, yeah, sounds nice

I may or may not start looking closer at the ipc in a few week’s time. Update me if you start something until then !

AKArien avatar Nov 06 '25 10:11 AKArien

Actively using expo, but treat workspaces as arranged in a row, because of switching via numbers too. My opinion: one dimension, like in waybar, is pretty straightforward.

WShad avatar Nov 15 '25 09:11 WShad

Two rows are strictly for those who are short on space.

If someone ventures to implement this, would be nice to have these additional features:

  • Being able to name workspaces, e.g. 1, 2, 3, 4, 5, A, B, C, D, E or even I, II, III, IV, V, etc. and these characters/strings would be painted on top, or leave them empty by default.
  • For the app that's active on the current workspace, get its icon and paint it in this workspace rectangle.
  • Or even take screenshots of the current workspace and shrink them to the size of the workspace rectangle and inpaint inside of it, so they will become essentially previews. Do that only once per second of maybe only if the contents of the apps on the current workspace change - no idea if the Wayland protocol supports this feature. But if there are 24 active workspaces each running apps, generating previews for all of them may become quite expensive CPU/GPU-wise.

Everything is up to you of course.

birdie-github avatar Nov 22 '25 14:11 birdie-github