Skip to content

Pause/Resume your music player when locking/unlocking Ubuntu

License

Notifications You must be signed in to change notification settings

ekul135/pause-on-lock

 
 

Repository files navigation

logo

pause-on-lock

Simple script that pauses your music player, when the screen gets locked and resumes playback once the screen is unlocked again.

Supported desktop environments

Currently Unity, Cinnamon, GNOME and MATE are supported. The currently running desktop is detected using $XDG_CURRENT_DESKTOP.

Supported players

By default pause-on-lock supports Rhythmbox and Spotify. If you want support for more players, you can install playerctl. If playerctl is installed pause-on-lock supports all players that playerctl can handle.

Installation

Simply download the executable for the latest release and put it in a directory of your choosing (e.g. $HOME/bin). If you don't want to use the absolute path to run pause-on-lock, make sure that the folder is in your $PATH. You might need to set the executable bit with chmod +x pause-on-lock.

Usage

Simply run pause-on-lock, there is no further configuration needed. I strongly recommend to add the pause-on-lock executable to Startup Applications, so it is run every time you log in.

Compatibility

Should run with all Ubuntu releases >= 16.04

About

Pause/Resume your music player when locking/unlocking Ubuntu

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Shell 100.0%