-
Notifications
You must be signed in to change notification settings - Fork 271
Toggle last desktop #65
base: master
Are you sure you want to change the base?
Conversation
This is a rapid jot down of the first ideas about enabling a hotkey to toggle between the current desktop and the last one. I am not really shure this is the most elegant way to do this, still, it seems to work ;)
Removed an unnecessary if caused by mindless copy-pasting. Fixed a bug in the management of the timing which could cause unexpected behaviours in some edge cases.
virtual-desktop-enhancer.ahk
Outdated
OnShiftLastActivePress() { | ||
; Shift to the last active desktop. | ||
|
||
global lastActiveDesktopNumber |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't have to identify that the variable is global if you already did it before when you defined it at the top of the file, can you look into this to make it work like it does for all of the other globals?
Two comments:
|
You are definitely right on the second one: I will try and fix it later. Regarding the first issue: what would you propose to change it to? My only concern was that if the value was too low it would register as "last active" desktops while rolling through if the user was not fast enough.
Now if you are on any desktop and issue the "switch to last" you go to 3, if you are on 3 you go to 1 and if you are on 1 you go to 3. If you have already pinned two desktops and pin another one they would "shift":
However I discarded the idea beause it was more complicated and less intuitive. (Espcially withou any way to rapidly verify which desktops are currently pinned). |
I think it is good as is. I see your point. I think that when you switch to a specific desktop, it isn't a problem at all, and we don't even really need the delay, but when switching to the prev/next desktop, we do. I think it is a good enough solution for now. |
Love this implementation: having a subset of favorite desktops could definitely be useful and it would be much easier to manage. |
Agreed. Feel free to merge this.
Would you mind doing the release? |
I'll do it: no problem, just two questions:
|
We've discussed this previously. I think we should use HTML for releases, but I don't want us to maintain both versions manually. We need a proper build script that converts the MD to HTML, and probably to handle other release tasks as well, but that's future work, so let's continue just using MD for now.
I installed git on Windows and it pulls and converts to windows line terminators and converts it back to unix ones when it pushes. The repo code should only have unix line terminators.
Make just one release and list all of the changes. Also, one last detail: please address the comment that I left in the code for this branch related to that global variable you introduced. |
I've built the release and fixed the global variables. I'll work on the main problems you have found when I'll have time as it looks like it won't be a five minute fix. Thank you for your time and assitance, have a nice weekend! |
No worries, thank you so much for your contributions again. Great work as always :) Have a nice weekend. :) |
I am eperiencing some trouble implementing this correctly: it looks like it would involve a minimum of two elements stored as "history of previous active desktops" nad still I haven't figured it out correctly. The more I work on this the more I think this is not the best way to realize it: I really think your "favourite desktops" feature would be much more useful and senseful. |
I've tested this with all the combinations of programs, windows, and keybindings I could think of: it probably should be tested by someone else to confirm that everything works ok.
Maybe @robertmeta could help as he was interested in the feature.
This solves #40.