Skip to content

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AudioKeepAwake πŸŽΆπŸ’€

A lightweight, completely native Windows background utility that prevents your computer and monitor from going to sleep while audio is playing.

Have you ever been watching a long video, listening to a podcast, or playing a game with a controller where you aren't touching the mouse or keyboard, and your screen randomly turns off? AudioKeepAwake silently runs in the background and fixes this by ensuring your system stays awake whenever there is sound playing!

No external dependencies, Python installations, or third-party libraries required. It relies entirely on the built-in Windows Core Audio APIs.

How it works βš™οΈ

AudioKeepAwake runs invisibly in your system tray. Every 60 seconds, it checks your default audio output device.

  • If it detects sound, it sends a signal to Windows (SetThreadExecutionState) to prevent the system from sleeping and the display from turning off.
  • If it detects silence, it removes the block, allowing Windows to follow your normal power and sleep settings.

System Tray Indicators 🟒🟠

You can always check what AudioKeepAwake is doing by glancing at your system tray (down by the clock). It draws dynamic text icons based on the current state:

  • 🟠 Orange "Zzz": Idle. No audio is currently playing. Your system is allowed to sleep normally.
  • 🟒 Green "Zzz": Active. Audio is currently playing. Your system sleep and display turn-off are being actively prevented.

To close the application, simply right-click the "Zzz" icon in your system tray and select Exit. This will instantly restore your normal sleep settings.

Installation & Usage πŸš€

Option 1: Run the Pre-built Executable (Easiest)

You can simply download the pre-built AudioKeepAwake.exe file and run it directly. There is no installation required!

How to make it run automatically on startup:

  1. Press Win + R on your keyboard to open the Run dialog.
  2. Type shell:startup and hit Enter.
  3. Copy the AudioKeepAwake.exe file (or create a shortcut to it) and paste it into this Startup folder.
  4. It will now run silently in the background every time you turn on your PC!

Option 2: Compile from Source using Install.bat

If you'd prefer to build the executable yourself from the raw C# source code, you can do so easily using the provided batch file.

The Install.bat script is written to automatically find the C# compiler (csc.exe) that is already built into Windows.

Steps:

  1. Download both AudioKeepAwake.cs and Install.bat to a folder.
  2. Double-click Install.bat.
  3. The script will:
    • Dynamically locate your internal Windows .NET Framework compiler.
    • Compile AudioKeepAwake.cs into a background .exe file without needing Visual Studio.
    • Automatically copy the generated executable into your Windows Startup folder so it loads automatically on boot.
    • Launch the application for you immediately.

Requirements

  • Windows 7, 8, 10, or 11
  • .NET Framework (Already included in modern Windows installations)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages