i can just look outside
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
"idle_inhibitor",
|
||||
"privacy",
|
||||
"custom/updates",
|
||||
"custom/weather",
|
||||
"bluetooth",
|
||||
"network",
|
||||
"custom/vpn",
|
||||
@@ -137,15 +136,6 @@
|
||||
"tooltip-format": "{} pending updates"
|
||||
},
|
||||
|
||||
"custom/weather": {
|
||||
"format": "{}",
|
||||
"tooltip": true,
|
||||
"interval": 1800,
|
||||
"exec": "$HOME/.config/waybar/scripts/weather.sh",
|
||||
"return-type": "json",
|
||||
"on-click": "xdg-open https://weather.com"
|
||||
},
|
||||
|
||||
"bluetooth": {
|
||||
"format": " {status}",
|
||||
"format-disabled": "",
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Get weather data from wttr.in with geolocation from ipinfo.io
|
||||
# You can override with WEATHER_LOCATION environment variable
|
||||
LOCATION="${WEATHER_LOCATION:-}"
|
||||
|
||||
# If no location is set, fetch it from ipinfo.io
|
||||
if [ -z "$LOCATION" ]; then
|
||||
LOCATION=$(curl -s "https://ipinfo.io/" | jq -r '.city // empty')
|
||||
fi
|
||||
|
||||
# Fetch weather using wttr.in
|
||||
if [ -n "$LOCATION" ]; then
|
||||
WEATHER_DATA=$(curl -s "wttr.in/$LOCATION?format=%c+%t")
|
||||
TOOLTIP=$(curl -s "wttr.in/$LOCATION?format=%l:+%c+%t+%w+%p+%h")
|
||||
else
|
||||
WEATHER_DATA=$(curl -s "wttr.in/?format=%c+%t")
|
||||
TOOLTIP=$(curl -s "wttr.in/?format=%l:+%c+%t+%w+%p+%h")
|
||||
fi
|
||||
|
||||
# Check if curl was successful
|
||||
if [ $? -eq 0 ] && [ -n "$WEATHER_DATA" ]; then
|
||||
echo "{\"text\":\"$WEATHER_DATA\", \"tooltip\":\"$TOOLTIP\"}"
|
||||
else
|
||||
echo "{\"text\":\"🌡 N/A\", \"tooltip\":\"Weather data unavailable\"}"
|
||||
fi
|
||||
@@ -95,7 +95,6 @@ tooltip label {
|
||||
#tray,
|
||||
#custom-media,
|
||||
#custom-updates,
|
||||
#custom-weather,
|
||||
#custom-vpn,
|
||||
#custom-ibus,
|
||||
#custom-notification,
|
||||
@@ -119,7 +118,6 @@ tooltip label {
|
||||
#idle_inhibitor:hover,
|
||||
#custom-media:hover,
|
||||
#custom-updates:hover,
|
||||
#custom-weather:hover,
|
||||
#custom-vpn:hover,
|
||||
#custom-ibus:hover,
|
||||
#custom-notification:hover,
|
||||
@@ -182,11 +180,6 @@ tooltip label {
|
||||
color: #FFB74D;
|
||||
}
|
||||
|
||||
/* ============= Weather ============= */
|
||||
#custom-weather {
|
||||
color: #90CAF9;
|
||||
}
|
||||
|
||||
/* ============= Bluetooth ============= */
|
||||
#bluetooth {
|
||||
color: #90CAF9;
|
||||
|
||||
Reference in New Issue
Block a user