Forced Focus - ungodlyaura

AnkiWeb addon 2107354708

Restricts access to other applications until enough Anki cards are reviewed, earning real-time usage that drains until focus is forced back.
AI-generated summary; may contain mistakes.

review-flowprogress-trackingmotivationtimer

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
2 (πŸ‘ 2 Β· πŸ‘Ž 0)
Updated
2026-07-31
Anki versions
2.1.1~
License
GPL-3.0 (from the GitHub repository)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, HTML, C, CSV, CoffeeScript, VBA, XML, JavaScript, Classic ASP, Vue, JSON, Lua
Description language
en

Maintenance

active

  • Last update or commit: 2026-07-31 (93 days before the snapshot).
  • Commits in the last year: 8.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.1+2026-07-31
History across monthly snapshots

Loading…

Similar addons

Anki Annoyer

Slowly displays kanji on screen, with configurable colors, timings, keybinds, and auto-advance, urging you to finish the current card.

review-flowshortcuts

2 votes 34% approval πŸ‘ 2 Β· πŸ‘Ž 0 ⭐ 3 Anki 25.09.2~ Updated 2025-12-15
Anki Enforcer

Blocks closing, minimizing, resizing or switching away from Anki, and warns or demands a bypass password, until selected decks' daily reviews are complete.

review-flow

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 Anki 2.1.1~ Updated 2026-04-24

Description

ForceFocus (Anki Add-on)

ForceFocus restricts access to other applications until you complete Anki reviews. Time is earned by reviewing cards and consumed in real time. When time runs out, focus is forced back to Anki until enough time is regained.

Core Behavior

  • You start locked.
  • Reviewing cards grants usable time.
  • While time remains, you can use other applications.
  • When time reaches 0 or below, focus is forced back to Anki.
  • You must reach min_unlock_time again to regain freedom.
  • Use the pause option for urgent needs, instead of closing Anki.

Includes tray icon to tell you info on hover + left/right click to pause

List of OS/WM compatibility

  • DriftWM (Works)
  • AwesomeWM (Untested)
  • Niri (Untested)
  • Windows (Works) - Uses Win32 APIs (pywin32, psutil, plyer), Linux users can delete those files
  • Hyprland (Wayland) (Works)
  • Sway (Wayland) (Untested)
  • KDE Plasma (Doesn't work)

Check the GitHub for setting information, update log or to report bugs/request features!

README

ForceFocus (Anki Add-on)

ForceFocus restricts access to other applications until you complete Anki reviews. Time is earned by reviewing cards and consumed in real time. When time runs out, focus is forced back to Anki until enough time is regained.


Core Behavior

  • You start locked.
  • Reviewing cards grants usable time.
  • While time remains, you can use other applications.
  • When time reaches 0 or below, focus is forced back to Anki.
  • You must reach min_unlock_time again to regain freedom.

List of OS/WM compatibility

Windows (Works) Uses Win32 APIs (pywin32, psutil, plyer) to detect active windows and force focus. Hyprland (Wayland) (Works) Uses hyprctl for active window detection and focus control. Sway (Wayland) (Untested) Uses swaymsg IPC to traverse the window tree and control focus. KDE Plasma (Doesn't work)


Configuration

Time & Unlocking

  • min_unlock_time Minimum seconds required before you are allowed to leave Anki after being locked.

  • max_time Maximum amount of time that can be accumulated. 0 = no cap.

  • allow_negative_time If enabled, time can go below zero (debt). If disabled, time clamps at zero.


Reward System

  • reward_ratings Card ratings that grant time (Anki ease buttons). Default: [2, 3, 4] (Good/Easy-type answers).

  • mode Time gain mode:

    • "per_card" β†’ fixed reward per card
    • "per_second" β†’ based on time spent answering
  • time_per_card Seconds gained per card when using "per_card" mode.

  • time_per_second Multiplier for time spent reviewing when using "per_second" mode.


Activity Handling

  • auto_pause Prevents time drain while actively reviewing cards.

  • recent_activity_window Time window (seconds) after a review where activity is considered β€œactive”.


Daily Limits

  • daily_quota Number of cards required to reach quota.

  • reset_time Time of day when daily stats reset (24h format, e.g. "04:00").


Undo Behavior

  • subtract_on_undo Removes previously gained time if a review is undone.

Notifications

  • notifications_enabled Enables warning notifications.

  • notification_start_time Remaining time (seconds) when warnings begin.

  • notification_interval Time between repeated warnings (seconds).

  • notification_duration Duration notifications stay visible (seconds).


App Exemptions

  • exempt_identifiers List of app identifiers that are allowed even while locked. Matches window class/title/process name substrings.

Windows-Specific Behavior

  • WINDOWS_UNMINIMIZE Restores Anki if minimized when forcing focus.

  • WINDOWS_MAXIMIZE Maximizes Anki window when focused.

  • WINDOWS_FULLSCREEN Forces borderless fullscreen mode on Anki.


Notes

  • Enforcement runs continuously; while locked, focus will repeatedly return to Anki.
  • Incorrect configuration of min_unlock_time will significantly affect usability.
  • Platform-specific window handling may behave differently depending on the window manager or OS limitations.

Changelog

=== 2026/7/29 ===

Pause focus

You can now pause enforcement for a while without needing to close Anki or mess with your time/config. Repeated presses stacks time

More window managers

Added Niri, Awesome WM, and driftwm. KDE likely still doesn't work

Time debt behavior change

Previously, with allow_negative_time on, it only counted into the negative manually while the application is open. Free-Time is now stored as an offset from your earned duration and the current time. Meaning it can know the correct time despite Anki being closed.