Skip to content

Instantly share code, notes, and snippets.

@cdhunt
Last active October 22, 2020 18:45
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/b386d0b545213ed51e43eff1ea51a358 to your computer and use it in GitHub Desktop.
Save cdhunt/b386d0b545213ed51e43eff1ea51a358 to your computer and use it in GitHub Desktop.
Windows Terminal Simple Info Tab
{
"guid": "{210e8de2-5833-4c64-b26f-17c59470c5ea}",
"hidden": false,
"name": "Title",
"commandline" : "C:\\Program Files\\PowerShell\\7\\pwsh.exe -c c:\\temp\\title.ps1",
"icon" : "ms-appdata:///Local/dashboard_white_36x36.png"
},
$weather = Invoke-RestMethod wttr.in?format="%c+%t"
do {
$time = Get-Date -Format "hh:mm"
if ($time -like '*:00' -or $time -like '*:30') {
$weather = Invoke-RestMethod wttr.in?format="%c+%t"
}
$title = '{0} {1} {2}' -f $time, [char]0x2502, $weather
$host.ui.RawUI.WindowTitle = $title
Start-Sleep -Seconds 10
} while ($true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment