Commit Graph

58 Commits

Author SHA1 Message Date
b63d4cbac8 Add a -n/--now flag to only print the current hour’s name 2022-05-24 17:34:25 +02:00
ccaa902be8 Parse command line arguments 2022-05-24 17:07:08 +02:00
88ad047315 [Refactor] Move window-based (Wayland) code to a separate function 2022-05-24 16:21:03 +02:00
b2e387fbe8 [Refactor] Move current hour name calculation to the clock module 2022-05-24 11:53:37 +02:00
5095d2cc9f [Refactor] Move hour name calculation to the clock module 2022-05-24 11:50:13 +02:00
d9017d447a [Bugfix] Fix seconds value returned by get_hms() 2022-05-24 11:50:12 +02:00
8968507d29 [Refactor] Move UTC offset calculation to the clock module 2022-05-24 11:37:16 +02:00
eecd5c2938 [Refactor] Move calculation of the day parts to the clock module 2022-05-24 11:37:13 +02:00
b485b01c2f [Refactor] Move UTC hour calculation to the clock module 2022-05-24 11:27:02 +02:00
d56c6ef087 [Refactor] Move local time calculation to the clock module 2022-05-24 10:34:21 +02:00
b6d6e71be2 [Refactor] Move local time’s seconds since midnight calculation to the clock module 2022-05-24 10:33:57 +02:00
1d485c824b [Refactor] Move Moon phase calculation to a new clock module 2022-05-24 09:26:05 +02:00
3d4224b560 [Refactor] Move configuration reading to the config module 2022-05-23 18:09:17 +02:00
852e8e090e [Refactor] Move the gen_svg function to the svg_clock module 2022-05-23 18:05:16 +02:00
b45a2bd8ee [Refactor] Move the config structs to a new module 2022-05-23 18:04:37 +02:00
48ace5dc01 [Refactor] Move the get_moon_path function to the svg_clock module 2022-05-23 17:52:40 +02:00
af637bcd10 [Refactor] Move the get_range_path function to the svg_clock module 2022-05-23 17:51:05 +02:00
4c15ffa826 [Refactor] Move the seconds_to_degrees function to the svg_clock module 2022-05-23 17:49:52 +02:00
eb99194e16 [Refactor] Remove the time_to_degrees function
It just passed its sole parameter to seconds_to_degrees, so having this function
doesn’t really make sense.

It was actually a remnant from the Python version which operated on timestamps, not raw
seconds-since-midnight values.
2022-05-23 17:48:45 +02:00
b7aa26be89 [Refactor] Move the hour_marker function to the svg_clock module 2022-05-23 17:46:45 +02:00
e61c247915 Cache UTC hour labels 2022-05-23 14:03:01 +02:00
f567362c29 [Refactor] Convert utc_hour_font_size to a constant 2022-05-23 13:48:45 +02:00
2fd9d4e8de Cache the paths generated from hour name texts
Rendering text along a textPath is very CPU intensive, especially since we’re doing it every second.
v1.0.1
2022-05-23 05:01:25 +02:00
7e8f62b811 [Refactor] Move hour_name_path to the svg_clock module 2022-05-23 04:43:48 +02:00
66e9c3d3f3 [Refactor] Move svg => usvg conversion to a separate function 2022-05-22 19:13:41 +02:00
b95c035133 [Refactor] Move some constants to a new module 2022-05-22 19:03:09 +02:00
cba5372b4d [Refactor] Convert ring_width to a constant 2022-05-22 06:06:36 +02:00
fd516083cf [Refactor] Convert outer_r to a constant 2022-05-22 06:04:32 +02:00
dcde43831b [Refactor] Convert hour_name_font_size to a constant 2022-05-22 06:01:54 +02:00
eaf111f216 [Refactor] Convert image_width to a constant 2022-05-22 05:59:49 +02:00
b7cbc9f7e7 Do secondly refresh via a calloop Timer instead of measuring elapsed time v1.0.0 2022-05-21 11:37:06 +02:00
418ab212ea Make configuration file optional 2022-05-21 07:13:32 +02:00
98e5f3c06d Make location configurable 2022-05-21 07:00:40 +02:00
bd521ac62d [Bugfix] Move the current time box to the bottom between 6:00 and 18:00
Instead of 7:00 and 17:00; it was’t *that bad the old way, but it’s more balanced this way.
2022-05-21 06:59:41 +02:00
bede824603 Update the README 2022-05-19 10:29:48 +02:00
ac95404017 Highlight the current hour name with a brighter colour 2022-05-19 09:27:27 +02:00
81907c5842 [Refactor] Calculate large arc flag in a more effective way 2022-05-19 09:21:57 +02:00
b07361d392 [Bugfix] Fix the day part arcs for locations on the western hemisphere 2022-05-19 08:45:29 +02:00
8a4c25bd80 [Bugfix] Calculate the current UTC hour in a more safe way
This should now work in any time zone from -12:00 to +12:00, any time of the day.
2022-05-19 08:33:29 +02:00
b0a943c270 Calculate day parts based on UTC time instead of local time 2022-05-19 08:14:01 +02:00
95557c839b Show the current hour’s name and the current time in a box 2022-05-19 06:19:38 +02:00
6e0dedb1fb Colour hour name plates based on their season 2022-05-19 05:04:48 +02:00
e24e199e9e Create a Seasons enum 2022-05-19 04:59:34 +02:00
08cb444e7d Add hour names 2022-05-19 04:48:28 +02:00
064e11640c Create a path we can use to run hour names along 2022-05-18 18:48:19 +02:00
c6eee17618 Pre-fill the pixmap with the background color to prevent having white strips at the edge 2022-05-18 17:20:05 +02:00
5e3ab2c7ed [Bugfix] Don’t fill the smoothing circle so day parts remain visible 2022-05-18 17:19:49 +02:00
53671b21fb Add a circle with the background colour around day parts
…so it smoothens the edges!
2022-05-18 17:15:27 +02:00
a613855a66 Add a Sun disc to the dial
It rises on the horizon ^_^
2022-05-18 17:13:56 +02:00
534bf3a899 [Bugfix] Fix the night-time colour 2022-05-18 17:13:56 +02:00