Skip to content

Block distracting apps and browser tabs from your Mac menu bar. Lightweight, open source, privacy-first macOS focus tool.

License

Notifications You must be signed in to change notification settings

devsemih/appjail

Repository files navigation

AppJail — Block Distracting Apps & Browser Tabs on macOS

A free, open-source macOS menu bar app that blocks distracting applications and browser tabs to help you stay focused. Focus timer, scheduled blocking, website categories, and more — no browser extensions required.

AppJail sits in your menu bar and enforces focus by terminating blocked applications and closing browser tabs that match URL keywords — all powered by native macOS APIs.

Build & Release macOS Swift License Privacy

AppJail Dashboard — card-based interface with quick access to apps, websites, and categories   AppJail Websites — block browser tabs by URL keyword   AppJail Categories — block entire categories like Social Media, Shopping, News

AppJail Focus Timer — timed focus sessions with strict mode   AppJail Schedules — recurring block schedules by day and time

Features

  • Block Apps — Select any installed application to block. When activated, the app is immediately terminated.
  • Block Browser Tabs — Add URL keywords (e.g. youtube, reddit, twitter). Matching tabs are closed automatically — no browser extension needed.
  • Website Categories — Block entire categories of sites (Social Media, Shopping, News, Entertainment, Gaming) with one tap instead of adding keywords one by one.
  • Focus Timer — Start timed focus sessions (25, 45, 60, or 90 minutes) that automatically enable blocking. Strict mode prevents you from stopping early.
  • Scheduled Blocking — Set up recurring block schedules by day of week and time range. Blocking activates and deactivates automatically.
  • Redesigned Dashboard — A unified card-based interface replaces the old tab layout. Quick-access cards show blocked app, website, and category counts at a glance.
  • Menu Bar Only — Runs entirely from the menu bar with no dock icon. Minimal, distraction-free interface.
  • Event-Driven — Monitors app switches via NSWorkspace notifications. No polling, no CPU waste.
  • Privacy-First — No network requests, no telemetry, no tracking. Everything runs locally on your Mac.
  • Violation Alerts — A floating panel appears briefly when a blocked app or URL is caught.
  • Persistent Configuration — All block lists, schedules, and settings survive app restarts.

Supported Browsers

Browser App Block Tab Block
Safari Yes Yes
Google Chrome Yes Yes
Microsoft Edge Yes Yes
Brave Yes Yes
Arc Yes Yes
Dia Yes Yes
Vivaldi Yes Yes
Opera Yes Yes
Firefox Yes No (no AppleScript support)

Installation

Download

Download the latest AppJail.dmg from Releases, open it, and drag AppJail to your Applications folder.

The app is signed and notarized by Apple — just download, install, and run.

Build from Source

git clone https://github.com/devsemih/appjail.git
cd appjail
xcodebuild -project appjail.xcodeproj -scheme appjail -configuration Release

Requires Xcode 16+ and macOS 15.0+.

Permissions

AppJail needs two permissions on first launch:

Permission Why
Accessibility To monitor which app is frontmost and terminate blocked apps
Automation To read browser URLs and close tabs via AppleScript

The onboarding screen guides you through granting both. You can manage them later in System Settings > Privacy & Security.

How It Works

  1. AppJail observes NSWorkspace.didActivateApplicationNotification to detect app switches.
  2. When a blocked app comes to the foreground, it calls terminate() on the process.
  3. When a browser activates and URL keywords exist, it reads the active tab URL via AppleScript and closes the tab if a keyword matches.

No background polling. No network requests. Everything runs locally.

Why AppJail?

Unlike browser extensions or network-level blockers, AppJail blocks both apps and browser tabs from a single native menu bar interface. Compared to tools like SelfControl, Cold Turkey, or Freedom — AppJail is lightweight, open source, and works across 8+ browsers without modifying network settings or requiring a subscription.

Architecture

Models/         Data models and persistence (BlockList, BlockSchedule, FocusTimerState, WebsiteCategory)
Services/       Core logic (MonitoringEngine, FocusTimerManager, ScheduleManager, AppScanner, BrowserRegistry)
Views/
  Components/   Reusable UI components (StatusCard, QuickConfigCard, TimerRingView, etc.)
  Sheets/       Modal sheets (SelectApps, SelectWebsites, WebsiteCategories, FocusTimer, Schedule)

What's New in v1.1.0

  • Focus Timer with strict mode and preset durations
  • Scheduled blocking with weekday and time range support
  • Website category blocking (Social Media, Shopping, News, Entertainment, Gaming)
  • Redesigned dashboard with card-based layout and glass effect styling
  • Three monitoring triggers: manual, timer-based, and schedule-based
  • New reusable components (TimerRingView, StatusCard, QuickConfigCard, LetterAvatar)

License

MIT

About

Block distracting apps and browser tabs from your Mac menu bar. Lightweight, open source, privacy-first macOS focus tool.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages