Last active
June 12, 2025 18:36
-
-
Save DerfJagged/e8c18bff37eebfba6ee8f7f9686ad3d9 to your computer and use it in GitHub Desktop.
Lets you set text or an emoji for every hour's AM/PM indicator. It's pizza time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Must save as UTF-8 with BOM | |
# Set as hourly scheduled task | |
# Updates after a minute has passed | |
$OutputEncoding = [System.Text.UTF8Encoding]::new() | |
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new() | |
$hour_labels = @{ | |
'0' = "๐" | |
'1' = "๐" | |
'2' = "๐" | |
'3' = "๐" | |
'4' = "๐" | |
'5' = "๐" | |
'6' = "๐" | |
'7' = "๐" | |
'8' = "๐" | |
'9' = "๐ต" | |
'10' = "๐ฉ" | |
'11' = "๐ผ" | |
'12' = "๐" | |
'13' = "๐ผ" | |
'14' = "๐ผ" | |
'15' = "๐ผ" | |
'16' = "๐ผ" | |
'17' = "๐" | |
'18' = "๐" | |
'19' = "๐ฎ" | |
'20' = "๐ฎ" | |
'21' = "๐ฎ" | |
'22' = "๐ฎ" | |
'23' = "๐ฎ" | |
} | |
$hour = (Get-Date -Format "HH").ToString() | |
$value = $hour_labels[$hour] | |
if ($hour -lt 12) { | |
Write-Output "Setting AM indicator to '$value' for $($hour):00" | |
Set-ItemProperty -Path "HKCU:\Control Panel\International" -Name "s1159" -Value $value | |
} else { | |
Write-Output "Setting PM indicator to '$value' for $($hour):00" | |
Set-ItemProperty -Path "HKCU:\Control Panel\International" -Name "s2359" -Value $value | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment