Elv13 / awesome-configs

My AwesomeWM configuration
127 stars 19 forks source link

/awesome/drawer/dateInfo.lua is broken #26

Open landscape69 opened 8 years ago

landscape69 commented 8 years ago

/awesome/drawer/dateInfo.lua seem to be broken i have checked and at line 59 it alltime cause a problem to get the correctly coordinate from system. its end up with crashing awesome on startup or empty calendar with weather

this function should be change a bit.

i dont knew how to do, but following should be somehow modify

--Weather stuff local weatherInfo2=wibox.widget.textbox()

function updateWeater() if dateModule.latitude ~= nil and dateModule.longitude ~= nil then \ local f=io.popen("curl -S 'http://api.openweathermap.org/data/2.5/weather?lat="..dateModule.latitude.."&lon="..dateModule.longitude.."'")* local weatherInfo = nil if f ~= nil then local wData=json:decode(f:read("all")) f:close() if wData ~= nil then weatherInfo=" "..wData.name..", "..wData.sys.country.."\n" weatherInfo=weatherInfo.." Temp: "..(wData.main.temp-273.15).." °C\n" weatherInfo=weatherInfo.." Wind: "..(wData.wind.speed).." m/s\n" weatherInfo=weatherInfo.." Humidity: "..(wData.main.humidity).." hPa"

      weatherInfo2:set_markup(weatherInfo or "N/A")
    else
      weatherInfo2:set_markup("N/A")
    end
  end
end

end

if i put precise ordinate with numbers latitude+longtitudethis function work.

Elv13 commented 8 years ago

@AxelTB Is that fixed in your version?

Anyhow, at this point I would rather disable features than fix them. The 2016 version is progressing well. And will be released along with Awesome 3.6. I could technically push it now, but I am still upstreaming content and there is major API breaking projects going on in Awesome (like screen plug&play without losing your tags and dynamic client layouts / tabs). On my side, most of my config is re-written (it look and behave mostly the same, just with less hacks). Some code was still from the 3.2 days (2008) and was badly outdated/broken/unmaintainable/deadcode.

landscape69 commented 8 years ago

@AxelTB version is also buggy here.

i am looking forward for the incoming update and rewritten configs. but as i see at the moment version 3.59 ist just released on today so version3.6 will take a couple time :)

Elv13 commented 8 years ago

If you can submit a pull request that fix the crash (even if it break the feature), I will merge it.

landscape69 commented 8 years ago

i cant programming so i cant effectively fix it. but i have set a fixed latitude and long titude ine the
line 53, of the file: /awesome/drawer/dateInfo.lua.

this the workaround which i have.

local f=io.popen("curl -S 'http://api.openweathermap.org/data/2.5/weather?lat=13.29&lon=52.5")

AxelTB commented 8 years ago

In my version i fixed it like this:

local f=io.popen("curl -S 'http://api.openweathermap.org/data/2.5/weather?lat="..dateModule.latitude.."&lon="..dateModule.longitude.."&appid=2de143494c0b295cca9337e1e96b00e0'")

Is in the commit c6d7b6472b74776f3c5e834dda113da47e662565

Edit: The fix is in https://github.com/AxelTB/drawer not in configs!