Skip to content

mateozf/soundctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SoundCtl

A simple GTK-based Python tool to select and set audio output devices on GhostBSD.


Features

  • Detects available sound output devices (/dev/sndstat).
  • Allows selecting a device from a GTK dropdown menu.
  • Sets the default output device via sysctl.

Requirements

  • GhostBSD (or FreeBSD-based system)
  • Python 3.11+
  • GTK3 and PyGObject (system packages)

Install required packages:

sudo pkg install python py311-pygobject gtk3 gobject-introspection glib pkgconf

Installation (via Makefile)

Clone the repository:

git clone https://github.com/mateo-rfz/soundctl
cd soundctl

Install dependencies, build, and optionally install the binary:

To install system and Python dependencies, build the executable, and install to /usr/local/bin:

sudo make install

To only build the standalone executable (without installing):

make build

To install the binary separately after building:

make install-bin

To uninstall the binary from /usr/local/bin:

make uninstall

Usage

You can either run the script directly or use the installed binary:

Run the Python script:

python3 soundctl.py

Or, if installed via Makefile:

soundctl

Select your preferred output device from the GTK dropdown.

The script will automatically update the default sound unit.

⚠️ On GhostBSD, building a standalone binary with PyInstaller may fail if system-wide GTK or PyGObject dependencies are missing. Running the script directly is recommended.

Development

Clean build artifacts and virtual environment:

make clean


Build standalone executable (optional):

make build


Install the binary to /usr/local/bin (optional):

make install

License

BSD-2-Clause license

About

switch audio output on GhostBSD

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors