Fluent-Search icon indicating copy to clipboard operation
Fluent-Search copied to clipboard

Allow FS to move windows to the current VD

Open hpr1999 opened this issue 3 years ago • 7 comments

Is your feature request related to a problem? Please describe. I use Virtual Desktops frequently and thus sometimes want to interact with a Window on another Desktop. FS supports moving to a window open on another VD, but sometimes I would prefer the window to come to me, so to move to the current VD.

Describe the solution you'd like I would like an option for Process-Search results that's called "Open here" or "Move here" that moves the result's window to the currently opened VD.

Describe alternatives you've considered FS already supports the workflow of moving to the VD and then moving the window myself. Apart from that, I don't really see a good alternative to this feature request.

Additional context I'm not sure whether it would be better to

  1. just move the window to the same location where it was on the other VD or
  2. to move it to the currently active screen in addition to the active VD. In favour of 1): Less complex, maybe less surprising behaviour In favour of 2): With 1), there's the potential for confusion when not instantly noticing where the Window moved, thus thinking it maybe didn't work.

hpr1999 avatar Jul 01 '21 18:07 hpr1999

This was not possible on Windows 10 (no proper API), will check if it's possible on 11

adirh3 avatar Jul 12 '21 21:07 adirh3

I once had some weirdly cobbled together Powershell scripts that could at least move windows between VDs (on Win10), but it definitely didn't feel like a proper API xD

Personally I can't say how much the VD-handling in Win11 has changed so I can't really comment how good / necessary it will be, but can't be harmful to have a look! 👍🏻

hpr1999 avatar Jul 13 '21 17:07 hpr1999

@hpr1999, sorry for the delay, since there are tons of features users may want, I developed the Tasks features which lets you expand Fluent Search functionality. One of its options is to run PowerShell code, which can let you do exactly what you need.

I created a basic Task project that lets you move processes to the current VD, here it is -https://1drv.ms/u/s!AqOQDvYFLMuago1UpA39ilxsCSETgQ?e=c4jgfl

How to install -

  1. Open PowerShell
  2. Run Install-Module VirtualDesktop
  3. Download the Task file
  4. Open the Tasks window in FS (via system tray or search for it)
  5. Drag the task file into the window

Now search for any process and you will see the Move to current VD operation.

Note - default Windows PowerShell (v1) does not support importing modules via scripts, so you will need to upgrade it if you haven't. If you have any questions please contact me in Discord.

adirh3 avatar May 27 '22 19:05 adirh3

Hey @adirh3, long time no see. No worries at all! I'm aware you're not exactly a 100-man-team. Quite honestly, I'm amazed you even took the time to build the task yourself! Could've also expected a "if you can do it by powershell, build it as a task" 😂

I'll try to give it a spin to see if it works.

One question: Will that work in PS-Core?

hpr1999 avatar May 27 '22 23:05 hpr1999

I might've spoken to soon: image

Do you reckon this might be a problem on my end or some permission-shenanigans? (Also somewhat unrelated, but if it's yaml files anyway, wouldn't it be potentially easier to have them in source control? ;) )

hpr1999 avatar May 27 '22 23:05 hpr1999

I can confirm the problem was on my end! Weirdly, the link worked in Edge, but not my main browser.

hpr1999 avatar May 27 '22 23:05 hpr1999

Update: I couldn't quite diagnose why, but for me, the operation correctly shows up but instead of moving the window, it'll just switch to the desktop as if I just hit Enter normally.

Edit: Sorry, I've just seen you asked to be contacted on discord, so I might do that tomorrow, at least I have the results documented for posterity ;)

hpr1999 avatar May 27 '22 23:05 hpr1999