microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.86k stars 6.58k forks source link

Shortcuts for numbered virtual desktops #19

Open joaomsa opened 5 years ago

joaomsa commented 5 years ago

Desktops are already numbered, would be useful to have some sort of indicator of the current desktop number in the taskbar and to add a shortcut to jump between desktops, something like WinKey + Ctrl + 1..9 to go to desktop 1... all the way to 9

StrScr commented 5 years ago

This is something that Virtual Desktop Enhancer can do. I had mentioned the software previously in issue #16.

You can jump to a directly to a desktop with the keyboard shortcuts Ctrl + Win + 1-9 and the program displays the current desktop as a badge as a taskbar icon. image

crutkas commented 4 years ago

if we could do per-monitor virtual desktops, would this be helpful? Doesn't the context you're currently in provide that information?

edwardchanjw commented 4 years ago

@crutkas for my comment on #107.
Different virtual desktop for monitor + API for show window to specific virtual monitor. (We have this feature in Win+Tab, show this window/app on all desktop) . Could open a lot of use case.
Thanks

LinqLover commented 3 years ago

Just in case anyone is searching for a cheap workaround, this can be reached using AutoHotKey: https://github.com/LinqLover/windows-desktop-switcher/blob/master/user_config.ahk

thakkarparth007 commented 3 years ago

Pinging on this one. Would love to have more features related to virtual desktops - shortcuts for switching, being able to re-arrange them, moving windows from one to another etc. I understand some of these may be out of scope (e.g. maybe rearranging of desktops), but I believe some of these are doable at PowerToys level?

srbrunner commented 3 years ago

I love using virtual desktop on OSX (space) and Linux. Without the ability to jump to a specific desktop makes virtual desktop unusable in windows for me. It would be great if we could map/re-map keys to a specific desktop number/name. This used to be available using the old sysinternal tool under desktop (https://docs.microsoft.com/en-us/sysinternals/downloads/desktops), but wasn't carried forward in the windows 10 version of virtual desktops. win + number or alt + number would be great improvement for me. I looked through shortcuts, but this doesn't list the virtual desktop as an option to map to.

Mheetu commented 2 years ago

Any update on this? With the growth of productivity and efficiency based workflows, keyboards, popular code editor design decisions (eg. Vim, VSCode's command palette, etc), being able to jump from Desktop 1 to Desktop 4 should be a quick and easy thing to achieve without having to open the Desktop Switcher or spam the arrow keys.

The popularity of video conferencing, screen sharing, live streaming, etc. has created a need for privacy-centric features. Imagine the scenario where an individual is screensharing some work; they're currently on Desktop 1, have some sensitive information on Desktop 2, and need to get to Desktop 3. Without the ability to jump directly to Desktop 3, they'll have to stop their screen sharing session and close the window(s) containing the sensitive information for the rest of their meeting or stop and start each time they need to switch between the two other Desktops.

This is a feature that's severely missed in Windows and deserves priority triage.

xgdgsc commented 2 years ago

I' d like to search for workspace name in Powertoys Run to switch to when I have more than 10 workspaces. Currently search for window name works, though workspace names are less likely to change.

widavies commented 1 year ago

I made WinJump to do this: https://github.com/widavies/WinJump

dalianzhu commented 1 year ago

I made a tool to handle this for the meantime, it's very early stages and could use some improvement, but it works well in testing so far: https://github.com/widavies/WinJump

Would love feedback from you all.

great tool

CSaratakij commented 1 year ago

I made mine as well. https://github.com/CSaratakij/StaticWorkspace . The problem is, Windows team responsible for Virtual Desktop feature didn't want to expose the hidden COM interface necessary to make this happen to the public. (undocumented by design) . See how shockingly lacks the api is here . They don't want any program (except theirs) to control virtual desktop at all. Their claim is "User should be the one informing these decision" :unamused: . They see people demands this feature for ages, yet decide to not doing something about it anyway. This made me believe there is something more to it. (office politics?) . I doubt power toys team didn't have enough power to made Virtual Desktop team consider this feature. (That clearly useful and in demands for power user and developer) . For a future proof alternative, checks out pure win32 api based like Workspacer or hacks mine stuff. . Hidden COM interface likely to break sooner or later.

Kingjames52-bot commented 1 year ago

This is a great tool for formatting file's looking forward too see this repository grow!

Chris24main commented 1 year ago

Really just a ping to add support for this, but as someone who uses four defined virtual desktops to manage a complex workflow - I need to stress the weakness with the current methods within Windows for moving to the next desktop.

Say I have an arrangement of windows (for what it's worth using fancy zones) in desktop 3 that are suited to a particular task and am currently in desktop 1 - clearly I am able to move right twice - however, windows will move to desktop 2, configure and display all open windows, then move to desktop 3, configure and display all open windows. It's very slow, and sometimes seems to flip back to 2 before returning to 3 - being able to move directly to 3 is a significant time saver. Calling up the desktop tasks view can sometimes be even slower depending on the number of open windows....

Thanks.

tadly commented 1 year ago

Because of how bad the Windows Multi Workspace Implementation is when it comes to working efficiently, I decided to go back to good 'ol faitful virtuawin It's what I used back at Windows XP times, hasn't changed much (if at all) and still just works.

Sadly, on Windows 11, you can no longer bind Win + num (maybe because I lack admin at work). This didn't work with the mentioned Autohotkey scripts either.

Now I'm stuck with alt + shift + num for changing desktop and win + shift + num for moving windows to other desktops. VirtuaWin also has a MouseWheel click action for window title bars which allows for additional functionality like Move to Desktop, Always on top, Always Show, Add Window Rules etc. (though most can be configured to shortcuts)

dgm commented 12 months ago

Wow. my ticket 30114 is a dup of ticket number ... 19. 1) no wonder I couldn't find the original. 2) that's a long time for this to still not be solved. :(

NicoVogel commented 11 months ago

I made a tool to handle this for the meantime, it's very early stages and could use some improvement, but it works well in testing so far: https://github.com/widavies/WinJump

Would love feedback from you all.

Thank you for providing a solution until this is integrated into PowerToys.

widavies commented 11 months ago

I made a tool to handle this for the meantime, it's very early stages and could use some improvement, but it works well in testing so far: https://github.com/widavies/WinJump Would love feedback from you all.

Thank you for providing a solution until this is integrated into PowerToys.

Thanks! Glad that it's useful.

Hopefully Microsoft sends me a big check for WinJump to merge it into Power Toys.... Alas it's not really anything complicated, just calling their internal API. Would be very nice for Microsoft to at least expose a public API for virtual desktop management so we could at least develop some more stable tools for it.

Chris24main commented 10 months ago

I made a tool to handle this for the meantime, it's very early stages and could use some improvement, but it works well in testing so far: https://github.com/widavies/WinJump Would love feedback from you all.

Thank you for providing a solution until this is integrated into PowerToys.

I had been using 'VirtualSpace' but this seems to have broken with Win 23H2 - so I've tried WinJump - have to say it's pretty efficient at doing this one task, and exactly what I was looking for. Thank you.

Only question is - can you have the 'move-to' shortcut tied to a non-numeric key ? ie, I have 4 desktops, so I tie them to the four home row keys and use a 'meh' modifier to complete the shortcut for those 4 desktops, can I do something similar with 'move-to' ?

widavies commented 10 months ago

@Chris24main

I made a tool to handle this for the meantime, it's very early stages and could use some improvement, but it works well in testing so far: https://github.com/widavies/WinJump Would love feedback from you all.

Thank you for providing a solution until this is integrated into PowerToys.

I had been using 'VirtualSpace' but this seems to have broken with Win 23H2 - so I've tried WinJump - have to say it's pretty efficient at doing this one task, and exactly what I was looking for. Thank you.

Only question is - can you have the 'move-to' shortcut tied to a non-numeric key ? ie, I have 4 desktops, so I tie them to the four home row keys and use a 'meh' modifier to complete the shortcut for those 4 desktops, can I do something similar with 'move-to' ?

I just added this! Try out 2.0.10: https://github.com/widavies/WinJump/releases/tag/2.0.10

Here's a link to an example config file: https://github.com/widavies/WinJump/tree/1-4-improvements#example

Chris24main commented 10 months ago

Hi @widavies - very much appreciate the update, but where I ran 1.4, set up the shortcuts to jump, and it worked immediately, I couldn't get 2.0 to work at all. I exited from 1.4 - just ran 2.0 from the downloads folder.. noticed that the icon in the system tray is more readable, nice, then opened up the config - that looked familiar (think it's simply a text file written to the root user directory, so picked up regardless of the location of the exe file) - but what seemed to be happening was that the shortcuts were being entered as text in whatever app was in focus - like my shortcut to desktop 2 is 'ctrl-alt-shift-e' and that was generating É as text in the URL bar of the browser... though I have a suspicion that this may have something to do with my board which seems to leave one of the modifier keys locked .. however, on exiting, and running winjump 1.4 from the startup folder - it ran fine again...

widavies commented 10 months ago

Hi @widavies - very much appreciate the update, but where I ran 1.4, set up the shortcuts to jump, and it worked immediately, I couldn't get 2.0 to work at all. I exited from 1.4 - just ran 2.0 from the downloads folder.. noticed that the icon in the system tray is more readable, nice, then opened up the config - that looked familiar (think it's simply a text file written to the root user directory, so picked up regardless of the location of the exe file) - but what seemed to be happening was that the shortcuts were being entered as text in whatever app was in focus - like my shortcut to desktop 2 is 'ctrl-alt-shift-e' and that was generating É as text in the URL bar of the browser... though I have a suspicion that this may have something to do with my board which seems to leave one of the modifier keys locked .. however, on exiting, and running winjump 1.4 from the startup folder - it ran fine again...

@Chris24main Try replacing your config file with the example, saving it, and reloading WinJump: https://github.com/widavies/WinJump#example

Chris24main commented 10 months ago

Sorry - not trying to be difficult - did exactly that - same deal, 2.0 did nothing (with example file copied in but my shortcut specified in the shortcut line for desktop 1) - swapped everything back - works fine.

Chris24main commented 10 months ago

Hi @widavies - I think I did exactly that and had exactly the same experience. One additional piece of information that may help.. with the 'move-to' function left as default, ie "move-window-to-desktop": { "Shortcut": "alt+ctrl" },

I was finding that when I held down alt+ctrl and pressed anything else, nothing was happening or even registering as a key press - I confirmed this in qmk configurator test, and even raised a ticket with my keyboard manufacturer until I realised that WinJump might be capturing that and waiting for something. Ie - shortcuts in apps that used alt+ctrl+1 for setting style one in OneNote for example - just didn't work ... When I changed the 'move-to' function to "move-window-to-desktop": { "Shortcut": "alt+shift" },

Would it be possible to structure the config so that you have a specific shortcut for each desktop with the move-to function as well as the Jump-to ?

For me, I have 4 desktops - I will always have 4 because I structure it based on the 4 home row keys - (equivalent to J,K,L,;) so I want to press alt-shift-ctrl + home row key to jump (because I have a key mapped to 'meh' or 'alt-shift-ctrl') and alt-ctrl plus home row key to move (which seems counter productive but works for me) but no other key involving ctrl-alt.

Below is my config - this works perfectly for Jump to but with no functioning move to... Config is,

{ "move-window-to-desktop": { "Shortcut": "alt+shift" }, "toggle-groups": [], "jump-to": [ { "shortcut": "alt+shift+ctrl+n", "desktop": 1 }, { "shortcut": "alt+shift+ctrl+e", "desktop": 2 }, { "shortcut": "alt+shift+ctrl+o", "desktop": 3 }, { "shortcut": "alt+shift+ctrl+i", "desktop": 4 }, ], "jump-current-goes-to-last": false, "change-desktops-with-scroll": false }

tadly commented 10 months ago

Don't want to sound rude but could you guys keep this on topic and discuss problems for a different project in a seperate issue?

Chris24main commented 10 months ago

Absolutely - apologies for hijacking...

lnieswan commented 8 months ago

I have loved working with WinJump. As of today after I received the latest Windows Update this success story seems over. Windows Defender Smart Screen is blocking it.

widavies commented 8 months ago

I have loved working with WinJump. As of today after I received the latest Windows Update this success story seems over. Windows Defender Smart Screen is blocking it.

@lnieswan can you open up an issue on WinJump for this https://github.com/widavies/WinJump/issues ? You should be able to allow WinJump through smart screen if it blocks it

XLTechie commented 2 months ago

Wow, issue 19! People have wanted this for so long! And yet, here we all are, screaming into the void, with no ears to hear.