moudey / Shell

Powerful context menu manager for Windows File Explorer
https://nilesoft.org
MIT License
2.88k stars 96 forks source link

Separate menu options for the Taskbar and Start Menu #439

Closed PoloniumRain closed 3 months ago

PoloniumRain commented 3 months ago

NS has the same menu options for both the Taskbar and Start Menu. So all of the Taskbar options are added to the top of the context menu for the Start Button. Because of this some options are duplicated and obviously you cannot customise the menu options for one of them without affecting the other.

So in my case i have these duplicates (i'm using StartAllBack here)...

StartMenu

The Start Menu should have it's own separate menu options when right clicking on it, just like a stock install of Windows does.

Love this program btw :) I've tried many similar alternatives and NS is the best.

Edit: Oh and there's an error on your site with the latest version, under Changes:

Version 1.9.15 02/14/2023

Isn't that meant to say 2024?

RubicBG commented 3 months ago

The class name for the start button and taskbar are the same for StartAllBack. To avoid this you can add where=window.parent.name!='Shell_TrayWnd' as a condition.

open imports\taskbar.nss and replace where=@(this.count == 0) with where=@(this.count == 0) and (window.parent.name!='Shell_TrayWnd')

....and.... launch the configuration panel of StartAllBack


menu(title='StartAllBack' where=path.exists('@user.localappdata\StartAllBack\StartAllBackCfg.exe') image='@user.localappdata\StartAllBack\StartAllBackCfg.exe') {
            item(title='Settings' image=icon.settings cmd='@user.localappdata\StartAllBack\StartAllBackCfg.exe') }```
PoloniumRain commented 3 months ago

Ah so it was StartAllBack causing the issue! And thanks @RubicBG that worked great :)

Btw i use Start11 V2 on my main Win11 PC, but it has replaced NS with the Start11 context menu on both the Taskbar and Start. Is it possible to get the NS menu working on the Taskbar/Start button?

RubicBG commented 3 months ago

image

PoloniumRain commented 3 months ago

No idea how i missed that....

After doing the above NS will now work on the Taskbar central area, but not the sides of the Taskbar, so it wont work when right clicking on the time/date, notification, volume, and network icons, and the Start Menu. Instead it looks like it's showing the default Windows 11 context menu.

This is my taskbar.nss file:

menu(type="taskbar" vis=key.shift() or key.lbutton() pos=0 title=app.name image=\uE249)
{
    item(title="config" image=\uE10A cmd='"@app.cfg"')
    item(title="manager" image=\uE0F3 admin cmd='"@app.exe"')
    item(title="directory" image=\uE0E8 cmd='"@app.dir"')
    item(title="version\t"+@app.ver vis=label col=1)
    item(title="docs" image=\uE1C4 cmd='https://nilesoft.org/docs')
    item(title="donate" image=\uE1A7 cmd='https://nilesoft.org/donate')
}
menu(where=@(this.count == 0) type='taskbar' image=icon.settings expanded=true)
{
    item(title=title.desktop sep image=icon.desktop cmd=command.toggle_desktop)
    item(title=title.settings image=icon.settings(auto, image.color1) cmd='ms-settings:')
    item(title=title.control_panel image=\uE0F3 cmd='shell:::{5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}')
    item(title=str.res('regedit.exe,-16') sep=before image cmd='regedit.exe')
    item(title=title.task_manager image=icon.task_manager cmd='taskmgr.exe')
    item(title=title.taskbar_Settings sep=before image=inherit cmd='ms-settings:taskbar')
    item(title='Start11' image=icon.properties cmd='C:\Program Files (x86)\Stardock\Start11\Start11Config.exe') 
    item(vis=key.shift() title=title.exit_explorer cmd=command.restart_explorer)
}
RubicBG commented 3 months ago

NS can't modify them - they are not shell components

PoloniumRain commented 3 months ago

That's a shame. Thanks for all the help, i'll close this now.

PoloniumRain commented 3 months ago

Opening this again because i've done a ton of testing and found the real issue...

So the NS menu does not appear on the Start button, network/wifi, sound, date/time and notification areas in the Taskbar because NS doesn't properly work with the latest versions of Windows 11.

I've tested Win11 build 22631.2861 which is the latest downloadable ISO from Microsoft, and also build 22631.3235. Both are completely clean installs. The only thing i've installed is Nilesoft Shell. I've also tried using an Administrator account and running the installation as Admin, but it makes no difference.

However, NS will work perfectly on the latest version of Windows 10. All of the NS menus show up on every Taskbar item.

On Win11 in the images below you can see that NS is only working on the empty Taskbar area:

NS1

When right clicking on anything else in the Taskbar it will just show the default Windows 11 menus:

NS2

NS3

I'm using the latest Shell, version 1.9.15.

And the reason NS was working for me before on Win 11 was because it will work with StartAllBack (i had version 3.7.5) but once StartAllBack is uninstalled NS will no longer work with the Taskbar.

RubicBG commented 3 months ago

What you described about the work of the NS is completely true. But it's not a "real problem", rather missing futures/functionality.

Starting with Windows 11, Microsoft is trying to replace shell components - in Taskbar, the "modern" context menu, and many others.

One of them is the address bar in Windows Explorer image I was able to edit it and not only with icons, I added more commands. image I was going to share the information and Microsoft released another update and this is no longer possible, not for Windows 11 image They both look similar, but the "old" menu is made up of 100% shell components that NS can edit them, the "new" menu doesn't use the same components. Тhere are tools on the internet that recognize shell components and give additional information about them - but they don't recognize the "new" menu at all

Тhe above example is easier to explain than the taskbar. The "old" taskbar is made up of different shell components and each has its own menus (This is the ExplorerPatcher win 10 taskbar. The tool recognizes 4 components - marked in a red rectangle and I can even make them invisible temporarily)
Recording 2024-03-18 131939 The "new" Taskbar on Windows 11 is recognized as a single object, and does not use shell components - only a "frame"/container to place the "new" taskbar in place of the "old" taskbar. People complain that Microsoft has cut functionality in Windows 11, but they are rebuilding everything from scratch

moudey has somehow managed to show an editable context menu on the taskbar, but there is still no logic built in how to recognize individual components when they are not shell components

A new version of the NS is being built which will be more flexible, with it there is a greater probability that this will also be achievable. For the moment it is not even an alpha version and nothing can be configured on it yet - nevertheless, moved commands work. image

PoloniumRain commented 3 months ago

Thanks for taking the time to clearly explain all that. I'm definitely looking forward to that new version of NS, but as MS continue replacing shell components this could be a big problem for NS and similar tools. Hopefully more workarounds are found...

Suppose i'll close this issue again :)