{"id":27414599,"url":"https://github.com/uppnrise/antiidle","last_synced_at":"2026-05-16T08:11:56.854Z","repository":{"id":237629489,"uuid":"794928851","full_name":"uppnrise/antiidle","owner":"uppnrise","description":"A Java application for preventing idle time by simulating user activity.","archived":false,"fork":false,"pushed_at":"2025-04-13T19:53:11.000Z","size":44,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T20:37:09.164Z","etag":null,"topics":["antiidle","gui","java","maven","robot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uppnrise.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-02T08:40:50.000Z","updated_at":"2025-04-13T19:53:00.000Z","dependencies_parsed_at":"2024-05-05T21:23:13.182Z","dependency_job_id":"5306eb84-0a01-475c-b8e4-135ee53410ec","html_url":"https://github.com/uppnrise/antiidle","commit_stats":null,"previous_names":["uppnrise/antiidle"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uppnrise%2Fantiidle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uppnrise%2Fantiidle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uppnrise%2Fantiidle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uppnrise%2Fantiidle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uppnrise","download_url":"https://codeload.github.com/uppnrise/antiidle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248845542,"owners_count":21170788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["antiidle","gui","java","maven","robot"],"created_at":"2025-04-14T08:29:55.467Z","updated_at":"2026-05-16T08:11:56.849Z","avatar_url":"https://github.com/uppnrise.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AntiIdle\n\n[![Java](https://img.shields.io/badge/Java-21+-orange.svg)](https://www.oracle.com/java/)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE.md)\n[![Build](https://img.shields.io/badge/Build-Gradle-green.svg)](https://gradle.org/)\n[![Version](https://img.shields.io/badge/Version-2.0.0-blue.svg)](https://github.com/uppnrise/antiidle/releases)\n\nThe **AntiIdle** project is a modern, lightweight Java application that simulates user activity to prevent system idle sleep. It features an elegant graphical user interface (GUI) with modern FlatLaf theming, comprehensive internationalization support (English \u0026 German), and intuitive controls for managing the idle prevention service.\n\n![AntiIdle Screenshot from Windows](antiidle-win.png)\n\n## 🚀 Features\n\n### Core Functionality\n- **Smart Mouse Movement**: Intelligently moves the mouse cursor slightly from its current position to prevent system idle sleep\n- **Keyboard Simulation**: Simulates harmless key presses (Shift key) to maintain system activity  \n- **Configurable Intervals**: Customizable activity intervals for efficient idle prevention (default: 30 seconds)\n\n### Modern UI/UX\n- **FlatLaf Modern Look \u0026 Feel**: Beautiful, modern interface with support for Light, Dark, and System themes\n- **Internationalization (i18n)**: Full support for English and German languages with easy switching\n- **Comprehensive Settings Dialog**: Tabbed interface for configuring all aspects of the application\n- **Intuitive Controls**: Clean interface with Start/Stop controls and visual status indicators\n- **Menu-Driven Navigation**: Organized menus for File, Language, and Help functions\n- **Tooltips**: Helpful tooltips on all interactive elements\n\n### Technical Excellence\n- **Cross-Platform**: Works on Windows, macOS, and Linux systems with Java support\n- **Lightweight**: Minimal resource usage and system impact\n- **Persistent Configuration**: Saves your preferences and window position automatically\n- **Modern Architecture**: Built with latest Java 21, Jackson 2.18, SLF4J 2.0, and Logback 1.5\n- **Code Quality**: Passes Checkstyle, SpotBugs, and JaCoCo quality checks\n\n## 📋 Requirements\n\n- **Java Development Kit (JDK) 21 or higher**\n- System with AWT and Swing support\n- Screen access permissions (may be required on macOS/Linux)\n\n## 🛠️ Installation \u0026 Usage\n\n### Method 1: Using Pre-built JAR\n\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/uppnrise/antiidle.git\n   cd antiidle\n   ```\n\n2. **Build the project:**\n   ```bash\n   ./gradlew build\n   ```\n\n3. **Run the application:**\n   ```bash\n   java -jar build/libs/antiidle-2.0.0-all.jar\n   ```\n   \n   **Note**: Use the `-all.jar` file which includes all dependencies. The regular `antiidle-2.0.0.jar` file does not include dependencies and will fail with `NoClassDefFoundError`.\n\n### Method 2: Using Application Scripts\n\n1. Build the project as above\n2. Run using the generated scripts:\n   ```bash\n   # On macOS/Linux:\n   ./build/scripts/antiidle\n   \n   # On Windows:\n   build\\scripts\\antiidle.bat\n   ```\n\n### Using the Application\n\n#### Basic Operation\n1. **Start the application** - The modern GUI window will appear with FlatLaf theming\n2. **Click \"▶ Start\"** - Begins the idle prevention simulation\n3. **Click \"⏹ Stop\"** - Stops the simulation\n4. **Close the window** - Exits the application (saves configuration automatically)\n\n#### Settings Dialog\nAccess via **⚙ Settings** button or **File → Settings** menu:\n\n**Activity Settings Tab**:\n- Configure simulation interval (5-300 seconds)\n- Enable/disable mouse movement simulation\n- Adjust mouse movement distance\n- Enable/disable keyboard simulation\n- Customize simulation key and duration\n\n**GUI Settings Tab**:\n- **Language**: Choose between English and German\n- **Theme**: Select System Default, Light Mode, or Dark Mode\n- Configure system tray and notifications\n- Dark mode toggle (legacy option)\n\n**System Settings Tab**:\n- Auto-start configuration\n- System boot integration\n- Update checking preferences\n\n#### Language Switching\nSwitch languages anytime via **Language** menu:\n- 🇬🇧 **English** - Full English interface\n- 🇩🇪 **Deutsch** - Complete German translation\n\nThe application will prompt you to restart for language changes to take full effect.\n\n#### Theme Customization\nChoose your preferred theme:\n- **System Default**: Automatically matches your operating system theme\n- **Light Mode**: Clean, bright interface using FlatLaf IntelliJ theme\n- **Dark Mode**: Easy on the eyes using FlatLaf Darcula theme\n\n## ⚙️ Configuration\n\nThe application stores its configuration in `~/.antiidle/antiidle-config.yml`. This file is automatically created on first run and updated when you save settings.\n\n### Configuration Options\n\n```yaml\nactivity:\n  interval_seconds: 30              # Time between activity simulations\n  mouse_movement_enabled: true       # Enable mouse simulation\n  mouse_movement_distance: 1         # Pixels to move mouse\n  keyboard_simulation_enabled: true  # Enable keyboard simulation\n  simulation_key: \"SHIFT\"           # Key to simulate\n  key_press_duration_ms: 100        # How long to press key\n\ngui:\n  language: \"en\"                    # Interface language (en/de)\n  theme: \"system\"                   # UI theme (system/light/dark)\n  dark_mode: false                  # Legacy dark mode setting\n  minimize_to_tray: true            # Minimize to system tray\n  show_notifications: true          # Show system notifications\n  window_position_x: -1             # Saved window X position\n  window_position_y: -1             # Saved window Y position\n\nsystem:\n  auto_start: false                 # Auto-start simulation on launch\n  start_on_boot: false              # Start with operating system\n  check_for_updates: true           # Check for application updates\n\nlogging:\n  log_level: \"INFO\"                 # Logging level\n  log_to_file: true                 # Enable file logging\n  max_log_file_size_mb: 10         # Maximum log file size\n  keep_log_files: 5                # Number of log files to keep\n```\n\n## 🔧 Technical Details\n\n### Algorithm Overview\n\n1. **Initialization**: Creates a `Robot` instance for system input simulation\n2. **Activity Simulation**: \n   - Detects current mouse position\n   - Moves mouse 1 pixel and back to simulate natural movement\n   - Presses and releases Shift key briefly\n   - Waits 30 seconds before repeating\n3. **Thread Management**: Uses separate thread for background operation\n4. **Graceful Shutdown**: Properly handles thread interruption and cleanup\n\n### Architecture\n\nThe application follows a clean, modular architecture:\n\n- **`AntiIdleGUI`**: Main GUI class with FlatLaf theming and menu system\n- **`ActivitySimulator`**: Core simulation engine managing mouse and keyboard events\n- **`ConfigurationManager`**: Handles loading, saving, and managing application configuration\n- **`I18nManager`**: Internationalization manager for multi-language support\n- **`SettingsDialog`**: Comprehensive settings UI with tabbed interface\n\n**Key Technologies**:\n- **FlatLaf 3.5.4**: Modern Look and Feel for Swing applications\n- **Jackson 2.18.2**: YAML configuration parsing and serialization\n- **SLF4J 2.0.16 + Logback 1.5.15**: Professional logging framework\n- **Java ResourceBundle**: Standard i18n support for translations\n- **Java AWT Robot**: Cross-platform input event simulation\n\n**Design Patterns**:\n- Singleton pattern for I18nManager\n- MVC-like separation with GUI, core logic, and configuration\n- Observer pattern for configuration changes\n- Builder pattern in Gradle build configuration\n\n## 🧪 Testing\n\nRun the test suite:\n```bash\n./gradlew test\n```\n\nThe project includes unit tests for:\n- Thread lifecycle management\n- GUI button interactions\n- Start/stop functionality\n- Configuration persistence and loading\n- ActivitySimulator behavior\n\nRun with coverage report:\n```bash\n./gradlew test jacocoTestReport\n```\n\nQuality checks (Checkstyle, SpotBugs):\n```bash\n./gradlew check\n```\n\n## 🌐 Internationalization (i18n)\n\nAntiIdle v2.0 introduces comprehensive internationalization support with the following languages:\n\n### Supported Languages\n\n- **English (en)** - Default language\n- **German (de)** - Vollständige deutsche Übersetzung\n\n### Adding New Translations\n\nTo add support for a new language:\n\n1. Create a new properties file: `src/main/resources/i18n/messages_{language_code}.properties`\n2. Copy all keys from `messages_en.properties`\n3. Translate the values to your target language\n4. Update `I18nManager.getAvailableLocales()` to include the new locale\n5. Add menu items in `AntiIdleGUI.setupMenuBar()`\n\nExample:\n```properties\n# messages_fr.properties\napp.title=AntiIdle v2.0.0\nbutton.start=▶ Démarrer\nbutton.stop=⏹ Arrêter\nstatus.running=▶ Prévention d'inactivité en cours\n```\n\n### Translation Keys\n\nAll UI text is externalized to properties files with organized key prefixes:\n- `app.*` - Application-level strings\n- `button.*` - Button labels\n- `menu.*` - Menu items\n- `status.*` - Status messages\n- `activity.*` - Activity-related settings\n- `gui.*` - GUI settings\n- `system.*` - System settings\n- `language.*` - Language names\n- `dialog.*` - Dialog messages and titles\n- `tooltip.*` - Tooltip text\n\n## 🔒 Permissions\n\n### macOS\nYou may need to grant accessibility permissions:\n1. Go to **System Preferences** → **Security \u0026 Privacy** → **Privacy**\n2. Select **Accessibility** from the left panel\n3. Add your terminal application or Java to the allowed applications\n\n### Linux\nEnsure your user has access to input devices (usually automatic).\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n### Development Setup\n\n1. Clone the repository\n2. Import into your favorite IDE (IntelliJ IDEA, Eclipse, VS Code)\n3. Ensure Java 21+ is configured\n4. Run `./gradlew build` to build and test\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n**Application won't start on macOS:**\n- Grant accessibility permissions as described above\n- Ensure Java 21+ is installed: `java -version`\n\n**Theme not applying correctly:**\n- Restart the application after changing theme settings\n- Check that FlatLaf libraries are included in the JAR\n\n**Language not changing:**\n- Restart the application after changing language settings\n- Verify the language properties files exist in resources\n\n**NoClassDefFoundError when running JAR:**\n- Use the fat JAR with all dependencies: `java -jar build/libs/antiidle-2.0.0-all.jar`\n- The regular `antiidle-2.0.0.jar` file does not include dependencies\n- Ensure you have Java 21 or higher installed: `java -version`\n\n**Mouse movements not working:**\n- Check if screen recording permissions are granted\n- Verify the application has input access rights\n\n**Build failures:**\n- Ensure Gradle is installed or use the included wrapper: `./gradlew --version`\n- Check Java version compatibility: `java -version`\n- Clean and rebuild: `./gradlew clean build`\n\n### Reporting Issues\n\nPlease report bugs by [opening an issue](https://github.com/uppnrise/antiidle/issues) with:\n- Operating system and version\n- Java version (`java -version`)\n- Steps to reproduce the issue\n- Error messages (if any)\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n\n## ⚠️ Disclaimer\n\nThis application is intended for legitimate use cases such as:\n- Preventing screensavers during presentations\n- Keeping systems active during long-running tasks\n- Maintaining remote desktop connections\n\nPlease use responsibly and in accordance with your organization's policies.\n\n## 📦 What's New in v2.0.0\n\n### Major Features\n- 🎨 **Modern FlatLaf UI**: Beautiful, professional interface with Light/Dark/System themes\n- 🌐 **Internationalization**: Full English and German language support\n- ⚙️ **Comprehensive Settings**: New tabbed settings dialog for complete customization\n- 📋 **Menu System**: Organized File, Language, and Help menus\n- 💾 **Persistent Configuration**: Automatic saving of all settings and preferences\n\n### Technical Improvements\n- ⬆️ **Updated Dependencies**: All libraries updated to latest stable versions\n- 🔒 **Security**: No vulnerabilities (verified via GitHub Advisory Database)\n- ✅ **Code Quality**: Passes all Checkstyle, SpotBugs, and test checks\n- 📚 **Better Documentation**: Comprehensive README with examples and troubleshooting\n\n### Breaking Changes\n- Version bumped from 1.1.0 to 2.0.0\n- Configuration file format remains compatible\n- New theme and language settings in config\n\nFor complete changelog, see [CHANGELOG.md](CHANGELOG.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuppnrise%2Fantiidle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuppnrise%2Fantiidle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuppnrise%2Fantiidle/lists"}