Skip to content

Commit

Permalink
Screensaver: Pause tracking during the screensaver
Browse files Browse the repository at this point in the history
Prevent tracked session times from overlapping with the screensaver
tracking session by pausing those sessions while the screensaver is
running.
  • Loading branch information
tombettany committed Aug 29, 2017
1 parent e82eda8 commit 03488a4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions kdesk/icon-hooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

# icon-hooks.sh
#
# Copyright (C) 2014-2016 Kano Computing Ltd.
# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
# Copyright (C) 2014-2017 Kano Computing Ltd.
# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2
#
# KDesk Icon Hooks script - Dynamically update the desktops icons attributes.
#
Expand Down Expand Up @@ -110,8 +110,9 @@ case $icon_name in
if [ "$rc" == "0" ]; then

if [ "$debug" == "true" ]; then
echo "starting kano-sync and checking for updates"
echo "Pausing tracking, starting kano-sync and checking for updates"
fi
kano-tracker-ctl pause-sessions
kano-sync --skip-kdesk --sync --backup --upload-tracking-data -s &
sudo /usr/bin/kano-updater download --low-prio &
fi
Expand All @@ -127,6 +128,7 @@ case $icon_name in
echo "resume" >> $pipe_filename
fi

kano-tracker-ctl resume-sessions
# kanotracker collects how many times and for long the screen saver runs
length=$2
now=$(date +%s)
Expand Down

0 comments on commit 03488a4

Please sign in to comment.