Created
September 28, 2017 20:41
-
-
Save maxjoehnk/8b8aa8dd41da8d75f5ed6d8e811b8cad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
tmpbg='/tmp/screen.png' | |
icon='/home/max/.config/i3/lock.png' | |
scrot "$tmpbg" | |
convert "$tmpbg" -scale 10% -scale 1000% "$tmpbg" | |
convert "$tmpbg" "$icon" -gravity center -composite -matte "$tmpbg" | |
mpc status | grep playing | |
playing=$? | |
mpc pause | |
i3lock -n -u -i "$tmpbg" | |
if [ $playing -eq 0 ]; then | |
mpc play | |
fi | |
rm $tmpbg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment