pmb6tz/windows-desktop-switcher

Add 2D grid navigation

kvnduff opened this issue ยท 6 comments

Great job with this project! I don't think any of us could bear using Windows VD if there we couldn't use keyboard shortcuts.

I was wondering... in the past when I was a Mac user, I used an application called TotalSpaces2 on the Mac (https://totalspaces.binaryage.com/). It's a VD manager for the Mac but what I really like about it is that you can set up a your desktops in a 2D grid (22, 33...) and you can use the arrow keys to quickly navigate between them. I liked it much more than the single row in Windows VD. The main benefit being you can more quickly navigate between desktops (less key presses) and you can set your programs up in a simple pattern that's easy to remember and navigate (I find navigation more challenging in the linear system due to the need to cycle left and right repeatedly or to remember the number of all your desktops).

I have very little experience with AHK (and any type of programming) but I was trying to mod another script simply by inputting each and every direction the system would have to navigate if left, right, up or down was pressed on a 3 by 3 grid. I was also trying to set it up so that if left was pressed on desktop 1 in a 3*3 grid then the navigation would wrap around to desktop 3. Similarly hitting up on desktop1 would wrap around to desktop 7. Not sure how hard or easy this would be to implement but if this is a feature you could add then I would be forever grateful (probably some other users would appreciate this feature too). :)

Hi Kevin! Thank you for you kind words and suggestions.

If you're ok with having 4/9/16 desktops (so it could form a 2x2 grid) and you'd be okay with a mental image of them (not having the grid being previewed to you), then iit shouldn't be that hard to implement - just 4 additional mappings would be created for the arrow keys, and then the number (of the desktop to be opened) would be calculated from the current desktop number and the arrow pressed. Quite a simple math puzzle.

However, the grid preview functionality which could replace Windows VD preview would be a considerable work and unfortunately out of scope for this project.

I'd also highly suggest you trying out a grid setup which you could set up with minimal configuration (if you decide do it, and would need some help, just let us know:)

Button 1 + Button 2 = Dekstop
CapsLock QWE
ASD
ZXC
1 2 3
4 5 6
7 8 9

Hey Elijas, thanks so much for your reply! And yes, I wouldn't require a visual grid preview. The idea with the grid is that you dedicate apps to specific grid spaces so it's quite easy to form a mental picture of your workstation. The arrow key navigation feature would be great if it could be added! Thanks!

Just to not to leave you hanging - personally I'm currently on tight schedules for other projects, so I won't be able to work on this in the near time, but I might get to it later. If anyone would submit their Pull Request, I'd be happy to review and merge it as well!

Hi Elijas, no problem at all! This was actually a great experience for me as I decided to delve deep into AHK as an intro to programming! I added some new features but kind of hack'n'slash - don't think my code is very pretty or conscise. I managed to integrate a 33 grid (not customizable, only 33) with right/left/up/down navigation keys and wrap around navigation. Also added a graphical interface where you can see the grid and where you are in it while you change desktops and a new function where you can press a hotkey to see where you are in the grid. Still a few hiccups but it's working relatively well. I would still like do four things... (1) add transparency to the dark grey on the grid image (similar to the style of the Win Alt+Tab window), (2) speed up the movement through the grid or allow an interruption so that desktops can be moved to more quickly, (3) perhaps add some kind of black covering (don't know what to call this) that covers the desktop while changing desktops so that when you are skipping over a white desktop you aren't flashed with bright white light, and (4) the mother of all, try to add a full screen preview of the grid and all of the windows within the desktops by nabbing the screen previews that Windows natively shows in their VD interface (when you press Win +Tab). If you'd like to see or add any of these features then let me know and I'll share the edited AHK scripts. :)

Wow that's really exciting! Very happy to see you rose up to the challenge ๐ŸŽ‰ It's really quite a lot, what you've achieved in not much time.

Regarding with sharing the edited AHK scripts - totally up to you, although I'd highly recommend you to try out the tried and true way of doing so, which would be clicking the "Fork" button in the top and then from there getting to know how to use GitHub for collaborative projects with others:)

Thanks Elijas, I'll probably take GitHub orientation course and see what happens from there. Thanks, it's great joining this community and having so many helpful people to start dabbling in code/programming!