Skip to content

eveiljuice/fitlocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FitLocker

🇬🇧 English · 🇷🇺 Русский

A resident Windows utility that locks every monitor with a fullscreen overlay on a configurable schedule and reminds you to take a stretch break.

What it does

  • Lives in the system tray, counts down the work interval in the background.
  • When the timer expires, displays a fullscreen white overlay on every connected monitor simultaneously, with a synchronised countdown.
  • The Done button is enabled only after the break timer reaches zero — no "close and forget".
  • The Defer button is rate-limited (default: at most 2 in a row).
  • Bilingual interface: English / Русский (chosen on first run, switchable in settings).
  • Optional autostart with Windows.

System requirements

  • Windows 10 / 11 (64-bit)
  • No external dependencies: portable zip, everything bundled.

Install

  1. Download the latest release from Releases.
  2. Unpack the zip into any folder (e.g., C:\Tools\FitLocker\).
  3. Run fitlocker.exe.
  4. On first launch, pick the interface language.

Build from source

Requirements:

  • Qt 6.5+ (Widgets, Core, Gui, Test, LinguistTools)
  • CMake 3.21+
  • MSVC 2019/2022 or MinGW (with C++20 support)
cmake -S . -B build -G Ninja \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_PREFIX_PATH=C:/Qt/6.11.0/mingw_64 \
      -DCMAKE_C_COMPILER=C:/Qt/Tools/mingw1310_64/bin/gcc.exe \
      -DCMAKE_CXX_COMPILER=C:/Qt/Tools/mingw1310_64/bin/g++.exe
cmake --build build
ctest --test-dir build --output-on-failure

Adjust the Qt and compiler paths to match your installation.

Build a portable distribution

mkdir dist
cp build/fitlocker.exe dist/
windeployqt --release --no-translations --no-system-d3d-compiler \
            --no-opengl-sw --no-svg --no-network dist/fitlocker.exe
# Optional: drop the heavy DirectX shader DLLs — the app does not use them.
rm dist/dxcompiler.dll dist/dxil.dll

The resulting dist/ folder (~35 MB) is a self-contained portable distribution.

Architecture

Modules:

src/
├── core/                    # fitlocker_core lib — no UI, unit-tested
│   ├── Config.{h,cpp}
│   ├── ConfigStore.{h,cpp}     # QSettings (registry HKCU)
│   ├── AutostartManager.{h,cpp}# HKCU\…\Run
│   └── SessionTimer.{h,cpp}    # state machine, sleep-aware
├── ui/                      # fitlocker_ui lib — Widgets
│   ├── LockOverlay.{h,cpp}     # frameless fullscreen, one per screen
│   ├── LockOverlayGroup.{h,cpp}# multi-monitor manager
│   ├── SettingsDialog.{h,cpp}
│   ├── LanguagePicker.{h,cpp}
│   ├── TrayController.{h,cpp}
│   └── AppController.{h,cpp}   # signal orchestrator
└── main.cpp                 # bootstrap: single-instance, fonts, i18n

Tests

ctest --test-dir build --output-on-failure

Seven test executables cover:

  • test_smoke — QtTest infrastructure sanity check
  • test_configConfig::clamp() validation
  • test_config_storeQSettings load/save round-trip + garbage clamping
  • test_autostart_manager — toggle + cross-instance persistence
  • test_session_timer — every phase + sleep recovery + paused-from-locked guard
  • test_lock_overlay — UI getters + signal emission + close-event ignored by default
  • test_lock_overlay_group — multi-monitor sync + tick decrement

Antivirus

A "fullscreen, no-exit" window is sometimes flagged as suspicious by antivirus engines. The MVP .exe is not code-signed yet — add FitLocker to your AV exclusions if needed.

License

MIT (see LICENSE once published).

About

Resident Windows utility that locks every monitor on a schedule to remind you to take a stretch break. Qt 6 / C++.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors