Skip to content

Pauses media when headphones get plugged out and plays it when they get plugged in

License

Notifications You must be signed in to change notification settings

f1u77y/headphones-plug-detector

Repository files navigation

Headphones plug detector

What does it do

This program uses jacklistener to detect when you plug out your headphones and pauses music for you. When you plug them in again, it resumes all the players that were paused by this program.

You need jacklistener and MPRIS-compliant audio players for this program to work. If you're using some common DE (GNOME, KDE, Unity) and see the player widget on panel, then your player is MPRIS-compliant. Almost all common players with GUI (Clementine, Amarok, Deadbeef, etc.) are compliant (but some of them need enabling built-in plugin for this). If you're using MPD, you could run some proxy client like mpDris2 or use GUI client that has it out of the box like Cantata.

If you're using some non-common DE/WM or music player, you probably know what are you doing :)

Building

mkdir build
cd build
cmake ..
make

Dependencies

  • jacklistener
  • glib2

About

Pauses media when headphones get plugged out and plays it when they get plugged in

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published