summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--apps/Opie-SH/stowctrl.desktop6
-rw-r--r--noncore/tools/opie-sh/scripts/Makefile1
-rw-r--r--noncore/tools/opie-sh/scripts/opie-sh-stowawayctrl.control10
-rwxr-xr-xnoncore/tools/opie-sh/scripts/stowctrl.sh84
-rw-r--r--noncore/tools/opie-sh/scripts/task-opie-sh-apps.control2
-rw-r--r--pics/opie-sh-scripts/stowctrl.pngbin0 -> 149 bytes
6 files changed, 102 insertions, 1 deletions
diff --git a/apps/Opie-SH/stowctrl.desktop b/apps/Opie-SH/stowctrl.desktop
new file mode 100644
index 0000000..9b1334c
--- a/dev/null
+++ b/apps/Opie-SH/stowctrl.desktop
@@ -0,0 +1,6 @@
1[Desktop Entry]
2Comment=Start/Stop stowaway keyboard
3Exec=stowctrl.sh
4Icon=stowctrl/stowctrl
5Type=Application
6Name=Stowaway Control
diff --git a/noncore/tools/opie-sh/scripts/Makefile b/noncore/tools/opie-sh/scripts/Makefile
index 86efe5e..f71aa7d 100644
--- a/noncore/tools/opie-sh/scripts/Makefile
+++ b/noncore/tools/opie-sh/scripts/Makefile
@@ -12,2 +12,3 @@ clean:
12 rm ../../../../bin/service_manager.sh 12 rm ../../../../bin/service_manager.sh
13 rm ../../../../bin/usbnetctrl.sh 13 rm ../../../../bin/usbnetctrl.sh
14 rm ../../../../bin/stowctrl.sh
diff --git a/noncore/tools/opie-sh/scripts/opie-sh-stowawayctrl.control b/noncore/tools/opie-sh/scripts/opie-sh-stowawayctrl.control
new file mode 100644
index 0000000..e2ed2d6
--- a/dev/null
+++ b/noncore/tools/opie-sh/scripts/opie-sh-stowawayctrl.control
@@ -0,0 +1,10 @@
1Files: bin/stowctrl.sh apps/Opie-SH/stowctrl.desktop pics/opie-sh-scripts/stowctrl.png
2Installed-Size: 0
3Version: $QPE_VERSION-$SUB_VERSION
4Depends: opie-base ($QPE_VERSION), opie-sh
5Priority: optional
6Section: opie/settings
7Maintainer: spiralman <spiralman@softhome.net
8Architecture: arm
9License: GPL
10Description: frontend to start/stop Stowaway keyboard
diff --git a/noncore/tools/opie-sh/scripts/stowctrl.sh b/noncore/tools/opie-sh/scripts/stowctrl.sh
new file mode 100755
index 0000000..475c3a3
--- a/dev/null
+++ b/noncore/tools/opie-sh/scripts/stowctrl.sh
@@ -0,0 +1,84 @@
1#!/bin/sh
2
3#stowctrl.sh - modified usbnetctrl.sh from gonz by spiralman spiralman@softhome.net
4# usbnetctrl.sh - a demonstration of opie-sh
5#
6# Copyright (C) 2002 gonz@directbox.com
7#
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2, or (at your option)
11# any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# 20020524-1 - code beautification, added icons and reset
19# 20020517-2 - bugfixed fullscreen, added info about ifconfig
20# 20020517-1 - added about, fullscreen and icon
21
22OPIE_SH=/opt/QtPalmtop/bin/opie-sh
23
24######################################################################
25# subroutines
26
27about() {
28 ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/stowctrl.png>"
29 echo "<h3>About</h3>"
30 echo "This little App should make it easy for you to "
31 echo "activate / deactivate the stowaway keyboard (on ipaq)"
32 echo "<p>"
33 ) | $OPIE_SH -t "stowaway control" -f &
34 SCREENCLEAN=$!
35 sleep 1
36}
37
38startup() {
39 echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/stowctrl.png>" > /tmp/sout
40 echo "<h3>stowaway up</h3>" >> /tmp/sout
41 modprobe h3600_stowaway >> /tmp/sout
42 cat /dev/stowaway &
43 echo $! > /tmp/stowcatpid
44 $OPIE_SH -t Output -f /tmp/sout
45 rm /tmp/sout
46}
47
48stopit() {
49 ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/stowctrl.png>"
50 echo "<h3>stowaway down</h3>"
51 read THECAT < /tmp/stowcatpid
52 kill $THECAT
53 rmmod h3600_stowaway
54 ) 2>&1 | $OPIE_SH -t Output -f
55}
56
57
58cleanup() {
59 kill $SCREENCLEAN
60 rm -f /tmp/qcop-msg-stowctrl.sh
61}
62
63
64yesorno() {
65 $OPIE_SH -m -t "Stowaway Up/Down" -M "What to do with the Stowaway: " \
66 -g -0 Up -1 Down -2 Restart
67 RETURNCODE=$?
68
69 case $RETURNCODE in
70 -1) echo error...
71 cleanup
72 exit ;;
73 0) startup ;;
74 1) stopit ;;
75 2) stopit ; sleep 1 ; startup ;;
76 esac
77}
78
79######################################################################
80# main
81
82about
83yesorno
84cleanup
diff --git a/noncore/tools/opie-sh/scripts/task-opie-sh-apps.control b/noncore/tools/opie-sh/scripts/task-opie-sh-apps.control
index 4af7c10..2848f9a 100644
--- a/noncore/tools/opie-sh/scripts/task-opie-sh-apps.control
+++ b/noncore/tools/opie-sh/scripts/task-opie-sh-apps.control
@@ -2,5 +2,5 @@ Files:
2Installed-Size: 0 2Installed-Size: 0
3Version: $QPE_VERSION-$SUB_VERSION 3Version: $QPE_VERSION-$SUB_VERSION
4Depends: opie-base (1.5.0+), opie-sh, opie-sh-fsmounter, opie-sh-killproc, opie-sh-rsynchelper, opie-sh-servicemanager, opie-sh-usbnetctrl, opie-sh-hostlist, opie-sh-wavelanchooser, opie-sh-diskfree, opie-sh-launcher-refresh, opie-sh-logviewer 4Depends: opie-base (1.5.0+), opie-sh, opie-sh-fsmounter, opie-sh-killproc, opie-sh-rsynchelper, opie-sh-servicemanager, opie-sh-usbnetctrl, opie-sh-hostlist, opie-sh-wavelanchooser, opie-sh-diskfree, opie-sh-launcher-refresh, opie-sh-logviewer, opie-sh-stowawayctrl
5Priority: optional 5Priority: optional
6Section: opie/settings 6Section: opie/settings
diff --git a/pics/opie-sh-scripts/stowctrl.png b/pics/opie-sh-scripts/stowctrl.png
new file mode 100644
index 0000000..6200ce1
--- a/dev/null
+++ b/pics/opie-sh-scripts/stowctrl.png
Binary files differ