v0.2.2
Muslimtify v0.2.2
Bugfix + UX release focused on the timezone and location pipeline.
Closes #11.
Highlights
Timezone overhaul (fixes #11)
-
System tzdb for offsets.
Replaced the hardcoded ~20-entry IANA table (which silently returned UTC+0 for unknown zones and ignored DST entirely) with:- libc
tzdbon Linux (setenv TZ+tzset+tm_gmtoff, with TZ save/restore) - Win32 implementation on Windows (42-entry CLDR-derived IANA → Windows table +
EnumDynamicTimeZoneInformation+SystemTimeToTzSpecificLocalTimeExfor DST-aware offsets)
- libc
-
get_system_timezonehelper for both platforms:- Linux reads
/etc/localtime(with/etc/timezonefallback, UTC last resort) - Windows reverse-resolves the active dynamic time-zone against the IANA table
(01c53f0)
- Linux reads
-
--timezone=<iana>override onlocation set- For users whose host OS timezone differs from their coordinates' real zone
- Accepts both
=and space-separated forms - Validates the zone is resolvable (rejects typos)
- Tags zones as
[override]or[from system OS]in success output - Includes inline hint pointing at the flag
-
SE Asia Standard Time → Asia/Jakarta
Previously resolved toAsia/Bangkokby alphabetical accident.
Indonesia-first default.(1455f0d)
-
Dropped
Asia/Tehranfrom the Windows mapping — the project does not support Shia prayer-time calculations.(01c53f0)
Location command UX
-
location setno longer leaves stale state.
Previously cachedcity,country, andtimezonevalues from an earlierlocation autocould persist after a manualset.
Now they are cleared properly and timezone is re-derived from the host OS.Closes the second half of #11.
(925b40d)
-
location autono longer auto-fillscity
IP-geolocated city values are often inaccurate (issue #11's reporter sawDamiettawhile living inMansoura).countryis still auto-populated since method auto-detection depends on it.(37e00cc)
-
New
--city=<name>flag
Available on both:location setlocation auto
For users who want an explicit city label.
(37e00cc)
-
User-facing examples (help output, error hints, README) now default to
Asia/Jakartainstead ofAfrica/Cairo.(6949d3a)
New: sound command
Configurable notification sounds with three presets:
reminderalarmdefault
Linux routes presets to libnotify sound-name hints:
message-new-instantalarm-clock-elapsed- none
Windows maps them to:
<audio src="ms-winsoundevent:..." />The alarm preset loops for the toast duration.
Disabling sound emits:
- XDG suppress-sound hint on Linux
<audio silent="true"/>on Windows
(0d02e7c)
New subcommands
muslimtify sound [status]
muslimtify sound on|off
muslimtify sound set <preset> # it's-time notification
muslimtify sound reminder-set <preset> # pre-prayer remindersRefactor: source tree layout
- Source files reorganized into:
src/
├── core/
├── cli/
└── platform/
(0f043fd)
-
muslimtify_libsplit into:muslimtify_coremuslimtify_cli
OBJECT libraries.
(b95acf0)
-
parse_timezone_offsetmoved into:
src/platform/{linux,windows}/timezone.c
-
src/core/location.cis back to pure curl + JSON with no time logic.(dd2f8b1)
-
GUI scaffolding removed from
main:- ccompose
- raylib
- GTK4 launcher
muslimtify-guitarget
GUI development continues on the
guibranch.
CI / build fixes
-
Fixed silently-passing Windows CI.
curl's
FetchContentblock leaked:
set(BUILD_TESTING OFF FORCE)into the parent scope, causing ctest to report success with zero tests run.
Now explicitly using:
-DBUILD_TESTING=ON--no-tests=error
on both platforms.
-
test_locationis now cross-platform.Linked against:
ole32runtimeobject
on Windows because
muslimtify_corepulls innotification_win.c. -
Clang-format / clang-tidy globs updated to recurse into the new
src/subdirectories.(dd2b2e0)
-
MinGW cross-compile fixes:
- case-sensitive
<windows.h> CURL_STATICLIBdefined on Windows targets that includecurl/curl.h
(dd2f8b1)
- case-sensitive
Tests
New tests/test_location.c
83 assertions covering:
- Northern hemisphere DST
- No-DST fixed-offset zones
- Fractional offsets (
5:30,5:45, etc.) - Southern hemisphere DST
- Half-hour DST (Newfoundland)
- UTC and Pacific edge cases
- NULL input
- Unknown zones
- TZ env-var leak check (Linux only)
test_windows_zone_to_iana
36 cases covering every Windows zone in the mapping table.
test_get_system_timezone
New helper coverage.
CLI tests
7 new CLI cases in tests/test_cli.c covering:
--city--timezone- equals and space-separated forms
- no-flag-clears
- missing-value rejection
- combined flags
Verified
Linux
ctest: 10/10 suites passtest_location: 83/83 assertions pass
Windows
- MSVC Release build + tests via GitHub Actions
- MinGW cross-compile to:
x86_64-w64-mingw32- working
muslimtify.exe - working
muslimtify-service.exe