A modern, productivity-focused Dzikir/Tasbih counter built with WinUI 3 and .NET 8.
Unlike standard counters, this utility features Global Input Hooks, allowing you to recite and count while working, reading documents, or browsing the web, even when the application is minimized or in the background.
- Global Mouse Hooks: Increment the counter using your mouse's Side Buttons (Forward/Back) or Left Click without focusing the app.
- Custom Bindings: Record and bind any keyboard key or specific mouse button to the counter.
- Workflow Integration: Perfect for counting while reading PDFs, scrolling through articles, or gaming.
- Curated Presets: Select from standard Islamic Tasbih counts:
- SubhanAllah (33)
- Istighfar (100)
- Tahlil (1000)
- Custom Goals: Input any target number for specific wirid/adhkar.
- Visual Progress: A dynamic progress bar tracks your journey to the target.
- Completion Logic:
- Visual Cue: Counter turns Green.
- Audio Cue: Plays a "Success" chime.
- Auto-Loop: Automatically resets to 1 on the next click for continuous sets.
- Stopwatch: Tracks the duration of your Dzikir session.
- Smart Pause: The timer automatically pauses when you reach your target goal, giving you accurate session metrics.
- Mica Material: Uses the latest Windows design language with translucent backgrounds.
- Theme Aware: Fully supports System Light/Dark modes, plus a manual override toggle.
- Audio Feedback: Satisfying "Pop" sound for counting and "Chime" for success (Toggleable).
- Framework: Windows App SDK (WinUI 3)
- Language: C# (.NET 8)
- Architecture: MVVM (Model-View-ViewModel)
- Win32 Interop (P/Invoke):
SetWindowsHookEx: ImplementsWH_MOUSE_LLandWH_KEYBOARD_LLfor global input interception.SetWindowSubclass: Enforces minimum window size constraints viaWM_GETMINMAXINFO.RemoveWindowSubclass: Handles safe teardown onWM_DESTROYto prevent access violations.
-
Prerequisites:
- Windows 10 (1809+) or Windows 11.
- Visual Studio 2022 with "Windows App SDK" workload.
-
Build:
- Clone the repository.
- Open
DzikirCounter.sln. - Set platform to x64.
- Build and Run.
-
Assets:
- Ensure
sound/pop.mp3andsound/success.mp3are present in the project directory with Build Action: Content. - Ensure
Assets/icon.icois set up for the window title bar.
- Ensure
-
Trusting the Certificate (Required for MSIX Installation):
- To install the generated
.msixbundleas an app (Sideloading), you must first trust the certificate: - Locate the certificate file (usually in the build output folder alongside the bundle).
- Double-click or right-click the certificate and select Install Certificate.
- Select
Local Machine(requires Admin rights) and click Next. - Choose Place all certificates in the following store.
- Click Browse and select
Trusted Root Certification Authorities. - Click OK -> Next -> Finish.
- To install the generated
You can now double-click the .msixbundle to install the app.
This application uses Global Low-Level Hooks to function in the background.
- Why? This allows the app to detect clicks when it is not the active window (e.g., while you are reading a PDF).
- False Positives: Some security software may flag this behavior as keylogging. The code is open source and strictly counts clicks/keys only when the toggles are active.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.


