New Setup 📦
This commit is contained in:
parent
d16174b447
commit
415dbd08a1
10194 changed files with 1368647 additions and 4 deletions
11
home/.config/waybar/scripts/user_location.py
Executable file
11
home/.config/waybar/scripts/user_location.py
Executable file
|
@ -0,0 +1,11 @@
|
|||
import requests
|
||||
|
||||
|
||||
def get_location():
|
||||
response = requests.get(f'https://ipinfo.io').json()
|
||||
location_data = {
|
||||
"city": response.get("city"),
|
||||
"region": response.get("region"),
|
||||
"country": response.get("country")
|
||||
}
|
||||
return location_data
|
Loading…
Add table
Add a link
Reference in a new issue