vklachkov / windows-virtualdesktopindicator Goto Github PK
View Code? Open in Web Editor NEWVirtual desktop indicator for system tray
License: MIT License
Virtual desktop indicator for system tray
License: MIT License
Hi
When checking IsPinnedApp
of any app like notepad, word, excel etc then on the line GetAppUserModelId
exception thrown: Marshalling as IInspectable is not supported in the .NET runtime
If I remove this line [InterfaceType(ComInterfaceType.InterfaceIsIInspectable)]
at IApplicationView
then Error received The method or operation is not implemented
.
Checked on Windows Build: 19045, 22000, 22621
.Net 6.0
The app does not work on Windows 11 Beta. It just shows many messages saying: "An unhandled error occured".
Any chances to make it work on Windows 11 in the future?
It would be very nice to be able to see the desktop name, somehow.
Suggestion for how it could be shown, in order of (my) preference:
Thanks for the super useful virtualdesktop indicator - makes virtual desktops on windows much more useable!
Ive downloaded the latest version , but it quit after minutes running .
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19045 N/A Build 19045
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Original Install Date: 3/8/2023, 7:35:43 AM
System Boot Time: 3/27/2023, 1:50:56 PM
System Manufacturer: LENOVO
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 94 Stepping 1 GenuineIntel ~2208 Mhz
BIOS Version: LENOVO FWKTBFA , 6/23/2022
Windows Directory: C:\Windows
System Directory: C:\Windows\system32
Boot Device: \Device\HarddiskVolume1
System Locale: en-us;English (United States)
Input Locale: en-us;English (United States)
Time Zone: (UTC+08:00) Taipei
Total Physical Memory: 16,181 MB
Available Physical Memory: 5,283 MB
Virtual Memory: Max Size: 29,206 MB
Virtual Memory: Available: 4,258 MB
Virtual Memory: In Use: 24,948 MB
Page File Location(s): C:\pagefile.sys
Domain: WORKGROUP
Logon Server: \\WIN11-FROMMONTE
Hotfix(s): 10 Hotfix(s) Installed.
Would be great if you could use the mouse scrollwheel on the icon to switch/scroll desktops left/right.
I'd like to start by thanking you for this tool. I've setup for the app to start at startup. However, this is the error that I see in the event viewer:
Log Name: Application
Source: .NET Runtime
Date: 3/21/2022 11:23:08
Event ID: 1026
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: DESKTOP-KLDMP0F
Description:
Application: VirtualDesktopIndicator.exe
CoreCLR Version: 6.0.322.12309
.NET Version: 6.0.3
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeInitializationException: The type initializer for 'VirtualDesktopIndicator.Config.UserConfig' threw an exception.
---> System.UnauthorizedAccessException: Access to the path 'C:\WINDOWS\system32\vdi_config.json' is denied.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.File.WriteAllText(String path, String contents)
at VirtualDesktopIndicator.Config.UserConfig.Save() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 51
at VirtualDesktopIndicator.Config.UserConfig.LoadFromFile(String path) in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 38
at VirtualDesktopIndicator.Config.UserConfig..cctor() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 8
--- End of inner exception stack trace ---
at VirtualDesktopIndicator.Config.UserConfig.get_Current() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 8
at VirtualDesktopIndicator.Components.DesktopNotifyIcon.get_FontName() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Components\DesktopNotifyIcon.cs:line 77
at VirtualDesktopIndicator.Components.DesktopNotifyIcon..ctor(IVirtualDesktopManager virtualDesktop) in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Components\DesktopNotifyIcon.cs:line 109
at VirtualDesktopIndicator.Program.Main() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Program.cs:line 15
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1026</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2022-03-21T16:23:08.2517747Z" />
<EventRecordID>39490</EventRecordID>
<Correlation />
<Execution ProcessID="21120" ThreadID="0" />
<Channel>Application</Channel>
<Computer>DESKTOP-KLDMP0F</Computer>
<Security />
</System>
<EventData>
<Data>Application: VirtualDesktopIndicator.exe
CoreCLR Version: 6.0.322.12309
.NET Version: 6.0.3
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeInitializationException: The type initializer for 'VirtualDesktopIndicator.Config.UserConfig' threw an exception.
---> System.UnauthorizedAccessException: Access to the path 'C:\WINDOWS\system32\vdi_config.json' is denied.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.File.WriteAllText(String path, String contents)
at VirtualDesktopIndicator.Config.UserConfig.Save() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 51
at VirtualDesktopIndicator.Config.UserConfig.LoadFromFile(String path) in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 38
at VirtualDesktopIndicator.Config.UserConfig..cctor() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 8
--- End of inner exception stack trace ---
at VirtualDesktopIndicator.Config.UserConfig.get_Current() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Config\UserConfig.cs:line 8
at VirtualDesktopIndicator.Components.DesktopNotifyIcon.get_FontName() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Components\DesktopNotifyIcon.cs:line 77
at VirtualDesktopIndicator.Components.DesktopNotifyIcon..ctor(IVirtualDesktopManager virtualDesktop) in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Components\DesktopNotifyIcon.cs:line 109
at VirtualDesktopIndicator.Program.Main() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Program.cs:line 15
</Data>
</EventData>
</Event>
This error log is followed by another error log:
Log Name: Application
Source: Application Error
Date: 3/21/2022 11:23:08
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: DESKTOP-KLDMP0F
Description:
Faulting application name: VirtualDesktopIndicator.exe, version: 1.0.0.0, time stamp: 0x61735063
Faulting module name: KERNELBASE.dll, version: 10.0.22000.527, time stamp: 0x71a5cb5d
Exception code: 0xe0434352
Fault offset: 0x000000000004478c
Faulting process id: 0x5280
Faulting application start time: 0x01d83d3ff345669f
Faulting application path: C:\VirtualDesktopIndicator\VirtualDesktopIndicator.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: fd13f733-59bf-4c71-b5a3-6cdbb00460cd
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>100</Task>
<Opcode>0</Opcode>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2022-03-21T16:23:08.4236494Z" />
<EventRecordID>39491</EventRecordID>
<Correlation />
<Execution ProcessID="21268" ThreadID="0" />
<Channel>Application</Channel>
<Computer>DESKTOP-KLDMP0F</Computer>
<Security />
</System>
<EventData>
<Data>VirtualDesktopIndicator.exe</Data>
<Data>1.0.0.0</Data>
<Data>61735063</Data>
<Data>KERNELBASE.dll</Data>
<Data>10.0.22000.527</Data>
<Data>71a5cb5d</Data>
<Data>e0434352</Data>
<Data>000000000004478c</Data>
<Data>5280</Data>
<Data>01d83d3ff345669f</Data>
<Data>C:\VirtualDesktopIndicator\VirtualDesktopIndicator.exe</Data>
<Data>C:\WINDOWS\System32\KERNELBASE.dll</Data>
<Data>fd13f733-59bf-4c71-b5a3-6cdbb00460cd</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
</Event>
If clicking the virtualdesktop-indicator button did the same a clicking the Task View button - i.e. showed the built in Task View screen, then I could hide the Task View button and just have one desktop management button on the taskbar instead of two.
Works fine for about 10 seconds, then the icon doesn't update and when I hover it, it disappears.
VDI has a tendency to crash without any error message and I highly suspect that this has something to do with the mouse scroll hook.
VDI needs to be debugged until it crashes again to discover the root cause of this.
Repro:
VirtualDesktopIndicator encountered an unhandled error:
System.Runtime.InteropServices.COMException (0x800706F4): A null reference pointer was passed to the stub. (0x800706F4)
at VirtualDesktopIndicator.Native.VirtualDesktop.Implementation.VirtualDesktopWin11.IVirtualDesktopManagerInternal.GetDesktops(IntPtr hWnd, IObjectArray& desktops)
at VirtualDesktopIndicator.Native.VirtualDesktop.Implementation.VirtualDesktopWin11.DesktopManager.GetDesktopIndex(IVirtualDesktop desktop) in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Native\VirtualDesktop\Implementation\VirtualDesktopWin11.cs:line 251
at VirtualDesktopIndicator.Native.VirtualDesktop.Implementation.VirtualDesktopWin11.Current() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Native\VirtualDesktop\Implementation\VirtualDesktopWin11.cs:line 11
at VirtualDesktopIndicator.Components.DesktopNotifyIcon.get_CurrentVirtualDesktop() in C:\Users\Valery\Desktop\windows-virtualdesktopindicator\src\Components\DesktopNotifyIcon.cs:line 117
Just wanted to let users know that the project is not working anymore on Windows 11 version 22H2.
PS: I know this project seems to be abandoned, this message is only informative.
We need to implement CI/CD, add info about config into README and publish latest releast
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.