Skip to content

feat: add mawaqit plugin#53

Draft
ycf-anon wants to merge 1 commit into
noctalia-dev:mainfrom
ycf-anon:feat/mawaqit
Draft

feat: add mawaqit plugin#53
ycf-anon wants to merge 1 commit into
noctalia-dev:mainfrom
ycf-anon:feat/mawaqit

Conversation

@ycf-anon

Copy link
Copy Markdown

Plugin

  • Id: ycf/mawaqit
  • New plugin
  • Update to an existing plugin (version bumped in plugin.toml)

What it does

Provides prayer times for Noctalia using Aladhan, with a bar widget and panel view featuring a live countdown to the next prayer, prayer notifications, optional azan playback, Hijri date display, and configurable per-prayer minute offsets. Prayer times are fetched daily from the Aladhan API.

External dependencies

  • paplay or pw-cat (optional): used to play the bundled azan audio.
  • api.aladhan.com: used to retrieve today's and tomorrow's prayer times.

Testing

Tested by:

  • Opening the panel.

  • Using the bar widget.

  • Verifying the countdown to the next prayer.

  • Testing notifications for all prayers.

  • Testing optional azan playback.

  • Changing plugin settings (city, country, calculation method, school, offsets) and verifying updated prayer times.

  • Verifying Hijri date display.

  • Tested on Niri

  • Tested on Hyprland

  • Tested on Sway

  • Tested on another compositor:

  • Noctalia version tested against: v5

  • Plugin API level: 3

Screenshots / Videos

screenshot_20260718_200503-region

Checklist

  • The directory name matches the part of id after the / in plugin.toml exactly.
  • It ships plugin.toml, README.md, thumbnail.webp, and translations/en.json.
  • README.md follows the README template, documents every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
  • I created thumbnail.webp with the thumbnail generator.
  • version follows semver and is bumped in this PR; plugin_api is the oldest API level this plugin requires.
  • Every non-English translation in this PR uses a locale supported by Noctalia core, and I can read, write, and understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
  • I did not edit catalog.toml; CI generates it.
  • This PR touches exactly one plugin directory.

Code review attestation

Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:

  • The code is readable and not obfuscated, minified, or generated.
  • It does not download and execute remote code.
  • Every network call, filesystem write, and spawned process is something the description above accounts for.
  • I have the right to publish this code under the license declared in plugin.toml.

Network

  • Daily HTTPS requests to api.aladhan.com/v1/timingsByCity for today's and tomorrow's prayer times using the configured city, country, calculation method, and school.

Filesystem

  • No direct filesystem writes. Reads bundled plugin assets (translations, icons, audio) and uses Noctalia's plugin settings API.

Processes

  • Launches paplay or pw-cat (whichever is available) to play the bundled azan audio and terminates playback when stopped or when the plugin exits.

@ItsLemmy

Copy link
Copy Markdown
Contributor

Readme need some love, see other plugins or the README_TEMPLATE.md
Also be aware that I'll add audio playback in the API in the upcoming days.

error: mawaqit/README.md: Plugin section must document the manifest id as `ycf/mawaqit`
error: mawaqit/README.md: Plugin section must document widget entry 'bar' as `bar`
error: mawaqit/README.md: Plugin section must document panel entry 'panel' as `panel`
error: mawaqit/README.md: Plugin section must document service entry 'fetcher' as `fetcher`
  1. blocking - mawaqit/README.md:7

The Plugin table only records fully qualified entry IDs. The validator requires the manifest ID ycf/mawaqit and the entry IDs bar, panel, and fetcher to be documented separately. This produces four validator errors and fails CI. Rework this section to follow the repository README template.

  1. blocking - mawaqit/service.luau:141

The azan path is hard-coded to ~/.local/share/noctalia/plugins/mawaqit/assets. Git-source plugins are materialized elsewhere, and path-source plugins remain in their configured directories, so normal community installations and the documented development setup cannot find the bundled audio. Construct the path from noctalia.pluginDir().

  1. blocking - mawaqit/service.luau:288
    mawaqit/panel.luau:309
    mawaqit/plugin.toml:10

Stopping playback uses broad pkill -f patterns that can terminate unrelated paplay or pw-cat processes whose command lines contain "azan". This is unsafe cross-process behavior. Track and terminate only playback started by this plugin. The currently invoked pkill command is also absent from the declared dependencies.

  1. blocking - mawaqit/plugin.toml:6

The package declares only MIT licensing, but DecoType.ttf identifies a third-party DecoType copyright and "MS Office Edition", while bundled MP3 metadata identifies a third-party website. No applicable asset licenses, provenance, or redistribution notices are included. Provide the relevant redistribution licenses and attribution, or replace the assets with clearly redistributable alternatives.

  1. non-blocking - mawaqit/README.md:15
    mawaqit/bar_widget.luau:244

The usage instructions reverse the controls. The implementation opens the panel on left click and cycles display mode on right click, while the README says the opposite.

@ItsLemmy
ItsLemmy marked this pull request as draft July 18, 2026 23:39
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 this pull request may close these issues.

2 participants