A simple desktop app to block distracting websites and help you stay focused. Built with Flutter.
Website Blocker is a simple, open-source desktop application that helps you stay focused by updating your hosts file to block distracting websites. Built with Flutter and Dart, it currently supports Windows (with plans for Mac and Linux later).
- Easy Website Blocking: Paste a list of websites (one per line) to block them.
- Validation: Automatically parses and validates website domains.
- Hosts File Management: Inserts blocked sites into your Windows hosts file between custom markers.
- Windows: Fully supported. You can build the app or download it from the releases page.
- Linux & MacOS: Currently limited due to administration access permissions on app launch. Contributions to add support are welcome via PR.
This app requires admin privileges to modify the system hosts file. It creates a backup of the hosts file named hosts.backup
in the same directory so you can always revert to the previous version.
Download the build files from the releases page, extract them, and run the app as administrator.
Because this app requires admin privileges, you must either:
- Run your IDE or terminal as administrator, or
- Remove the privilege flag from
windows/runner/CMakeLists.txt
. (Note: Removing the flag will disable the hosts file update functionality.)
# Add the manifest flags here
set_target_properties(${BINARY_NAME} PROPERTIES LINK_FLAGS "/MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\" /SUBSYSTEM:WINDOWS")
-
Clone the repository:
git clone https://github.com/aymendn/website-blocker-desktop.git
-
Navigate to the project directory:
cd website-blocker-desktop
-
Build the project:
flutter build windows # To run the app: flutter run -d windows
- Support for Linux and MacOS
- Improved websites configuration UI
- Dark mode
- More tests
Contributions are welcome! Feel free to:
- Open issues or pull requests.
- Follow the existing code style.
- Add tests for any new functionality.