[Menu] Winget - Windows Package Manager

Ready-made snippets of menu items you can quickly insert into your config file.


Post Reply
Rubic
Posts: 15
Joined: Fri Jan 19, 2024 2:41 pm

[Menu] Winget - Windows Package Manager

Post by Rubic »

winget.png
winget.png (26.95 KiB) Viewed 2403 times
winget with shift key.png
winget with shift key.png (43.35 KiB) Viewed 2403 times

The context menu with Winget is a convenient feature integrated into the taskbar of Windows 10 and Windows 11 (provided by Microsoft's Windows Package Manager, which is both free and open-source). This menu serves as a swift and straightforward method for installing pre-prepared applications.

Here's how it works:

  • Accessing the Menu: You can find this menu by right-clicking on the taskbar. It provides quick access to various pre-configured applications.

  • Example Application: One of the applications available through this menu is Visual Studio Code. This program is particularly useful for editing Nilesoft scripts, thanks to its "Nilesoft Shell File Formatter" plugin.

  • Installation Management: Once you've installed an application through this menu, it will be hidden from view, leaving only the remaining not installed programs visible. However, you can reveal hidden programs by holding down the Shift key while clicking on the menu.

  • Customization: Users have the option to create their own custom items for the menu. They can utilize websites like https://winstall.app/ or https://winget.run/ to generate short commands for Winget, facilitating the process of adding new items to the menu.

  • Bonus Feature: Additionally, users can explore Chris Titus Tech's Windows Utility, which offers a collection of handy tools for Windows. More information about this utility can be found at https://christitus.com/windows-tool/.

In summary, the context menu with Winget provides a user-friendly way to manage and install applications on Windows systems, enhancing efficiency and convenience for users.

$ico_winget = icon.res(path.combine(sys.bin, 'shell32.dll'), 122)
menu(title="winget" type='Taskbar' where=sys.version.build>=1809 image=ico_winget)
{
	item(title='Chris Titus Tech@"'"s Windows Utility' image=image.glyph(\uE142) sep='after'
		admin cmd='powershell.exe' args='iwr -useb https://christitus.com/win | iex')
	item(title='VSCode' image=ico_winget
		where=( key.shift() or not(path.exists('@user.localappdata\Programs\Microsoft VS Code')))
		cmd='powershell.exe' args='winget install --id=Microsoft.VisualStudioCode -e')
	item(title='.NET SDK' image=ico_winget
		where=( key.shift() or not(path.exists(path.combine(sys.prog ,'dotnet'))))
		cmd='powershell.exe' args='winget install --id=Microsoft.dotnet -e')
	item(title='.NET SDK Preview' image=ico_winget
		where=( key.shift() or not(path.exists(path.combine(sys.prog ,'dotnet'))))
		cmd='powershell.exe' args='winget install --id=Microsoft.dotnetPreview -e')
	item(title='GIT' image=ico_winget
		where=( key.shift() or not(path.exists(path.combine(sys.prog ,'Git'))))
		cmd='powershell.exe' args='winget install --id=Git.Git -e')
	separator()
	item(title='Everything...' image=ico_winget
		where=( key.shift() or not(path.exists(path.combine(sys.prog ,'Everything'))))
		cmd='powershell.exe' args='winget install --id=voidtools.Everything -e')
	item(title='Notepad++' image=ico_winget
		where=( key.shift() or not(path.exists(path.combine(sys.prog ,'Notepad++'))))	
		cmd='powershell.exe' args='winget install --id=Notepad++.Notepad++ -e')
	item(title='WinRAR' image=ico_winget
		where=(key.shift() or not(path.exists(path.combine(sys.prog, 'WinRar'))))
		cmd='powershell.exe' args='winget install --id=RARLab.WinRAR -e')
	item(title='7-Zip' image=ico_winget
		where=(key.shift() or not(path.exists(path.combine(sys.prog, '7-Zip'))))
		cmd='powershell.exe' args='winget install --id=7zip.7zip -e')
	separator()
	item(title='winstall.app' image=image.glyph(\uE11F) cmd='https://winstall.app/')
	item(title='winget.run' image=image.glyph(\uE11F) cmd='https://winget.run/')
}
Post Reply