Skip to content

Pause/Resume your music player when locking/unlocking Ubuntu

License

Notifications You must be signed in to change notification settings

adrianvg/pause-on-lock

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 

Repository files navigation

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

You can download the latest release as source tarball. Simply extract the sources to a directory of your choosing (e.g. /opt/pause-on-lock). If you don't want to use the absolute path to run pause-on-lock, make sure to create a symlink to the executable in a folder that is in your $PATH (e.g. ln -s /opt/pause-on-lock/pause-on-lock $HOME/bin).

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.

Should run with all Ubuntu releases >= 16.04

About

Pause/Resume your music player when locking/unlocking Ubuntu

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%