i3lock/xlock.sh
Greg Kroah-Hartman 08e642b951 Accepting request 228218 from home:seife:testing
add i3lock-xlock-compat package which provides /usr/bin/xlock for drop-in replacement in e.g. xflock4

OBS-URL: https://build.opensuse.org/request/show/228218
OBS-URL: https://build.opensuse.org/package/show/X11:windowmanagers/i3lock?expand=0&rev=7
2014-03-30 16:34:07 +00:00

12 lines
469 B
Bash

#!/bin/bash
#
XY=$(xdpyinfo |awk '/dimensions:/{print $2;exit}')
CACHEFILE=${HOME}/.cache/xlock-sim/lock-$XY.png
ICON=/usr/share/i3lock-xlock-compat/i3lock-icon.png
if ! test -e $CACHEFILE || test $ICON -nt $CACHEFILE; then
install -d ${HOME}/.cache/xlock-sim
convert $ICON -background none -gravity center -extent $XY $CACHEFILE
fi
# not totally black, so that we can see something is happening even if convert failed
exec /usr/bin/i3lock -n -c 444444 -i $CACHEFILE