Skip to content

Keep-Awake is a lightweight, configurable tool that prevents your Windows PC from going to sleep by subtly moving your mouse at regular intervals. Perfect for keeping your status "Active" during presentations, long downloads, or when you just need your computer to stay awake!

License

Notifications You must be signed in to change notification settings

Ketan-K/keep-awake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โ˜• Keep-Awake

Your PC's personal coffee! Never sleep again! โ˜•๐Ÿ’ป

Version License: MIT Platform Downloads

Keep-Awake is a lightweight, feature-rich tool that prevents your Windows PC from going to sleep. With multiple keep-awake modes, smart user detection, and a beautiful material design interface, it's the perfect solution for keeping your status "Active" during presentations, long downloads, or when you just need your computer to stay awake!

๐Ÿ“ธ Screenshots

Keep-Awake Main Interface
Main interface with material design and all settings

Timed Mode with Countdown
Timed mode showing countdown timer

Smart Mode Indicator
Smart mode actively detecting and skipping when user is active

โœจ Features

๐ŸŽจ Modern Material Design UI

  • Clean green and white interface with proper alignment
  • Real-time status updates with countdown timer
  • Consolidated settings panel with intuitive layout
  • Always-on-top status window with tray integration

โฑ๏ธ Duration Control

  • Infinite Mode - Run continuously until manually stopped
  • Timed Mode - Auto-stop after set duration
  • Quick presets: 15 min, 30 min, 1 hour, 2 hours
  • Custom duration support (1-1440 minutes)
  • Real-time countdown display

๐Ÿ–ฑ๏ธ Multiple Keep-Awake Modes

  • F15 Key (Default) - Silent, non-intrusive key press
  • Mouse Shake - Quick horizontal mouse shake
  • Mouse Move - Diagonal mouse movement
  • Key Press - Shift key press (harmless)

๐Ÿง  Smart Mode

  • Automatically detects user activity
  • Pauses keep-awake when you're using your PC
  • Real-time skip indicator in status panel
  • 10-second idle threshold detection

๐Ÿ”” Notifications & Feedback

  • Optional notification when timed session ends
  • Visual feedback on settings changes
  • System tray integration with coffee icon
  • Live statistics and uptime tracking

๐ŸŽฏ Additional Features

  • ๐Ÿ“Š Real-time Monitoring - Live stats with formatted time display
  • ๐ŸŽฏ Dual Mode - GUI mode by default, CLI mode with arguments
  • ๐Ÿคซ Quiet Mode - Run silently in the background
  • ๐Ÿ“ฆ Truly Portable - Single standalone .exe (~1.2MB)
  • ๐Ÿš€ Lightweight - Minimal resource usage

๐Ÿš€ Quick Start

Option 1: Use Pre-built Executable (Recommended!)

  1. Download keep-awake.exe from Releases

  2. Double-click to launch - Opens a GUI status window!

    • Shows running time (e.g., "2m 30s")
    • Displays mouse shake statistics
    • Click "Run in Background" to minimize to tray
    • Click "Exit" to close the application
  3. Or run from command line for CLI mode:

    keep-awake.exe --interval 30 --shake-size 5

โœจ Truly Portable: Single .exe file (~1.2MB) with embedded coffee icon - works anywhere on Windows!

Option 2: Run from Source

# Clone the repository
git clone https://github.com/Ketan-K/keep-awake.git
cd keep-awake

# Run the AutoHotkey script directly (requires AutoHotkey v1.1)
"C:\Program Files\AutoHotkey\AutoHotkey.exe" keep-awake.ahk

# Or edit keep-awake.ahk with any text editor and customize

๐ŸŽฎ Usage

GUI Mode (Default)

Simply double-click keep-awake.exe to launch the beautiful interface:

Main Interface Features:

  • ๐ŸŽจ Material Design - Clean green and white theme
  • โฑ๏ธ Duration Settings
    • Choose Infinite or Timed mode
    • Quick presets (15/30/60/120 minutes) or custom duration
    • Real-time countdown when in timed mode
  • ๐Ÿ–ฑ๏ธ Mode Selection
    • F15 Key (default, silent)
    • Mouse Shake (horizontal)
    • Mouse Move (diagonal)
    • Key Press (Shift key)
  • ๐Ÿ”ง Smart Controls
    • Shake/Move size (only shown for mouse modes)
    • Frequency adjustment (1-3600 seconds)
  • ๐Ÿง  Smart Mode - Auto-detects user activity and pauses
  • ๐Ÿ”” Notifications - Optional alert when session ends
  • ๐Ÿ“Š Live Status - Shows mode, frequency, and remaining time

