Skip to main content

Pause/Resume your media players on screen locking/unlocking

Project description

Automatically pause your music player when the screen gets locked and resume plaback, once the screen is unlocked again.

This is basically the bash script with the same name rewritten in Python. The benefit of the Python version is that it should detect the screensaver you use and running player(s) automatically, as long, as they are visible on the D-Bus. So, no need for ever growing arrays of supported applications in the code and no configuration necessary.

Installation

Pause on Lock is available on pypi, so all you have to do is run pip install pauseonlock.

Usage

After installing, simply run pauseonlock. There will be no output, since the program is intended to be run in the background. For maximum convenience configure your desktop environment to start pauseonlock every time you log in.

Dependencies

The only dependency is python-dbus-next which itself has no further dependencies.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pauseonlock-0.1.0.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

pauseonlock-0.1.0-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page