From 703f5a307ce6b55d9c899ce702c8f382998acec1 Mon Sep 17 00:00:00 2001 From: Jan Gabriel Date: Tue, 25 Aug 2020 08:54:39 +0200 Subject: [PATCH] add bluetooth tray control --- Default.preset | 1 + Win10.psm1 | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/Default.preset b/Default.preset index d73b0db2..a787de55 100644 --- a/Default.preset +++ b/Default.preset @@ -137,6 +137,7 @@ ShowSmallTaskbarIcons # ShowLargeTaskbarIcons SetTaskbarCombineWhenFull # SetTaskbarCombineNever # SetTaskbarCombineAlways HideTaskbarPeopleIcon # ShowTaskbarPeopleIcon ShowTrayIcons # HideTrayIcons +ShowBluetoothTrayIcon # HideBluetoothTrayIcon # ShowSecondsInTaskbar # HideSecondsFromTaskbar DisableSearchAppInStore # EnableSearchAppInStore DisableNewAppPrompt # EnableNewAppPrompt diff --git a/Win10.psm1 b/Win10.psm1 index f6d71ecb..133a7316 100644 --- a/Win10.psm1 +++ b/Win10.psm1 @@ -2069,6 +2069,18 @@ Function HideTrayIcons { Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoAutoTrayNotify" -ErrorAction SilentlyContinue } +# Show Bluetooth tray icon +Function ShowBluetoothTrayIcon { + Write-Output "Showing Bluetooth tray icon..." + Set-Itemproperty 'HKCU:\Control Panel\Bluetooth' -Name 'Notification Area Icon' -Value '1' -Type DWord +} + +# Hide Bluetooth tray icon +Function HideBluetoothTrayIcon { + Write-Output "Hiding Bluetooth tray icon..." + Set-Itemproperty 'HKCU:\Control Panel\Bluetooth' -Name 'Notification Area Icon' -Value '0' -Type DWord +} + # Show seconds in taskbar Function ShowSecondsInTaskbar { Write-Output "Showing seconds in taskbar..."