Last active
October 22, 2020 18:45
-
-
Save cdhunt/b386d0b545213ed51e43eff1ea51a358 to your computer and use it in GitHub Desktop.
Windows Terminal Simple Info Tab
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
{ | |
"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" | |
}, |
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
$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