-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- works in cli and gui modes - rename pm13trayicon to pm13 and add more functions - eventmanager configures the service (RAMSAVEINTERVAL) - in cli mode it only a shows a very helpful msg will probably add ncurses dialog - remove relevant code from pup_event_frontend_d
- Loading branch information
Showing
8 changed files
with
108 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
# daemon for PUPMODE 13 | ||
|
||
. /etc/rc.d/PUPSTATE | ||
if [ "$PUPMODE" != "13" ] ; then | ||
exit | ||
fi | ||
|
||
case $1 in | ||
start) | ||
if ! pidof pm13 ; then | ||
pm13 service & | ||
fi | ||
;; | ||
restart) | ||
killall pm13 2>/dev/null | ||
pm13 service & | ||
;; | ||
stop) | ||
killall pm13 2>/dev/null | ||
;; | ||
esac | ||
|
||
### END ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/bin/ash | ||
|
||
exec pm13trayicon "$@" | ||
exec pm13 trayicon "$@" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
woof-code/rootfs-skeleton/usr/local/pup_event/pup_event_frontend_d.c
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/bin/ash | ||
|
||
. /etc/eventmanager #only need $RAMSAVEINTERVAL | ||
. /etc/rc.d/PUPSTATE #PUPMODE | ||
|
||
if [ "$PUPMODE" != "13" ] ; then | ||
exit | ||
fi | ||
|
||
case $1 in | ||
|
||
service) | ||
MINUTE=0 | ||
SAVECNT=0 | ||
while [ 1 ] | ||
do | ||
sleep 60 | ||
MINUTE=$((MINUTE+1)) | ||
. /etc/eventmanager | ||
if [ "$RAMSAVEINTERVAL" = "" -o $RAMSAVEINTERVAL = "0" ] ; then | ||
continue | ||
fi | ||
SAVECNT=$(( $SAVECNT + 1 )) | ||
if [ $RAMSAVEINTERVAL -ne 0 -a $SAVECNT -ge $RAMSAVEINTERVAL ];then | ||
if save2flash pup_event ; then #periodic save of tmpfs top layer... | ||
SAVECNT=0 | ||
fi | ||
fi | ||
done | ||
exit | ||
;; | ||
|
||
cli) | ||
echo | ||
echo -n "* Running in" | ||
echo -en "\\033[1;36m PUPMODE 13 \\033[0;39m " | ||
echo "(saving changes to RAM)" | ||
if [ "$RAMSAVEINTERVAL" != "" -a $RAMSAVEINTERVAL != "0" ] ; then | ||
echo -n "-- Saving session every" | ||
echo -en "\\033[1;35m $RAMSAVEINTERVAL minutes \\033[0;39m" | ||
echo "(automatically)" | ||
fi | ||
echo -n "* Type " | ||
echo -en "\\033[1;31msave2flash\\033[0;39m " | ||
echo "whenever you want to save session to pupsave" | ||
echo "# /etc/eventmanager has RAMSAVEINTERVAL which you can adjust to your liking" | ||
echo | ||
;; | ||
|
||
trayicon) | ||
[ "$DISPLAY" ] || exit | ||
|
||
if [ "$PM13_TRAYICON" = "false" ] ; then | ||
exit | ||
fi | ||
|
||
if [ ! -e /tmp/pm13tray ] ; then | ||
yad=$(which yad 2>/dev/null) | ||
ln -s $yad /tmp/pm13tray | ||
fi | ||
|
||
yad=/tmp/pm13tray | ||
|
||
if ! pidof ${yad##*/} >/dev/null 2>&1; then | ||
$yad --notification \ | ||
--command="eventmanager pm13" \ | ||
--image=/usr/share/pixmaps/puppy/floppy.svg & | ||
fi | ||
;; | ||
|
||
esac | ||
|
This file was deleted.
Oops, something went wrong.