X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=ziva-screen;h=9a9aa6a5b7b77a1143d00a42cd8cd8c3a8f39bc3;hb=989554cab0d0c59d1aab20496ba9550acd17e6e6;hp=4f62c033c4fee287f9b942b453d374faa58fee28;hpb=50f25d1eec109c4596cfc638c9a7c98da0f0b5d0;p=distro-setup diff --git a/ziva-screen b/ziva-screen index 4f62c03..9a9aa6a 100755 --- a/ziva-screen +++ b/ziva-screen @@ -21,7 +21,7 @@ # limitations under the License. -# Get screenshots from bow, discard them if they dont change much. +# Get screenshots from bo, discard them if they dont change much. [[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" @@ -36,7 +36,7 @@ esac f=/run/user/1000/ziva-tmp.jpg -install -g 1000 -o 1000 -m 700 $dest_dir +install -d -g 1000 -o 1000 -m 700 $dest_dir cd $dest_dir shopt -s nullglob jpgs=( 20*jpg ) @@ -45,9 +45,9 @@ if (( ${#jpgs[@]} >= 1 )); then lastf=$(ls -1 20*jpg | tail -n1) fi -ssh bow DISPLAY=:0 scrot -z $f 2>/dev/null || exit 0 -rsync --inplace bow:$f $dest_dir 2>/dev/null || exit 0 -ssh bow rm -f $f +ssh bo DISPLAY=:0 scrot -z $f 2>/dev/null || exit 0 +rsync --inplace bo:$f $dest_dir 2>/dev/null || exit 0 +ssh bo rm -f $f same=false if [[ $lastf ]]; then