glazewm icon indicating copy to clipboard operation
glazewm copied to clipboard

[Feature Request] Use Virtual Desktops instead of window hiding mechanism

Open wis opened this issue 1 year ago • 2 comments

Describe the problem/motivation

I do not like the fact that glazewm and other Windows™ Window managers hide windows completely to manage workspaces. I found it really painful to use Winlister to unhide all the windows that I had open but hidden by glazewm before it crashed.

I prefer if glazewm integrates with the Windows 10/11 Virtual Desktops feature for its workspace management.

Switching between Virtual Desktops to me seems just as fast as switching between workspaces in glazewm.

Describe the solution you'd like

A config option to enable the use of Virtual Desktops for workspace management, e.g. use_virtual_desktops.

There exists a Rust library for using the Windows 10/11 Virtual Desktop APIs, VirtualDesktopAccessor.

Alternatives considered

None that I could find or think of.

Additional context

I wrote it at the top.

wis avatar Aug 12 '24 03:08 wis

Virtual desktops can be pretty slow to move around, probably due to the animation. This slowness ruins the whole workflow. Not sure if the animation is the reason or if it can be disabled.

MoaidHathot avatar Aug 24 '24 10:08 MoaidHathot

Virtual desktops can be pretty slow to move around, probably due to the animation. This slowness ruins the whole workflow. Not sure if the animation is the reason or if it can be disabled.

Yea, it can be disabled, I didn't remember that I disabled it but now remembered, and I don't remember how I did it. I got key bindings that move to the left or right virtual desktop and key bindings that move to VD number N, and both types are fast. I flick between virtual desktops back and forth pretty fast.

wis avatar Aug 24 '24 10:08 wis

If I remember correctly, another project known as FancyWM managed to implement this flawlessly until it stopped working due to something along the lines of "the Virtual Desktops API being changed in 24H2".

JSGRD22 avatar Jan 07 '25 08:01 JSGRD22

I would also vote for changing to virtual desktops. There's a very useful feature from the Windows power toys that I used to use when I was using FancyWM: the search bar for switching to the desktop where a particular window is. Let say you have lost track of where you put a specific window, then in FancyWM, you can just press ALT+SPACE (powertoys keybind) which will bring up the search bar:

Image

Here I searched from chrome because it's the only way I can get results running GlazeWM since in the present workspace presently, I only have chrome running and it finds the window, but I can't find other windows in other workspaces.

If I rather use FancyWM, the search bar can find any window in any of my virtual desktops and then just pressing ENTER switches me back to that virtual desktop where the window is. This is REALLY useful and I miss it very much. I went from FancyWM to GazeWM because it doesn't seem to suffer from some nasty bugs I had and also because development doesn't move much as the program is closed-source.

Also, not getting back your windows when GlazeWM crashes is scary. I had this bug with Workspacer and it was aweful. I cross fingers that GlazeWM doesn't crash on me.

sim590 avatar Jan 17 '25 19:01 sim590

I would also vote for changing to virtual desktops. There's a very useful feature from the Windows power toys that I used to use when I was using FancyWM: the search bar for switching to the desktop where a particular window is. Let say you have lost track of where you put a specific window, then in FancyWM, you can just press ALT+SPACE (powertoys keybind) which will bring up the search bar:

Image

Here I searched from chrome because it's the only way I can get results running GlazeWM since in the present workspace presently, I only have chrome running and it finds the window, but I can't find other windows in other workspaces.

If I rather use FancyWM, the search bar can find any window in any of my virtual desktops and then just pressing ENTER switches me back to that virtual desktop where the window is. This is REALLY useful and I miss it very much. I went from FancyWM to GazeWM because it doesn't seem to suffer from some nasty bugs I had and also because development doesn't move much as the program is closed-source.

Also, not getting back your windows when GlazeWM crashes is scary. I had this bug with Workspacer and it was aweful. I cross fingers that GlazeWM doesn't crash on me.

If you set show_all_in_taskbar: true in your GlazeWM config, then all apps are shown in the Taskbar and pressing on any of them will move to that workspace.

MoaidHathot avatar Jan 18 '25 07:01 MoaidHathot

Unfortunately, it doesn't enable selecting the window from the powertoys search menu. When I try to do it, it just doesn't switch workspace.

I realize that what you suggest lets me work with WIN+[0-9] keys for selecting my windows, but this is rather slow as you have to examine all the candidates one by one. Also, if you happen to have more than 10 applications opened at a time, you can't use the keyboard anymore for some apps which defeats the purpose of using a keyboard driven window manager...

Also, you might have specific text in the window title that differentiates between a window and another window of the same application. The powertoys let you nicely select what you want by writing the text associated to the window.

So, it's not completely equivalent and I dislike it, but I will try to use it in the meantime.

Could it be possible to make the powertoys search menu switch the appropriate GlazeWM workspace ? That'd be really great. Thanks.

sim590 avatar Jan 20 '25 19:01 sim590