pmb6tz / windows-desktop-switcher

An AutoHotKey script for Windows that lets a user change virtual desktops by pressing CapsLock + <num>.
MIT License
1.23k stars 230 forks source link

Thanks and a feature request: switching wallpapers when desktop switches #11

Closed ghost closed 5 years ago

ghost commented 8 years ago

I was looking for a command to get the current virtual desktop ID, because I wanted to use wallpapers for different virtual desktops. The functions in your code worked well and saved me hours of putting together some API DLL or figuring out how to extract the ID from the registry.

Here's the (mostly) finished result: https://github.com/noido/ahk-change_windows_virtualDestop_background

Enjoy :)

hawkins commented 8 years ago

Switching wallpapers is an interesting idea, but it seems to me that it is out of scope for this project.

Looks like you're making progress on it in your own project regardless, so keep it up!

mzomparelli commented 7 years ago

@noido It looks like the developer quit. Try the app that I am developing. It's fantastic.

https://github.com/mzomparelli/zVirtualDesktop

pmb6tz commented 7 years ago

@mzomparelli don't worry I haven't quit--I think there are other good options available now and I'll probably add a list of them to the readme--until then though, please stop advertising :-).

mzomparelli commented 7 years ago

I wouldn't call it advertising. I'm reading through a lot of these and providing solutions to their bugs. They deserve to hear about other solutions. I would do the same if someone else made it. Anyway, did you want the solution to the flashing window?

pmb6tz commented 7 years ago

Sounds good--just stay on topic please!

ghost commented 7 years ago
  1. I am now looking for another feature which is already implemented in Windows but I haven't yet figured out how to do it on AutoHotKey:

How do I tell Windows (or the active program) to pin its window or all its app's windows to all desktops?

In another virtual desktop manager, I found an AutoHotKey line that looks something like PostMessage, % WM_SYSCOMMAND , % desktopnumber, % windowid, , % "ahk_id " windowid (exact line is line 82 of https://github.com/jpginc/windows10DesktopManager/blob/master/dllWindowMover.ahk )

To the best of my understanding, what this is doing is telling that window that it is now on the other desktop.

I have no idea how to derive this command, and I am also wondering how also to derive a command that would tell the window (or the windows shell, if that is the case) to pin the app (or just the current window) to all Virtual Desktops.


  1. Also, I thought of and (sloppily) implemented another cool feature for a virtual desktop manager, which is to show the icons differently on different desktops. I did this by calling an external program called DesktopOK, which has the ability to save and load arrangements, and can be called from command line.

  1. I think it is somewhat silly that our programs are ahead of Window's basic functionality... I mean, I searched but I couldn't even find an official Windows API or documentation with the command for pinning the windows. So maybe if someone tells the right people at Microsoft we can get these features (or at least I can figure out how to make my own buttons; haha).

The main reason I am even writing these codes is because I want these features myself and they are not implemented yet >_<

Thank you all for sharing and I will look into this.

pmb6tz commented 5 years ago
  1. I am now looking for another feature which is already implemented in Windows but I haven't yet figured out how to do it on AutoHotKey:

How do I tell Windows (or the active program) to pin its window or all its app's windows to all desktops?

In another virtual desktop manager, I found an AutoHotKey line that looks something like PostMessage, % WM_SYSCOMMAND , % desktopnumber, % windowid, , % "ahk_id " windowid (exact line is line 82 of https://github.com/jpginc/windows10DesktopManager/blob/master/dllWindowMover.ahk )

To the best of my understanding, what this is doing is telling that window that it is now on the other desktop.

I have no idea how to derive this command, and I am also wondering how also to derive a command that would tell the window (or the windows shell, if that is the case) to pin the app (or just the current window) to all Virtual Desktops.

  1. Also, I thought of and (sloppily) implemented another cool feature for a virtual desktop manager, which is to show the icons differently on different desktops. I did this by calling an external program called DesktopOK, which has the ability to save and load arrangements, and can be called from command line.

  2. I think it is somewhat silly that our programs are ahead of Window's basic functionality... I mean, I searched but I couldn't even find an official Windows API or documentation with the command for pinning the windows. So maybe if someone tells the right people at Microsoft we can get these features (or at least I can figure out how to make my own buttons; haha).

The main reason I am even writing these codes is because I want these features myself and they are not implemented yet >_<

Thank you all for sharing and I will look into this.

I like the idea and have escalated it to its own issue. The other functionality requested in this issue is a bit out of scope for this project IMO.