Skip to content

Instantly share code, notes, and snippets.

@cdhunt
Last active February 8, 2021 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdhunt/536690ddbe263304b3e1e50b82bfdb53 to your computer and use it in GitHub Desktop.
Save cdhunt/536690ddbe263304b3e1e50b82bfdb53 to your computer and use it in GitHub Desktop.
Information Title Tab script
C:\Users\chunt\AppData\Local\Microsoft\WindowsApps\wt.exe -p "Title" ; new-tab -p "PowerShell"
$weather = Invoke-RestMethod wttr.in?format="%c+%t"
Invoke-RestMethod http://wttr.in/
do {
$time = Get-Date -Format "h:mm tt"
if ((Get-Date -Format "mm") % 10 -eq 0) {
$weather = Invoke-RestMethod wttr.in?format="%c+%t"
clear
Invoke-RestMethod http://wttr.in/
}
$title = '{0} {1} {2}' -f $time, [char]0x2502, $weather
$host.ui.RawUI.WindowTitle = $title
Start-Sleep -Seconds 10
} while ($true)
{
"guid": "{210e8de2-5833-4c64-b26f-17c59470c5ea}",
"hidden": false,
"name": "Title",
"commandline" : "C:\\Program Files\\PowerShell\\7\\pwsh.exe -noprofile -c c:\\temp\\title.ps1",
"icon" : "ms-appdata:///Local/dashboard_white_36x36.png"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment