MCPcopy Index your code
hub / github.com/buzz/volctl

github.com/buzz/volctl @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
190 symbols 400 edges 31 files 71 documented · 37%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

volctl

Per-application volume control and OSD for Linux desktops.

Screenshot

I couldn't find a simple tray icon that allows to control multiple applications easily from the task bar. So I wrote my own.

Bug reports and patches welcome!

It's not meant to be a replacement for a full-featured mixer application. If you're looking for that check out the excellent pavucontrol.

Features

  • Runs on virtually every desktop environment (via SNI)
  • Control main volumes as well as individual applications
  • Mute individual applications
  • Shows application icons and names
  • Per-application VU meter
  • Click to open the mixer popup; right-click to open pavucontrol (or custom mixer application)
  • Mouse-wheel support
  • On-screen volume display (OSD)
  • Supports X11 and Wayland

Installation

Arch Linux

Available in AUR: volctl

Cargo

Install from source using Cargo:

cargo install --git https://github.com/buzz/volctl.git

Install the GSettings schema manually.

Manual installation

  1. Clone this repository and build in release mode:

sh cargo build --release

  1. Copy the binary to a location in your $PATH:

sh cp target/release/volctl ~/.local/bin/

Install the GSettings schema manually.

GSettings schema installation

volctl uses GSettings to store preferences. The schema file must be installed for the settings to work. Copy the schema XML and compile the schemas:

PREFIX="${HOME}/.local"
mkdir -p "$PREFIX/share/glib-2.0/schemas/"
curl -fsSL https://raw.githubusercontent.com/buzz/volctl/main/data/apps.volctl.gschema.xml \
  -o "$PREFIX/share/glib-2.0/schemas/apps.volctl.gschema.xml"
glib-compile-schemas "$PREFIX/share/glib-2.0/schemas/"

Development

Run from source

cargo run

Linting and formatting

cargo clippy
cargo fmt

Rust Rewrite

This is a Rust rewrite of the original Python version. The Python implementation is still available on the legacy-python branch.

License

GNU General Public License v3.0 or later

Extension points exported contracts — how you extend this code

SurfaceBackend (Interface)
Trait for OSD surface backends (X11, Wayland, etc.) [2 implementers]
src/ui/osd/surface/mod.rs

Core symbols most depended-on inside this repo

new
called by 129
src/ui/about_dialog.rs
window
called by 12
src/ui/osd/widget.rs
display
called by 9
src/ui/x11.rs
xlib
called by 8
src/ui/x11.rs
add_switch
called by 7
src/ui/prefs_window/imp.rs
add_scale
called by 6
src/ui/prefs_window/imp.rs
add_tick_marks
called by 6
src/ui/prefs_window/imp.rs
set_opacity
called by 6
src/ui/osd/controller.rs

Shape

Method 136
Function 24
Class 20
Enum 9
Interface 1

Languages

Rust100%

Modules by API surface

src/pulse/mod.rs21 symbols
src/ui/prefs_window/imp.rs14 symbols
src/ui/osd/surface/x11.rs14 symbols
src/ui/osd/controller.rs14 symbols
src/ui/tray.rs13 symbols
src/ui/osd/widget.rs11 symbols
src/ui/x11.rs10 symbols
src/ui/osd/surface/wayland.rs10 symbols
src/ui/utils.rs9 symbols
src/ui/mixer_window/mod.rs9 symbols
src/pulse/types.rs8 symbols
src/ui/mixer_window/scale/mod.rs7 symbols

For agents

$ claude mcp add volctl \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact