Last active
February 8, 2021 15:46
-
-
Save cdhunt/536690ddbe263304b3e1e50b82bfdb53 to your computer and use it in GitHub Desktop.
Information Title Tab script
This file contains 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
C:\Users\chunt\AppData\Local\Microsoft\WindowsApps\wt.exe -p "Title" ; new-tab -p "PowerShell" |
This file contains 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" | |
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) |
This file contains 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 -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