Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to disable notifications when screen saver is up #203

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions kdesk/icon-hooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,13 @@ case $icon_name in


"ScreenSaverStart")

# By default we let the screen saver kick in
if [ "$debug" == "true" ]; then
echo "Received hook for Screen Saver Start"
fi
rc=0

# disable Notifications Widget alerts momentarily until the screen saver stops
if [ -p "$pipe_filename" ]; then
echo "pause" >> $pipe_filename
fi

#
# Search for any programs that should not play along with the screen saver
# process names are pattern matched, so kano-updater will also find kano-updater-gui.
Expand All @@ -109,15 +105,21 @@ case $icon_name in

if [ "$rc" == "0" ]; then

# Screen saver can proceed, disable notifications while it is running
if [ -p "$pipe_filename" ]; then
echo "pause" >> $pipe_filename
fi

if [ "$debug" == "true" ]; then
echo "starting kano-sync and checking for updates"
fi
kano-sync --skip-kdesk --sync --backup --upload-tracking-data -s &
sudo /usr/bin/kano-updater download --low-prio &
sudo /usr/bin/kano-updater download --low-prio --no-notifications &
fi
;;

"ScreenSaverFinish")

if [ "$debug" == "true" ]; then
echo "Received hook for Screen Saver Finish"
fi
Expand Down