summaryrefslogtreecommitdiff
path: root/app/xlockmore/etc/xlock.sh
diff options
context:
space:
mode:
Diffstat (limited to 'app/xlockmore/etc/xlock.sh')
-rw-r--r--app/xlockmore/etc/xlock.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/xlockmore/etc/xlock.sh b/app/xlockmore/etc/xlock.sh
new file mode 100644
index 000000000..422b25212
--- /dev/null
+++ b/app/xlockmore/etc/xlock.sh
@@ -0,0 +1,10 @@
+#!/bin/sh -
+# Wrapper script to get better performance
+# by Tim Auckland <tda10.geo@yahoo.com>
+# It simply suspends all netscape and JAVA applications and resumes them
+# once xlock exits. These applications poll when idle and that is quite
+# inconsiderate when you need all the cycles you can get for a good
+# screensaver.
+jobs=`ps -u $USER| awk '/jre/||/netscape/{print $1}'`
+[ -n "$jobs" ] && trap 'kill -CONT $jobs' 0 1 2 14 15 && kill -STOP $jobs
+/usr/local/bin/xlock "$@"