Skip to content

A smart Windows tray app that prevents your PC from going idle by simulating F13 keypresses, with automatic detection of media playback and games to avoid interruptions. Lightweight, configurable, and privacy-friendly.

Notifications You must be signed in to change notification settings

PaletaGalleta/IdleGuard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

IdleGuard

IdleGuard Logo

Keep your Windows session active intelligently

Windows C++

๐ŸŽฏ Overview

IdleGuard is a lightweight Windows system tray application that prevents your computer from going idle by intelligently simulating F13 key presses. Unlike simple "mouse jigglers" or basic idle prevention tools, IdleGuard features smart detection that pauses activity when you're actively consuming media or playing games.

โœจ Features

๐Ÿง  Smart Detection

  • Media Awareness: Automatically detects when you're watching Netflix, YouTube, listening to Spotify, or using other media applications
  • Gaming Support: Recognizes gaming platforms (Steam, Epic Games, Origin) and active games
  • Audio Session Monitoring: Monitors active audio sessions to prevent interruption during video calls, music playback, or streaming

๐ŸŽฎ Comprehensive Application Support

  • Browsers: Chrome, Firefox, Edge, Opera
  • Media Players: VLC, Windows Media Player, iTunes, Groove Music
  • Streaming: Netflix, Spotify, YouTube Music
  • Communication: Discord, Teams, Zoom, Skype
  • Gaming: Steam, Epic Games, Origin, Battle.net, GOG
  • Content Creation: OBS Studio

โš™๏ธ User-Friendly Features

  • System Tray Integration: Clean, minimal interface with status indicators
  • Auto-Start Support: Automatically starts with Windows (configurable)
  • Real-time Countdown: Shows time until next activity in tooltip
  • Configurable Intervals: Customize trigger timing via config file
  • Persistent Settings: Remembers your preferences between sessions

๐Ÿ”’ Privacy & Performance

  • Lightweight: Minimal resource usage and small file size
  • No Network Access: Operates entirely offline
  • Self-Contained: Single executable with no external dependencies
  • Non-Intrusive: Uses F13 key (unused by most applications)

๐Ÿš€ Quick Start

Installation

  1. Download the latest IdleGuard.exe from the Releases page
  2. Place it in your desired folder
  3. Run IdleGuard.exe
  4. Right-click the system tray icon to enable/disable or exit

First Run

  • IdleGuard starts enabled by default
  • Default trigger interval: 5 minutes
  • Automatically adds itself to Windows startup (can be disabled)
  • Configuration is saved to idleguard_config.ini

๐Ÿ“– How It Works

IdleGuard monitors your system for:

  1. User Idle Time: Tracks keyboard/mouse inactivity
  2. Audio Sessions: Detects active media playback
  3. Application Activity: Identifies media and gaming applications

When conditions are met (idle + no media/games), it sends an F13 keypress to maintain system activity.

Why F13?

  • F13 is rarely used by applications
  • Doesn't interfere with games or media
  • Effectively prevents idle timeouts
  • Won't disrupt your workflow

โš™๏ธ Configuration

Config File (idleguard_config.ini)

enabled=true
interval=300
  • enabled: true/false - Enable/disable IdleGuard
  • interval: Time in seconds between triggers (default: 300 = 5 minutes)

System Tray Menu

  • Enable/Disable: Toggle IdleGuard on/off
  • Status Display: Shows current state and countdown
  • Exit: Close application

๐Ÿ› ๏ธ Building from Source

Prerequisites

  • Windows 10/11
  • MinGW-w64 or Visual Studio
  • Windows SDK

Build Commands

# Compile resources
windres resource.rc build/resource.o

# Build executable
g++ -municode -mwindows -static main.cpp build/resource.o -o IdleGuard.exe -static-libgcc -static-libstdc++ -pthread -lole32

Dependencies

  • ole32.lib - For COM audio session management
  • Windows API libraries (included with SDK)

๐ŸŽฏ Use Cases

๐Ÿข Remote Work

  • Prevent idle timeouts during long meetings
  • Keep status active while reading documents
  • Maintain VPN connections

๐ŸŽฎ Gaming

  • Pause during gameplay sessions
  • Support for all major gaming platforms
  • No interference with game controls

๐ŸŽฌ Media Consumption

  • Smart detection of video streaming
  • Supports all major browsers and media apps
  • Pauses during active playback

๐Ÿ“š Study/Research

  • Stay active while reading lengthy documents
  • Prevent screen lock during research
  • Maintain access to remote resources

๐Ÿ”ง Technical Details

Architecture

  • Language: C++ with Windows API
  • COM Integration: Core Audio APIs for session monitoring
  • Threading: Multi-threaded design for responsive UI
  • Memory Management: RAII and smart pointer patterns

System Requirements

  • OS: Windows 10 or later
  • RAM: <5MB usage
  • CPU: Minimal impact (<0.1% usage)
  • Permissions: Standard user (no admin required)

๐Ÿšฆ Status Indicators

Icon Status Description
IdleGuard Logo Active IdleGuard is monitoring and will trigger when needed
IdleGuard Logo Inactive IdleGuard is disabled

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.

Development Setup

  1. Clone the repository
  2. Open in VS Code or your preferred editor
  3. Use the provided build tasks or command line builds
  4. Test thoroughly before submitting PRs

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Windows API documentation and community
  • Audio session management techniques from Microsoft samples
  • System tray implementation patterns

๐Ÿ“ž Support

If you encounter issues or have questions:

  1. Check the Issues page for existing solutions
  2. Create a new issue with detailed information
  3. Include your Windows version and error details

About

A smart Windows tray app that prevents your PC from going idle by simulating F13 keypresses, with automatic detection of media playback and games to avoid interruptions. Lightweight, configurable, and privacy-friendly.

Topics

Resources

Stars

Watchers

Forks