Closed jtrees closed 2 years ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
For more information, open the CLA check for this pull request.
Thanks!
This only works on two monitors, not 3 or 4 =( Should be something likes this or similar;
XSECURELOCK_IMAGE_PATH_0=dir/left.jpg
XSECURELOCK_IMAGE_PATH_1=dir/center.jpg
XSECURELOCK_IMAGE_PATH_2=dir/right.jpg
XSECURELOCK_IMAGE_PATH_3=dir/top.jpg
@tuxy Yes, well spotted. You would have to tweak the examples for more monitors.
Some quick and dirty (untested) changes:
# saver_feh
#!/usr/bin/env bash
set -euo pipefail
case $XSCREENSAVER_SAVER_INDEX in
1)
IMAGE_PATH="$XSECURELOCK_IMAGE_PATH_1"
;;
2)
IMAGE_PATH="$XSECURELOCK_IMAGE_PATH_2"
;;
3)
IMAGE_PATH="$XSECURELOCK_IMAGE_PATH_3"
;;
*)
IMAGE_PATH="$XSECURELOCK_IMAGE_PATH_0"
;;
esac
feh \
--window-id="$XSCREENSAVER_WINDOW" \
--xinerama-index="$XSCREENSAVER_SAVER_INDEX" \
-F "$IMAGE_PATH
XSECURELOCK_IMAGE_PATH_0="$HOME/Pictures/left-screen.png" \
XSECURELOCK_IMAGE_PATH_1="$HOME/Pictures/center-screen.png" \
XSECURELOCK_IMAGE_PATH_2="$HOME/Pictures/right-screen.png" \
XSECURELOCK_IMAGE_PATH_3="$HOME/Pictures/top-screen.png" \
XSECURELOCK_SAVER=saver_feh \
xsecurelock
At this point it would be cleaner to use a bash array instead of the spaghetti code above but I'll leave figuring that out as an exercise.
Fixes #143.
Example Usage
saver_feh
Invocation