blob: 9ec80e14669d690784fe689044c0baa0c838045e [file] [log] [blame]
#!/bin/bash
#
# "nohup THIS-SCRIPT-WITH-FULL-PATH 0<&- &>/dev/null &"
#
WE_STARTED_IT=0;
while true; do
sleep 1;
IDLE_SINCE=$(xprintidle);
if [ $WE_STARTED_IT -eq 0 ] && [ $IDLE_SINCE -gt 300000 ]; then
dropbox start;
WE_STARTED_IT=1;
fi
if [ $WE_STARTED_IT -eq 1 ] && [ $IDLE_SINCE -lt 300000 ]
then
dropbox stop;
WE_STARTED_IT=0;
fi
done