microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
109.19k stars 6.44k forks source link

Moving a program with you to another virtual desktop #16

Open AnthonyLenglet opened 5 years ago

AnthonyLenglet commented 5 years ago

One of the thing I've found lacking ever since I started using the virtual desktops is the ability to move a window with you while moving to another virtual desktop.

Currently, we can move to another desktop using the shortcut ctrl + win + left/right, I feel like a shortcut along the lines of ctrl + win + alt + left/right could be used to make the current active window move with you to the next desktop

I have no idea if this fits as a powertoy, please tell me if it doesn't !

StrScr commented 5 years ago

I currently use Virtual Desktop Enhancer to that effect. It's no longer maintained, but still works. You can configure keyboard shortcuts to move the currently focused program to an adjacent desktop, either with you or without changing desktops yourself.

I personally have set Ctrl + Alt + Win + Left/Right to move a program without switching and Ctrl + Shift + Win + Left/Right to take a program along.

jburb commented 5 years ago

An existing alternative to virtual desktop enhancer, MoveToDesktop, is not archived, though it is limited to this one virtual desktop feature (move window hotkey). For me it's indispensable, and would be great to have the feature natively!

crutkas commented 4 years ago

for keeping stuff documented, https://docs.microsoft.com/en-us/sysinternals/downloads/desktops is one tool that had a basic UX for virtual desktops long ago

DanEdens commented 4 years ago

You can already do this with the standard virtual desktop, right click the window in the tab switcher and select show this window on all desktops.

image

AnthonyLenglet commented 4 years ago

You can already do this with the standard virtual desktop, right click the window in the tab switcher and select show this window on all desktops.

image

This isn't exactly the same thing (the proposal is mainly useful for when it comes to reorganising your windows using nothing but the keyboard) but it definitely helps for some cases

DanEdens commented 4 years ago

Ah toggle that setting on the active window, actually I really like that and would use that more often. Good call imo.

bitwiseman commented 3 years ago

Note: #4298 is basically a duplicate of this idea, though it talks about "sending" a window to a specific virtual desktop rather than bringing it with when switching.

Tritlo commented 3 years ago

XMonad only has the concept of sending a window over, and then you switch over with the usual command. More useful that way I'd think, since I often want to "clean up" and send a window I don't want to close somewhere else.

Sarafian commented 3 years ago

Not to claim that this is the most useful post ever, but in my previous setup, I had a tool that did two things that I liked

I don't remember the name and I also cannot find it, hence my original remark of "not the most useful post ever". Sorry and if I find it I'll update here. It was certainly on github and worked as a portable as well. The app deserves much more visibility as well. If anyone knows it, please post as well because it would be a great base to discuss upon.

rinzwind5 commented 2 years ago

Not to claim that this is the most useful post ever, but in my previous setup, I had a tool that did two things that I liked

  • Move windows between desktop using Win+Alt+Left/Right. Compated with the MoveToDesktop, this worked even when the app had already moved to another desktop
  • Show the name of the desktop when switching

I don't remember the name and I also cannot find it, hence my original remark of "not the most useful post ever". Sorry and if I find it I'll update here. It was certainly on github and worked as a portable as well. The app deserves much more visibility as well. If anyone knows it, please post as well because it would be a great base to discuss upon.

One that does that (it uses WIN-key+1..20 to switch to desktops) is WS Virtual Desktop Tool, available on the MS Store . It too does transfer windows to a desktop with shortcuts. https://www.microsoft.com/en-us/p/ws-virtual-desktop-tool/9n5wrj22t733?activetab=pivot:overviewtab

Sarafian commented 2 years ago

One that does that (it uses WIN-key+1..20 to switch to desktops) is WS Virtual Desktop Tool, available on the MS Store . It too does transfer windows to a desktop with shortcuts. https://www.microsoft.com/en-us/p/ws-virtual-desktop-tool/9n5wrj22t733?activetab=pivot:overviewtab

Thank you. It was not from the store but a stand alone executable. Might have evolved to the paid app's link.

krisrok commented 2 years ago

Since we're collecting... this one also provides the functionality: https://github.com/ViRb3/SylphyHornEx

ariccb commented 2 years ago

And to follow krisrok's link, here's one that actually works on Win11. These obviously are just workarounds and it would be MUCH preferred to have a PowerToys version of the functions provided by these applications. https://github.com/hwtnb/SylphyHornPlusWin11

renantmagalhaes commented 2 years ago

Since my ticket was closed as a duplicate, I think it's better to post it here.

The solution I found to achieve this relies in a AHK Script

Answer found here: https://superuser.com/questions/950452/how-to-quickly-move-current-window-to-another-task-view-desktop-in-windows-10.

I edited the keybindings from the original owner to ctrl + shit +win + left/right

^+#Left::
  WinGetTitle, Title, A
  WinSet, ExStyle, ^0x80, %Title%
  Send {LWin down}{Ctrl down}{Left}{Ctrl up}{LWin up}
  sleep, 50
  WinSet, ExStyle, ^0x80, %Title%
  WinActivate, %Title%
Return

^+#Right::
  WinGetTitle, Title, A
  WinSet, ExStyle, ^0x80, %Title%
  Send {LWin down}{Ctrl down}{Right}{Ctrl up}{LWin up}
  sleep, 50
  WinSet, ExStyle, ^0x80, %Title%
  WinActivate, %Title%
Return

Just compile it as an executable and put it on shell:startup

jaimecbernardo commented 2 years ago

Interesting solution. Sending Keypresses to activate the shortcut is a bit hacky, but if it works it's nice :)

jasonjac2 commented 3 weeks ago

@renantmagalhaes nice job. worked. I would still love for it to be part of Powertoys

enesbala5 commented 1 week ago

It's been 5 years since this was opened. Can we get an update on it's development?

If any maintainer has time, please take a look at it.