https://github.com/folixg/python-pauseonlock
Pause/Resume your music player when locking/unlocking your Linux desktop.
https://github.com/folixg/python-pauseonlock
linux-desktop mediaplayer mediaplayer-control screenlock screensaver
Last synced: 8 months ago
JSON representation
Pause/Resume your music player when locking/unlocking your Linux desktop.
- Host: GitHub
- URL: https://github.com/folixg/python-pauseonlock
- Owner: folixg
- License: mit
- Created: 2021-03-11T21:24:51.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-20T21:44:41.000Z (over 5 years ago)
- Last Synced: 2025-02-02T08:42:04.572Z (over 1 year ago)
- Topics: linux-desktop, mediaplayer, mediaplayer-control, screenlock, screensaver
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
#############
Pause on lock
#############
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.
.. _the bash script with the same name: https://github.com/folixg/pause-on-lock
.. _python-dbus-next: https://github.com/altdesktop/python-dbus-next