Package Clouds is a weather monitoring applet for Cairo-Dock.
It's almost a clone of the weather app to show weather forecast icons.
Autodetect location based on IP. Shortcuts: show dialog today, show tomorrow, open Webpage, recheck, set location. Editable template.
Possible problem (to confirm):
External applets left and middle clicks disabled when a subdock is set. For me, even when the subdock is removed, clicks actions aren't restored. This can be tested by disabling the subdock (set forecast days to 0).
On some systems the right click menu is called twice.
Dropped, because it's impossible to do for an external app:
(but it could be possible to try in dock mode. The problem would be the config file differences between both) Always visible option and its background color. Render desklet in 3D Sub-dock view type.
const ( // IconWork is the name of icon displayed during polling. IconWork = "EmblemWork.svg" // file located in applet "img" subdir. // IconMissing is the name of the icon displayed when a weather icon is not found. IconMissing = "default-icon" // EmblemWork is the position of the emblem displayed during polling. EmblemWork = cdtype.EmblemTopLeft )
const ( ActionNone = iota ActionShowCurrent ActionShowTomorrow ActionOpenWebpage ActionRecheckNow ActionSetLocation )
List of actions defined in this applet. Actions order in this list must match the order in defineActions.
NewApplet creates a new applet instance.
Applet defines a dock applet.
AskLocationConfirm search the list of cities matching the provided name and shows a dialog with the list of locations for the user to choose. When validated, the config file is updated and ...(TODO: need reload, to check). If no data is found, the user is sent back to the AskLocationText dialog with the text he provided.
AskLocationText asks the user his location name.
If confirmed, continues the selection process. A default text may be used as argument.
Check gets and displays updated weather informations.
DetectLocation tries to detect your location from IP and get the matching code.
DialogWeatherCurrent shows the current weather details.
DialogWeatherForecast shows the weather details for one of the next days.
Draw new data on icon.
Init load user configuration if needed and initialise applet.
OpenWebCurrent opens a web page on the provider site for the current day.
OpenWebForecast opens a web page on the provider site for the given day.
SetLocationCode updates the config file with the new location and ... (TODO: need reload, to check).
WeatherIcon returns the full path to the current weather theme icon.