Created
April 11, 2019 10:42
-
-
Save marzdgzmn/00d70cca478432b205a4aa4fbf597f58 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
#!/bin/sh | |
xdpyinfo -ext XINERAMA | sed '/^ head #/!d;s///' | | |
while IFS=' :x@,' read i w h x y; do | |
import -window root -crop ${w}x$h+$x+$y $HOME/tmp/head_$i.png | |
done |
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
#!/bin/bash | |
TEMPDIR=$HOME/tmp | |
sh $HOME/.config/i3/individual_scrot.sh | |
convert $TEMPDIR/head_0.png -scale 10% -scale 1000% $TEMPDIR/head_0.png | |
[[ -f $HOME/pictures/misc/lock-image.png ]] && convert $TEMPDIR/head_0.png $HOME/pictures/misc/lock-image.png -gravity center -composite -matte $TEMPDIR/head_0.png | |
if [ -e $TEMPDIR/head_1.png ]; then | |
convert $TEMPDIR/head_1.png -scale 10% -scale 1000% $TEMPDIR/head_1.png | |
[[ -f $HOME/pictures/misc/lock-image.png ]] && convert $TEMPDIR/head_1.png $HOME/pictures/misc/lock-image.png -gravity center -composite -matte $TEMPDIR/head_1.png | |
convert $TEMPDIR/head_0.png $TEMPDIR/head_1.png +append $TEMPDIR/screen.png | |
else | |
mv $TEMPDIR/head_0.png $TEMPDIR/screen.png | |
fi | |
# dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop | |
i3lock -u -i $TEMPDIR/screen.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment