Skip to content

Latest commit

ย 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 

Repository files navigation

๐ŸŒฆ๏ธ WTTRTerminal

Get Weather in Your Terminal by using wttr.in

Screenshot

image

๐ŸชŸ Windows Setup

To edit the PowerShell profile, follow these steps:

  1. Open Notepad or your preferred text editor.
  2. Navigate to: C:\Users\Username\Documents\PowerShell\
  3. Open: Microsoft.PowerShell_profile.ps1
  4. Add this function:
function weather {
    Invoke-RestMethod https://wttr.in
}
  1. ๐Ÿ’พ Save the file.
  2. ๐Ÿ”„ Reload the profile by running:
. $PROFILE

โœ… Now, check the weather with:

weather

๐Ÿง Linux Setup

For Bash users, add the following to your bash profile (e.g., ~/.bashrc or ~/.bash_profile):

# Weather Function
_weather(){
   curl -s -L wttr.in/$@ | less -R
}
alias weather='_weather'

๐Ÿ’พ Reload the profile with:

source ~/.bashrc

โœ… Now, you can view the weather by typing:

weather , or weather [location]

About

Weather in Terminal

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors