|
1 |
| -# website_blocker_desktop |
2 | 1 |
|
3 |
| -A new Flutter project. |
4 | 2 |
|
5 |
| -## Getting Started |
| 3 | +<p align="center"> |
| 4 | +<img alt="Website Blocker Desktop" src="./github_assets/icon.png" width="100" height="100" style="max-width: 100%;"> |
| 5 | +</p> |
6 | 6 |
|
7 |
| -This project is a starting point for a Flutter application. |
| 7 | +<p align="center"> |
| 8 | + A simple desktop app to block distracting websites and help you stay focused. Built with Flutter. |
| 9 | +</p> |
8 | 10 |
|
9 |
| -A few resources to get you started if this is your first Flutter project: |
| 11 | +------ |
10 | 12 |
|
11 |
| -- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) |
12 |
| -- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) |
| 13 | +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). |
13 | 14 |
|
14 |
| -For help getting started with Flutter development, view the |
15 |
| -[online documentation](https://docs.flutter.dev/), which offers tutorials, |
16 |
| -samples, guidance on mobile development, and a full API reference. |
| 15 | +<p align="center"> |
| 16 | +<img alt="Website Blocker Desktop" src="./github_assets/presentation.png" width="900" style="max-width: 100%;"> |
| 17 | +</p> |
| 18 | + |
| 19 | +## Features |
| 20 | + |
| 21 | +- **Easy Website Blocking:** Paste a list of websites (one per line) to block them. |
| 22 | +- **Validation:** Automatically parses and validates website domains. |
| 23 | +- **Hosts File Management:** Inserts blocked sites into your Windows hosts file between custom markers. |
| 24 | + |
| 25 | +## Platform Support |
| 26 | + |
| 27 | +- **Windows:** Fully supported. You can build the app or download it from the releases page. |
| 28 | +- **Linux & MacOS:** Currently limited due to administration access permissions on app launch. Contributions to add support are welcome via PR. |
| 29 | + |
| 30 | +## Disclaimer |
| 31 | + |
| 32 | +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. |
| 33 | + |
| 34 | +## Installation |
| 35 | + |
| 36 | +Download the build files from the releases page, extract them, and run the app as administrator. |
| 37 | + |
| 38 | +## For Developers |
| 39 | + |
| 40 | +Because this app requires admin privileges, you must either: |
| 41 | + |
| 42 | +- Run your IDE or terminal as administrator, or |
| 43 | +- Remove the privilege flag from `windows/runner/CMakeLists.txt`. (Note: Removing the flag will disable the hosts file update functionality.) |
| 44 | + |
| 45 | +```cmake |
| 46 | +# Add the manifest flags here |
| 47 | +set_target_properties(${BINARY_NAME} PROPERTIES LINK_FLAGS "/MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\" /SUBSYSTEM:WINDOWS") |
| 48 | +``` |
| 49 | + |
| 50 | +## Build |
| 51 | + |
| 52 | +1. **Clone the repository:** |
| 53 | + |
| 54 | + ```bash |
| 55 | + git clone https://github.com/aymendn/website-blocker-desktop.git |
| 56 | + ``` |
| 57 | + |
| 58 | +2. **Navigate to the project directory:** |
| 59 | + |
| 60 | + ```bash |
| 61 | + cd website-blocker-desktop |
| 62 | + ``` |
| 63 | + |
| 64 | +3. **Build the project:** |
| 65 | + |
| 66 | + ```bash |
| 67 | + flutter build windows |
| 68 | + |
| 69 | + # To run the app: |
| 70 | + flutter run -d windows |
| 71 | + ``` |
| 72 | + |
| 73 | +## What’s Next? |
| 74 | + |
| 75 | +- Support for Linux and MacOS |
| 76 | +- Improved websites configuration UI |
| 77 | +- Dark mode |
| 78 | +- More tests |
| 79 | + |
| 80 | +## Contributing |
| 81 | + |
| 82 | +Contributions are welcome! Feel free to: |
| 83 | + |
| 84 | +- Open issues or pull requests. |
| 85 | +- Follow the existing code style. |
| 86 | +- Add tests for any new functionality. |
0 commit comments