Skip to content

aleferu/activevolume

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

activevolume

A lightweight background utility for adjusting the audio volume of the active application using global hotkeys.

When you press Alt + PageUp or Alt + PageDown, the program dynamically detects the foreground window, resolves its PID along with any child processes, and increments or decrements their audio output level by 1% (can be changed at src/main.c).


Linux Support

Prerequisites

You need a C compiler (gcc or clang) along with X11 and PulseAudio development headers:

sudo apt install gcc libx11-dev libpulse-dev

How to Build

This project uses the nob build system.

  1. Bootstrap the builder:
    cc nob.c -o nob
  2. Build the application:
    ./nob

Depending on the RELEASE_FLAG defined in nob.c (defaults to false for debug):

  • Debug Target (build/activevolumedebug): Compiles with -O0, debug prints enabled, and AddressSanitizer/UndefinedBehaviorSanitizer checks.
  • Release Target (build/activevolumerelease): Compiles with -O2 optimizations and stripped symbols.

Execution

Run the compiled binary:

./build/activevolumedebug

Or run the release target in the background:

./build/activevolumerelease &

Autorun at Startup

To make the release version start automatically on Linux startup, you can add it to your desktop environment's startup applications:

  1. Open Startup Applications (on Linux Mint / Cinnamon).
  2. Click Add -> Custom Command.
  3. Set the fields:
    • Name: Active Volume Daemon
    • Command: /path/to/activevolume/build/activevolumerelease (replace with the absolute path to your compiled release binary)
  4. Click Save.

Windows Support

The utility is fully ported to Windows and utilizes native Win32 APIs, Toolhelp32 snapshots, and WASAPI COM interfaces.

Prerequisites

You need a MinGW-w64 C compiler environment (such as gcc).

How to Build

  1. Bootstrap the builder:
    cc nob.c -o nob.exe
  2. Build the application:
    .\nob.exe

Depending on the RELEASE_FLAG defined in nob.c:

  • Debug Target (build/activevolumedebug.exe): Runs with a visible console window and outputs debug logs.
  • Release Target (build/activevolumerelease.exe): Built with -mwindows, which allows it to run completely silently in the background without launching a Command Prompt.

Autorun at Startup

To make the release version start automatically at Windows startup:

  1. Press Win + R, type shell:startup, and press Enter.
  2. Create a shortcut to build/activevolumerelease.exe inside this folder.

About

A lightweight background utility for adjusting the audio volume of the active application using global hotkeys.

Topics

Resources

License

Stars

Watchers

Forks

Contributors