Skip to content

Instantly share code, notes, and snippets.

@DerfJagged
Last active June 12, 2025 18:36
Show Gist options
  • Save DerfJagged/e8c18bff37eebfba6ee8f7f9686ad3d9 to your computer and use it in GitHub Desktop.
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.
# 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