-
Notifications
You must be signed in to change notification settings - Fork 49
Virtual desktop Tasksbar icons #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You don't need the ChangeIcon function, if you add |
Thanks vlachig That sounds good but I can't get it to work. Could you possibly give me the exact line of code? I had already tried but didn't work for moving to a relative desktop with the right and left arrow keys e.g. #!left::VD.goToDesktopNum(VD.MoveWindowToRelativeDesktopNum("A", -1)) I am also not not sure that your suggestion would work for that either as as the desktop number is not specifically specified . Thanks again |
In the file _VD.ahk search for the function goToDesktopNum(desktopNum) and replace it by this one:
|
Another solution:
|
I'm not sure if this is the right place or if anyone is interested but but I've made a small addition to FuPeiJiang's excellent code to switch the AutoHotkey icon to show the number of the virtual desktop on the taskbar.
Prerequisite is to show the AutoHotkey icon on the taskbar - this can be done in Settings > Personalisation > Taskbar.
You then need an icon that shows the number of each virtual desktop. I use six virtual desktops and have six icons stored in a folder referenced by the code). The icons are named 1.ico, 2.ico etc. Copies are attached
icons.zip.
I am sure there must be an easier way of running the code so would welcome any suggestions but I have added a function to obtain the desktop number:
+++++++++++++++++++
ChangeIcon() ;define function
{
Desktop := VD.getCurrentDesktopNum()
TraySetIcon("D:\Data\AutoHotkey2\icons" Desktop ".ico")
}
ChangeIcon ; call function
+++++++++++++++++++
And have then added the ChangeIcon function to each of the keyboard shortcuts. For example the Ctrl + Win +Numpad shortcut
++++++++++++++++++++
;#useful stuff
^#numpad1::
{
VD.goToDesktopNum(1)
ChangeIcon ; function added
}
^#numpad2::
{
VD.goToDesktopNum(2)
ChangeIcon ; function added
}
++++++++++++++++++
etc. etc.
I'm sure it must be possible to trigger the ChangeIcon function with every desktop change without the necessity for adding the code to each of the keyboard shortcuts but my AutoHotkey skills are rather limited.
The text was updated successfully, but these errors were encountered: