Skip to content
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

Naming Virtual Desktops #17

Open
moser96 opened this issue Nov 24, 2016 · 15 comments
Open

Naming Virtual Desktops #17

moser96 opened this issue Nov 24, 2016 · 15 comments

Comments

@moser96
Copy link

moser96 commented Nov 24, 2016

It would be neat if we could name or alias the virtual desktops.

@ericnewton76
Copy link

This is probably not supported by the underlying api, and therefore would not be implemented here... sorry!

@mzomparelli
Copy link

I don't even see the point of naming a desktop. The names are the numbers.

@MetaFight
Copy link

@moser96 I agree, naming them would be useful. The Windows 10 Feedback app already has a few entries for this suggestion. You should find them and upvote them.

@mzomparelli
Copy link

If anyone is interested, this app does useful things including naming desktops.

https://github.com/mzomparelli/zVirtualDesktop

@MetaFight
Copy link

@mzomparelli Sorry, but your self-promotion feels a bit heavy handed and in poor taste. Another project's issue tracker really isn't the place for ads.

@mzomparelli
Copy link

The app was built from this project and specifically does what this issue is asking. I don’t see a problem with my comment.

@Beej126
Copy link

Beej126 commented May 17, 2020

@ericnewton76: This is probably not supported by the underlying api, and therefore would not be implemented here... sorry!

Windows 10 now supports this natively... will have to keep an eye out for if/where this gets exposed via apis

especially now that i've created this taskbar widget for myself based on this lib... it would be nice to integrate with this new native Windows behavior... i.e. dump my names list and register for name change notifications from Windows

@mzomparelli: I don't even see the point of naming a desktop. The names are the numbers.

seeing them titled at a glance helps me remember what the session is for ... hovering in the TaskView mode shows you the windows so you can get there pretty quick but the names are a nice little optimization... amazing msft applied the resources to make this happen out of all the priorities that fly

@lutz
Copy link

lutz commented Jun 15, 2020

Currently with windows 2004 it is possible to get (not set) the name for the current virtual desktop. I wrote about it in a other github project.

@Beej126
Copy link

Beej126 commented Jun 15, 2020

@lutz, thanks for sharing! this is good news. i will incorporate into my virtdesk taskbar widget project.

seeing that we can set the name via registry and recycle explorer.exe is not too bad... it means i can drop my internal list of names and base everything on that registry, yay! =)

please do include me if you find msft provides set name api at some point.

@lutz
Copy link

lutz commented Jun 15, 2020

@Beej126 No problem currently it seems to be no way to set the name. You can manual edit the registry entry but this is not auto synced to the explorer (in my personal test). You can restart the Explorer but for me this is very hacky. I hope in future the windows api will extend for these functions. I don`t need the possibilty to set the name. I have a small dev project which is similar to your project. I want only a small name indicator. The rest of the functions (creating, switching and so on) i use the regular keybindings of windows (maybe i will add keybinding to CTRL+WIN+[Number] to switch to a specific desktop). If i have time to understand the code here for VirtualDesktop.CurrentChanged event i hope i can replace my global key hook.

@Grabacr07 Great work here 👍

@Beej126
Copy link

Beej126 commented Jun 15, 2020

@lutz, that's awesome you independently picked up on the same general idea! deskband with name just feels so right since taskbar is the one static component during desktop changes... i couldn't resist implementing desktop change via dropdown in that space... it has quickly become instinctual which isn't always the case with new UI. i will build yours and check out UI =)

VirtualDesktop.CurrentChanged event is very straightforward (implementation example)

@lutz
Copy link

lutz commented Jun 16, 2020

VirtualDesktop.CurrentChanged event is very straightforward (implementation example)

I meant the logic behind because i tied the dll from this project but ran into some issues like #44 and the event never raised when i comment the initialize methode out.

@MScholtes
Copy link

In Windows 10 20H1 there are two additional COM interfaces present that expand the original ones with functions to support desktop naming:

Interface IVirtualDesktop2 (GUID {31EBDE3F-6EC3-4CBD-B9FB-0EF6D09B41F4}) with a new function you could declare as void GetName([MarshalAs(UnmanagedType.HString)] out string name);

Interface IVirtualDesktopManagerInternal2 (GUID {0F3A72B0-4566-487E-9A33-4ED302F6D6CE}) with a new function you could declare as void SetName(IVirtualDesktop desktop, [MarshalAs(UnmanagedType.HString)] string name);

With those declarations desktop naming can be implemented without the need to recycle explorer (investigated with the great OleViewDotNet).

@lutz
Copy link

lutz commented Jun 16, 2020

@MScholtes Big thanks for finding it out! This is a better way instead of look into the registry.

@Beej126
Copy link

Beej126 commented Jun 16, 2020

this is killer! thank you for sharing @MScholtes !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants