-
Notifications
You must be signed in to change notification settings - Fork 90
[WIP] Add basic weather information to screensaver #464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Please squash the commits. |
Get basic temperature, conditions, location working with scaled icon Code cleanup Add IP Geolocation to weather component Cleanup, settings integrations, bugfixes, translation Fix Localization cleanup
all done. cleaned up some formatting too. Double-checked, seems ok from here (feedback welcome of course) |
|
Ok, first things first, this is pretty cool :) I don't want this to get into Cinnamon at the last minute. I think we should think about how weather is integrated as a whole into the desktop.. because this spans across an applet, a desklet, a screensaver.. which all deserve to be part of the Cinnamon core. In 6.4 we're also introducing Night Light.. and that (for the moment) reads our system timezone, but it also could potentially let the user define a position or calculate a position using geoip... and that's something which is quite global, as it can be useful here again for this weather-related set of features. Anyway, all this to say let's postpone this and give ourselves another 6 months to think about it. |
Yeah as I was working on this, it occurred to me that it would make sense to have centralized weather + location providers in Cinnamon to feed the desklet/applet/widget. Honestly the geolocation API already established in cinnamon-spices-applets/weather seems pretty robust and fleshed out, probably fairly easy to just incorporate that into the system. But this was a purely selfish PR, it's a feature I was fed up with living without lol so do with it what you will, I'll just keep running my personal builds until whenever. |
icon. Not all icon themes have the same set of weather condition icons. The condition metadata can contain multiple icons: icons=['weather-overcast', 'weather-clouds', 'weather-few-clouds'] Providing all of these for the icon lookup improves the chances of a valid match being found (including -symbolic if that's all that is available).
|
Hi, please see my PR. Also, for both this and the cinnamon pull request, please don't run makepot - this gets done prior to the next major version release, not during development - it can make it difficult to test pull requests if the potfile has changed. Thanks! |
Float changes
sorry, I think on one of the related PRs (cinnamon-settings maybe) someone asked me to resolve conflicts, and they were all pot-related, so I figured |
| def get_weather_units(): | ||
| units = ["metric", "imperial"] | ||
| units_string = _check_string(ss_settings.get_string(WEATHER_UNITS)) | ||
| return units_string if units_string in units else "metric" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should just be the default value in the settings schema in your cinnamon-desktop PR. With it like this, the setting in cinnamon's screensaver settings is blank. If the default behavior is metric, it should show metric.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the settings to use metric by default; should I leave the fallback here? The changes in cinnamon-settings only allow setting "imperial" or "metric", but I think it'd be theoretically possible for the user to set something invalid with something like gconf-editor?
Let me know, I'll adjust this how you want it. Thanks for reviewing
|
An update on release strategy:
I'm going to mark this as WIP for now and we'll start working on the screensaver at the beginning of 2026. |
Weather Widget for cinnamon-screensaver
Adds a new type of floating widget (similar to Clock and AlbumArt) that displays a weather icon alongside the current weather conditions. Utilizes OpenWeatherMap for weather data and GeoJS.io for location data. Models and interfaces are designed to be mostly compatible with the Weather applet in cinnamon-spices-applets/weather@mockturtl so that additional Weather and Location providers can be easily added.
The OpenWeatherMap API key from the cinnamon-spices-applets has been reused to enable out-of-the-box operation.
Dependencies
App will crash until the dconf schema is updated.
PR with the new schema in cinnamon-desktop is here:
linuxmint/cinnamon-desktop#246
PR with updated cinnamon-settings screensaver module here:
linuxmint/cinnamon#12516
In the meantime:
/usr/share/glib-2.0/schemas/org.cinnamon.desktop.screensaver.gschema.xmlorg.cinnamon.desktop.screensaver.gschema.xml.infile to/usr/share/glib-2.0/schemas/org.cinnamon.desktop.screensaver.gschema.xml(rename it to remove the.inat the end)sudo glib-compile-schemas /usr/share/glib-2.0/schemas/dconf-editoror another means to set the relevant settings inorg.cinnamon.desktop.screensaver