SF.net SVN: morphix: [2293] trunk/scripts-main/matchbox

[email protected]
Newsgroups gmane.linux.morphix.cvs
Message-ID <[email protected]>
Revision: 2293
Author:   bmsleight
Date:     2006-06-07 10:21:58 -0700 (Wed, 07 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/morphix/?rev=2293&view=rev

Log Message:
-----------
Added inactivity script from Livecd.net, user-configurable using ~/.inactivity

Modified Paths:
--------------
    trunk/scripts-main/matchbox/Makefile
    trunk/scripts-main/matchbox/debian/changelog
    trunk/scripts-main/matchbox/matchbox-session

Added Paths:
-----------
    trunk/scripts-main/matchbox/inactivity
    trunk/scripts-main/matchbox/launch_inactivity.sh
Modified: trunk/scripts-main/matchbox/Makefile
===================================================================
--- trunk/scripts-main/matchbox/Makefile	2006-06-07 11:54:17 UTC (rev 2292)
+++ trunk/scripts-main/matchbox/Makefile	2006-06-07 17:21:58 UTC (rev 2293)
@@ -8,19 +8,22 @@
 	mkdir -p $(DESTDIR)/etc
 	mkdir -p $(DESTDIR)/etc/skel
 	mkdir -p $(DESTDIR)/etc/skel/.matchbox
-	cp -a ./include.sh ./main_module ./launch_persistent-app.sh ./noblanking.sh ./matchbox-session $(DESTDIR)/morphix/
+	cp -a ./include.sh ./main_module ./launch_persistent-app.sh ./launch_inactivity.sh ./noblanking.sh ./matchbox-session $(DESTDIR)/morphix/
 	chmod a+x $(DESTDIR)/morphix/matchbox-session
 	chmod a+x $(DESTDIR)/morphix/launch_persistent-app.sh
+	chmod a+x $(DESTDIR)/morphix/launch_inactivity.sh
 	chmod a+x $(DESTDIR)/morphix/noblanking.sh
 	ln -s /morphix/noblanking.sh  $(DESTDIR)/morphix/rc.m/S07X11-noblanking
 	cp -a ./persistent-app $(DESTDIR)/etc/skel/.persistent-app
+	cp -a ./inactivity $(DESTDIR)/etc/skel/.inactivity
 	cp -a ./xscreensaver $(DESTDIR)/etc/skel/.xscreensaver
 	cp -a ./kbdconfig ./mbdock.session $(DESTDIR)/etc/skel/.matchbox/
 
 remove:
 	rm $(DESTDIR)/morphix/include.sh
-	rm $(DESTDIR)/morphix//main_module 
+	rm $(DESTDIR)/morphix/main_module 
 	rm $(DESTDIR)/morphix/launch_persistent-app.sh
+	rm $(DESTDIR)/morphix/launch_inactivity.sh
 	rm $(DESTDIR)/morphix/matchbox-session
 	rm $(DESTDIR)/morphix/noblanking.sh
 	rm $(DESTDIR)/morphix/rc.m/S07X11-noblanking

Modified: trunk/scripts-main/matchbox/debian/changelog
===================================================================
--- trunk/scripts-main/matchbox/debian/changelog	2006-06-07 11:54:17 UTC (rev 2292)
+++ trunk/scripts-main/matchbox/debian/changelog	2006-06-07 17:21:58 UTC (rev 2293)
@@ -1,3 +1,9 @@
+morphix-init-matchbox (0.1-8) unstable; urgency=low
+
+  * Added inactivity script from Livecd.net, user-configurable using ~/.inactivity
+
+ -- Brendan M. Sleight <[email protected]>  Wed, 07 Jun 2006 18:15:00 +0100
+
 morphix-init-matchbox (0.1-7) unstable; urgency=low
 
   * Makefile changed, need another bump, maybe (late) BDay bumps for Alex's ?

Added: trunk/scripts-main/matchbox/inactivity
===================================================================
--- trunk/scripts-main/matchbox/inactivity	                        (rev 0)
+++ trunk/scripts-main/matchbox/inactivity	2006-06-07 17:21:58 UTC (rev 2293)
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# The script will be run after xscreensaver has been runing for 10 minutes. 
+#
+# See MorphixMini-PersistentApp.xml
+# file is ~/.inactivity
+#

Added: trunk/scripts-main/matchbox/launch_inactivity.sh
===================================================================
--- trunk/scripts-main/matchbox/launch_inactivity.sh	                        (rev 0)
+++ trunk/scripts-main/matchbox/launch_inactivity.sh	2006-06-07 17:21:58 UTC (rev 2293)
@@ -0,0 +1,22 @@
+#! /bin/bash
+# inactivity.sh -- Orginally by David Collie for livecd.net (LiveKiosk)
+# checks for screen blanking, when this occurs wait ten minutes before 
+# Running ~/.inactivity
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11
+
+xscreensaver-command -watch | 
+{
+  while read line; do
+    # if the screen has been blank sleep for 60 seconds
+    # then check again, if it's still blank reset the kiosk
+    if [ -n "$(echo $line | egrep '^BLANK.*')" ] ; then
+      sleep 600      
+    	if [ -z "$(xscreensaver-command -time | grep 'non-blanked')" ]; then
+        sh ~/.inactivity
+      fi
+    fi
+  done
+}
+
+
+

Modified: trunk/scripts-main/matchbox/matchbox-session
===================================================================
--- trunk/scripts-main/matchbox/matchbox-session	2006-06-07 11:54:17 UTC (rev 2292)
+++ trunk/scripts-main/matchbox/matchbox-session	2006-06-07 17:21:58 UTC (rev 2293)
@@ -3,4 +3,5 @@
 /usr/bin/xsetbg -fullscreen /morphix/background.png &
 /morphix/launch_persistent-app.sh &
 /usr/bin/xscreensaver -nosplash &
+/morphix/launch_inactivity.sh &
 /usr/bin/matchbox-window-manager


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.