Update pika-hyprland-settings/etc/skel/.config/ags/widgets/weather.js

This commit is contained in:
ferreo 2024-08-29 21:11:33 +02:00
parent 2707c290fa
commit 61a88fc8e0

View File

@ -23,11 +23,11 @@ export const Weather = () => Widget.Box({
}),
],
connections: [[barConfig?.weatherUpdateInterval * 1000, async box => {
setTimeout(() => { getWeather(box) }, 1000);
getWeather(box);
}]],
});
function getWeather(box) {
async function getWeather(box) {
let latLng = [0, 0];
execAsync(`curl https://geocoding-api.open-meteo.com/v1/search?name=${barConfig?.city}&count=1&language=en&format=json`)
.then(output => {