Tray Icon Features:

  • Coffee cup icon in system tray
  • Right-click โ†’ "Open" to show window
  • Right-click โ†’ "Exit" to close
  • Hover for tooltip with stats

CLI Mode (Advanced)

Run with arguments to use command-line mode with table output:

keep-awake.exe [options]

Options:
  --interval <seconds>    Set interval between shakes (default: 60)
  --shake-size <pixels>   Set shake distance (default: 10)
  --quiet                 Suppress console output
  --help                  Show help message

Examples:
  keep-awake.exe                              # GUI mode (default)
  keep-awake.exe --interval 30 --shake-size 5 # CLI mode with custom settings
  keep-awake.exe --quiet                      # CLI silent mode
  keep-awake.exe --help                       # Show help

Configuration Options

Option Description Default Range
--interval Time between shakes (seconds) 60 1-3600
--shake-size Shake distance in pixels 10 1-100
--quiet Suppress all console output (CLI mode only) false -
--help Display help message - -

CLI Mode Output Example

When run with arguments, displays running status:

================================
KEEP-AWAKE is running
Interval: 60s | Shake Size: 10px
================================

Mouse shakes performed every 60 seconds...
Press Ctrl+C to exit

Note: The shake motion moves the mouse slightly right and immediately back to its original position. No position tracking is shown in CLI mode since the mouse returns to where it started.

๐Ÿ”จ Building from Source

Prerequisites

Build Steps

# Clone the repository
git clone https://github.com/Ketan-K/keep-awake.git
cd keep-awake

# Build the executable
npm run build

# Output: dist/keep-awake.exe (~1.2MB standalone file)

Manual Build

# Compile with AutoHotkey
"C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe" /in keep-awake.ahk /out keep-awake.exe /icon keep-awake.ico

Note: The keep-awake.ico coffee cup icon is included in the repository and embedded into the executable during compilation.

๐ŸŽฏ Use Cases

  • ๐Ÿ“Š Presentations - Keep screen active during long demos with timed auto-stop
  • ๐Ÿ’ฌ Teams/Slack - Stay "Active" while reading documentation (Smart Mode pauses when you type!)
  • ๐Ÿ“ฅ Downloads - Prevent sleep during large file transfers with custom duration
  • ๐ŸŽฅ Streaming - Keep PC awake during broadcasts with F15 mode (silent)
  • ๐Ÿ“š Reading - No interruptions while deep in articles
  • ๐Ÿงช Testing - Long-running automated tests or builds
  • โ˜• Coffee Breaks - Set a timer and get notified when it's time to come back!

๐ŸŽจ GUI Features

v2.0 Material Design Interface:

  • ๐ŸŽจ Modern Layout - Green and white theme with proper grid alignment
  • โฑ๏ธ Duration Control - Infinite or Timed with countdown display
  • ๐Ÿ–ฑ๏ธ 4 Keep-Awake Modes - F15, Mouse Shake, Mouse Move, Key Press
  • ๐Ÿง  Smart Mode - Auto-detects user activity with skip indicator
  • ๐Ÿ”” Notifications - Optional alerts when session ends
  • ๐Ÿ“Š Real-time Stats - Live uptime, mode, frequency, and remaining time
  • ๐ŸŽฏ Dynamic Controls - Shake size only shows for mouse modes
  • โ˜• Tray Integration - Coffee cup icon with quick access
  • โœ… Visual Feedback - "Applied!" confirmation on settings changes
  • ๐Ÿ”„ Single Instance - Prevents multiple windows
  • ๐Ÿ“Œ Always On Top - Option to keep window visible (can minimize to tray)

โš ๏ธ Disclaimer

This tool is intended for legitimate personal use only. Please use responsibly and in accordance with your workplace policies. The author is not responsible for any misuse of this software.

Remember: The best way to stay active is to actually be active! This tool is for those moments when you genuinely need your PC awake but can't interact with it. ๐Ÿ˜Š

๐Ÿ“ License

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

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'โœจ Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ’– Show Your Support

Give a โญ๏ธ if this project kept your PC awake!


Made with โ˜• by Ketan-K

Keep calm and stay awake! ๐Ÿ˜ดโžก๏ธ๐Ÿ˜ƒ

About

Keep-Awake is a lightweight, configurable tool that prevents your Windows PC from going to sleep by subtly moving your mouse at regular intervals. Perfect for keeping your status "Active" during presentations, long downloads, or when you just need your computer to stay awake!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published