Merge pull request #11 from metbril/fix-10

Check localized status in taskbar overlay icon
pull/22/head
EBOOZ 4 years ago committed by GitHub
commit 3aa916e20b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -31,9 +31,11 @@ $HAUrl = "<HAUrl>" # Example: https://yourha.duckdns.org
# Set language variables below # Set language variables below
$lgAvailable = "Available" $lgAvailable = "Available"
$lgBusy = "Busy" $lgBusy = "Busy"
$lgOnThePhone = "On the phone"
$lgAway = "Away" $lgAway = "Away"
$lgBeRightBack = "Be right back" $lgBeRightBack = "Be right back"
$lgDoNotDisturb = "Do not disturb" $lgDoNotDisturb = "Do not disturb"
$lgFocusing = "Focusing"
$lgInAMeeting = "In a meeting" $lgInAMeeting = "In a meeting"
$lgOffline = "Offline" $lgOffline = "Offline"
$lgNotInACall = "Not in a call" $lgNotInACall = "Not in a call"
@ -92,19 +94,19 @@ $TeamsProcess = Get-Process -Name Teams -ErrorAction SilentlyContinue
# Check if Teams is running and start monitoring the log if it is # Check if Teams is running and start monitoring the log if it is
If ($null -ne $TeamsProcess) { If ($null -ne $TeamsProcess) {
If ($TeamsStatus -like "*Setting the taskbar overlay icon - Available*" -or ` If ($TeamsStatus -like "*Setting the taskbar overlay icon - $lgAvailable*" -or `
$TeamsStatus -like "*StatusIndicatorStateService: Added Available*") { $TeamsStatus -like "*StatusIndicatorStateService: Added Available*") {
$Status = $lgAvailable $Status = $lgAvailable
Write-Host $Status Write-Host $Status
} }
ElseIf ($TeamsStatus -like "*Setting the taskbar overlay icon - Busy*" -or ` ElseIf ($TeamsStatus -like "*Setting the taskbar overlay icon - $lgBusy*" -or `
$TeamsStatus -like "*StatusIndicatorStateService: Added Busy*" -or ` $TeamsStatus -like "*StatusIndicatorStateService: Added Busy*" -or `
$TeamsStatus -like "*Setting the taskbar overlay icon - On the phone*" -or ` $TeamsStatus -like "*Setting the taskbar overlay icon - $lgOnThePhone*" -or `
$TeamsStatus -like "*StatusIndicatorStateService: Added OnThePhone*") { $TeamsStatus -like "*StatusIndicatorStateService: Added OnThePhone*") {
$Status = $lgBusy $Status = $lgBusy
Write-Host $Status Write-Host $Status
} }
ElseIf ($TeamsStatus -like "*Setting the taskbar overlay icon - Away*" -or ` ElseIf ($TeamsStatus -like "*Setting the taskbar overlay icon - $lgAway*" -or `
$TeamsStatus -like "*StatusIndicatorStateService: Added Away*") { $TeamsStatus -like "*StatusIndicatorStateService: Added Away*") {
$Status = $lgAway $Status = $lgAway
Write-Host $Status Write-Host $Status
@ -114,14 +116,14 @@ If ($null -ne $TeamsProcess) {
$Status = $lgBeRightBack $Status = $lgBeRightBack
Write-Host $Status Write-Host $Status
} }
ElseIf ($TeamsStatus -like "*Setting the taskbar overlay icon - Do not disturb *" -or ` ElseIf ($TeamsStatus -like "*Setting the taskbar overlay icon - $lgDoNotDisturb *" -or `
$TeamsStatus -like "*StatusIndicatorStateService: Added DoNotDisturb*" -or ` $TeamsStatus -like "*StatusIndicatorStateService: Added DoNotDisturb*" -or `
$TeamsStatus -like "*Setting the taskbar overlay icon - Focusing*" -or ` $TeamsStatus -like "*Setting the taskbar overlay icon - $lgFocusing*" -or `
$TeamsStatus -like "*StatusIndicatorStateService: Added Focusing*") { $TeamsStatus -like "*StatusIndicatorStateService: Added Focusing*") {
$Status = $lgDoNotDisturb $Status = $lgDoNotDisturb
Write-Host $Status Write-Host $Status
} }
ElseIf ($TeamsStatus -like "*Setting the taskbar overlay icon - In a meeting*" -or ` ElseIf ($TeamsStatus -like "*Setting the taskbar overlay icon - $lgInAMeeting*" -or `
$TeamsStatus -like "*StatusIndicatorStateService: Added InAMeeting*") { $TeamsStatus -like "*StatusIndicatorStateService: Added InAMeeting*") {
$Status = $lgInAMeeting $Status = $lgInAMeeting
Write-Host $Status Write-Host $Status

Loading…
Cancel
Save