Skip to content

Commit

Permalink
(chocolateyGH-530) Enable/disable News and Interests icon
Browse files Browse the repository at this point in the history
Add functionality to enable/disable the News and Interests taskbar
icon, similar to the Bing Search box.
  • Loading branch information
calmcl1 committed Apr 20, 2023
1 parent a9549b9 commit 69d4db4
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion Boxstarter.WinConfig/Set-BoxstarterTaskbarOptions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ Changes the behavior of the taskbar when using multiple displays. Valid inputs a
.PARAMETER MultiMonitorCombine
Changes the taskbar icon combination style for non-primary displays. Valid inputs are Always, Full, and Never.
.PARAMETER NewsIcons
Changes how the 'News and Interests' icons are displayed. Valid inputs are IconsText, Icons, and Never.
.EXAMPLE
Set-BoxstarterTaskbarOptions -Lock -AutoHide -AlwaysShowIconsOff -MultiMonitorOff
Expand Down Expand Up @@ -120,7 +123,11 @@ multi-monitor support and always combine icons on non-primary monitors.

[Parameter(ParameterSetName = 'EnableSearchBox')]
[switch]
$EnableSearchBox
$EnableSearchBox,

[ValidateSet('IconsText', 'Icons', 'Never')]
[String]
$NewsIcons
)

$baseKey = 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion'
Expand Down Expand Up @@ -254,6 +261,23 @@ multi-monitor support and always combine icons on non-primary monitors.
Set-ItemProperty -Path (Join-Path -Path $baseKey -ChildPath 'Search') -Name 'SearchBoxTaskbarMode' -Value 0 -Type DWord -Force
}

switch ($NewsIcons) {
"IconsText" {
Set-ItemProperty -Path (Join-Path -Path $baseKey -ChildPath 'Feeds') -Name ShellFeedsTaskbarViewMode -Value 0
Set-ItemProperty -Path (Join-Path -Path $baseKey -ChildPath 'Feeds') -Name ShellFeedsTaskbarPreviousViewMode -Value 2
}

"Icons" {
Set-ItemProperty -Path (Join-Path -Path $baseKey -ChildPath 'Feeds') -Name ShellFeedsTaskbarViewMode -Value 1
Set-ItemProperty -Path (Join-Path -Path $baseKey -ChildPath 'Feeds') -Name ShellFeedsTaskbarPreviousViewMode -Value 0
}

"Never" {
Set-ItemProperty -Path (Join-Path -Path $baseKey -ChildPath 'Feeds') -Name ShellFeedsTaskbarViewMode -Value 2
Set-ItemProperty -Path (Join-Path -Path $baseKey -ChildPath 'Feeds') -Name ShellFeedsTaskbarPreviousViewMode -Value 0
}
}

Restart-Explorer
}

Expand Down

0 comments on commit 69d4db4

Please sign in to comment.