I can not believe then hassle i'm having trying to get a simple screensaver to work. Something that would take seconds in a windows 7 environment... Any how.. I have a chromium full screen kiosk running some basic home automation.. The 12" touchscreen stays lit and live at all times. The wife asked if we could have a screensaver of family pictures on it when not in use.. Hey no problems I said
Ive installed xscreensaver but no option for pictures there...
Ive install FEH and while this works with a simple bash script, I cannot or it will not map the left hand mouse click to a quit command. (/usr/feh/buttons) The thinking is now is to use xinput to monitor the mouse click and then issue a kill command on feh. this may be quite resource hungry.. is there a quicker way by chance?
i'm a relative newbie, can some one go over my coding for me as i'm at a dead end with it.
Code: Select all
#!/bin/bash # screensaverfull.sh # url: ### # This script is licensed under GNU GPL version 2.0 or above # Uses elements from lightsOn.sh # Copyright (c) 2011 iye.cba at gmail com # url: https://github.com/iye/lightsOn # This script is licensed under GNU GPL version 2.0 or above # Description: #### # screensaverfull.sh needs xprintidle and feh to work. # HOW TO USE: Start the script with the number of seconds you want the checks # for fullscreen to be done. Example: # "./screensaver.sh 120" DIR=$( cd "$( dirname "$0" )" && pwd) delay=$1 # If argument empty, use 60 seconds as default. if [ -z "$1" ];then delay=60 fi # If argument is not integer quit. if [[ $1 = *[^0-9]* ]]; then echo "The Argument \"$1\" is not valid, not an integer" exit 1 fi IDLE_TIME=$(($delay*1000)) cd $DIR while sleep $((1)); do idle=$(xprintidle) if [ $idle -ge $IDLE_TIME ]; then feh -x -F -r -Y -Z -z -A -1 slideshow -D 7 $DIR FEHPID=$! fi state="$(xinput --query-state 6)" # if mouse 1 is pressed if [[ "$state" == *"button=down"* ]]; then echo "left mouse" FEHPID=$! kill -s 9 $FEHPID fi done exit 0