Skip to content

sassanix/wttrterminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published