-
-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to add the custom app to the focus assist priority list and would doing this making burnt toast notifications obey the focus assist rules? #112
Comments
Hey @Cenwulf, just moved this over to a new issue. Will pop some comments here in a sec |
Assuming you've created a custom AppID (as referenced in #96) it'll show up in the list of apps in the Settings app. (n.b. you'll have needed to use it for a toast notification at least once first) This means you can add it to your "priority" list in the Focus assist settings. Settings app -> System -> Focus assist -> Customize your priority list Once there, scroll down to apps and click Add an app: In my case I've registered a "BurntToast" app id This will mean toasts with that ID will still be displayed if you have focus assist set to "Priority only" but if you crank it up to "Alarms only" it won't. We do have an option here though; you can specify that your toast notification is for an alarm. $Text1 = New-BTText -Content 'This is an alarm'
$ImagePath = 'C:\Program Files\PowerShell\7-preview\assets\Powershell_av_colors.ico'
$Image1 = New-BTImage -Source $ImagePath -AppLogoOverride -Crop None
$Audio1 = New-BTAudio -Source 'ms-winsoundevent:Notification.Looping.Alarm6'
$Binding1 = New-BTBinding -Children $Text1 -AppLogoOverride $Image1
$Visual1 = New-BTVisual -BindingGeneric $Binding1
$Content1 = New-BTContent -Visual $Visual1 -Audio $Audio1 -Scenario Alarm
Submit-BTNotification -Content $Content1 The key is the "Scenario" on |
Thanks for the speedy reply! You've made realise I can also add Windows PowerShell to the priority list and get the desired behaviour without the need to install a custom AppID. I think the bit I was missing was that I needed to run BurntToast at least once to get PowerShell to appear in the list of available apps. Thanks again for all your help. |
No prob! Yeah the reason for running once is that it injects some stuff into the registry. Interestingly it then also shows up on the notifications settings page and from there you can specify how many to show in the Action Center and how important they are (so which other notifications they'll appear "above".) I'll leave this issue open, as I'm planning on using it as a prompt for a blog post/documentation on the topic. Thanks for reaching out! |
@Windos @Cenwulf Hey Guys, would you share the powershell code to make powershell a priority app? I just tried while 'Do not disturb' enabled, then using New-BurntToastNotification @Splat (Alarm10) and Submit-BTNotification -Content $Content1(also alarm10 + scenario=Alarm) an neither pop up. I am using BT right after win11 provisioning and on first login some scripts launch needing user input, a toast alarm would grab their attention. But all notifications go to the message center without 'toasting'. It seems this is due to windows going in to DND mode the first hour after major windows updates (CU, LCU..) , and it sees an installation as a major update I guess. Would be great if I could get BT on the priolist or disable Do Not Disturb altogether programmaticly on first login. |
Is it possible to add the custom app to the focus assist priority list and would doing this making burnt toast notifications obey the focus assist rules?
Originally posted by @Cenwulf in #96 (comment)
The text was updated successfully, but these errors were encountered: