Skip to content
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

Two %substitutions for Sun Widgets [Feature request] #599

Closed
Timo-Fi opened this issue May 12, 2022 · 2 comments · Fixed by #595
Closed

Two %substitutions for Sun Widgets [Feature request] #599

Timo-Fi opened this issue May 12, 2022 · 2 comments · Fixed by #595
Milestone

Comments

@Timo-Fi
Copy link

Timo-Fi commented May 12, 2022

Could you please consider adding the following two item into the %substitutions group of Sun Widgets.

a) Local time at the moment of the solar noon (hh:mm would be enough)
b) Elevation angle of the sun at the moment of the solar noon (one decimal would be enough)

This pair, that tells the solar noon elevation degree, and at what local time it happens, helps sunbathers in arranging the sunbathing duration(s) easier.

The (a) is currently available as an 1x1 sun widget, but having this information on the Title line of a sun widget removes the need to have an 1x1 widget just for the purpose of showing it. So, makes the homescreen layout more stylish.

The (b) is shown amongst the items of "Labels" in the 3x1 sun widget, but the "Show labels" checkbox does not bring the labels visible on the rectangular world map in 3x2.

forrestguice added a commit that referenced this issue May 15, 2022
Extends %substitutions for sun widgets; adds %em (event time millis), %et (formatted event time), %eT (formatted event time w/ seconds), and %eA (event angle). (#599)
@forrestguice forrestguice added this to the v0.14.5 milestone May 15, 2022
@forrestguice
Copy link
Owner

Seems like a good workaround to the problems identified - I've made this a last minute addition to v0.14.5. It should be on F-Droid later in the week.

The new %substitutions are %em (event timestamp (millis)), %et (formatted event time), %eT (include seconds), and %eA (angle of event). A @ qualifier is expected afterwards to identify the specific event.

For example..

pattern description
%et@ar Astronomical rise
%et@nr Nautical rise
%et@b8r Blue Hour rise (8deg)
%et@cr Civil rise
%et@b4r Blue Hour rise (4deg)
%et@gr Golden Hour rise
%et@sr Sunrise
%et@sn Solar Noon
%et@ss Sunset
%et@gr Golden Hour set
%et@b4s Blue Hour set (4deg)
%et@cs Civil set
%et@b8s Blue Hour set (8deg)
%et@ns Nautical set
%et@as Astronomical set

Maybe overkill I suppose, but it was actually easier to implement it uniformly for all events (vs special behavior for just noon).

All of these should work with the "sun position widgets", but the ordinary "sun widgets" are limited to sr, sn, and ss (mapped to the underlying dataset). Similar, these won't work with the non-sun widgets as that data isn't available there. It highlights a limitation of the widgets (each is defined/limited by its data). Fortunately the sun position widgets already require multiple datasets, so its already in a position to offer all this information.

@forrestguice
Copy link
Owner

This pair, that tells the solar noon elevation degree, and at what local time it happens, helps sunbathers in arranging the sunbathing duration(s) easier.

When explained this way, it makes sense to me to also add a 1x1 widget that displays this pair.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants