Researchers at the Georgia Institute of Technology said that many types of glass are subjected to rain and wind, so they sought to find a way to coat a window that would take advantage of triboelectrics - capturing the energy in static electricity that occurs when two materials meet.
They came up with a two layer solution, one layer to capture the energy in raindrops, the other to do the same for wind.
The first layer contains nanogenerators that capture the positively charged energy in water droplets, which comes from rubbing against the air on the way down from clouds.
Together the two layers result in a glass that is initially clear, but then develops a blue tint - they also generated as much as 130 milliwatts of electricity per square metre of glass, which the researchers said, is enough to charge a smartphone.
The team suggests that such types of glass could be used with wireless networks because it is not based on a separate power source.