Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 31 Oct 2014, 19:06
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
pStopWatch 0.6
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [40 Posts]   Goto page: 1, 2, 3 Next
Author Message
zigbert


Joined: 29 Mar 2006
Posts: 5760
Location: Valåmoen, Norway

PostPosted: Tue 18 Mar 2008, 19:20    Post subject:  pStopWatch 0.6  

pStopWatch ... Xdialog clock

This is a
- Stopwatch / Timer
- (Alarm) Clock


Ptimer is a gui for pStopWatch

Sigmund Berglund

Code:
# pstopwatch -h                           
Usage: pstopwatch [OPTION]

Options
   -a [command /path/file]
                        alternative sound: alarm
   -A HH:MM      alarm at HOUR:MINUTE. requires -C     
   -b [command /path/file]
                        alternative sound: beep low     
   -B [command /path/file]
                        alternative sound: beep high     
   -c                  no countdown - no sync with system time. Use with -s
   -C                  start with ordinary clock. Forces -xy
   -f [font:size]   set font-type and fontsize       
   -h                  show this help message
   -l [start:stop:header]
                        Language support. Local variables for Start:Stop:Window-title                             
   -s                  count with seconds, not tenth as default
   -t MM:SS         stopwatch alarm after MINUTES:SECONDS
   -v                  show pStopWatch version
   -w X:Y            window size HORIZONTAL:VERTICAL
   -x                  auto start
   -y                  no stop-button. Must be killed external.






Download
username: puppy
password: linux

pStopWatch-0.6 (7 kb).


Examples:
Big timer with barking
Code:
pstopwatch -cyxst 00:03 -a "aplay /usr/share/audio/bark.au" -f bold:80 -w 470:120

Wake me at 7
Code:
pstopwatch -CA 07:00 -l ::"Wake me at 7"


Changelog
Version 0.6 - 6.Apr 2008
- Less flicker on clock.
- Less flicker on stopwatch when tenth is not used.
- Integration with Ptimer.
- Removed menu entry in *.pet
- Bugfix: Kill external program which plays alarm.
- Bugfix: Window height in Puppy4
- Bugfix: Better parameter control

_________________
Stardust resources

Last edited by zigbert on Thu 04 Nov 2010, 13:36; edited 12 times in total
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5760
Location: Valåmoen, Norway

PostPosted: Wed 19 Mar 2008, 05:44    Post subject:  

Things get clearer after some hours with sleep.

Version 0.2 is not SO buggy, and has got start/stop button.

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Wed 19 Mar 2008, 06:20    Post subject:  

Hi Sigmund

I am using pupEEE (3.01 based) and the program comes up
but there is no display (numbering)

Confused Have I frozen time or entered the twighlight zone?
am assuming a missing graphic lib?

pStopWatch would be great for athletes/trainers using the Eeepc
Time your lap/effort and graph up in gnumeric . . .
Soon you will be an Olympiad athlete . . . Puppy trained!

Smile

_________________
Puppy WIKI

Last edited by Lobster on Wed 02 Apr 2008, 06:16; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
HairyWill


Joined: 26 May 2006
Posts: 2949
Location: Southampton, UK

PostPosted: Wed 19 Mar 2008, 06:47    Post subject:  

aha
a project you could not do in gtkdialog
I challenge you to port it

Sorry, Sigmund the fonts do not work for me on muppy 8.

_________________
Will
contribute: community website, screenshots, puplets, wiki, rss
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5760
Location: Valåmoen, Norway

PostPosted: Wed 19 Mar 2008, 06:51    Post subject:  

Could it be so simple that pupEEE has black text in Xdialog. (My Puppy 3.01 has dark grey.) Try to change line 21 in /usr/local/pstopwatch/pstopwatch.
from
Code:
base[NORMAL]   = "#000000" }
to
Code:
 base[NORMAL]   = "#FFFFFF" }


This will give white background.

Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
HairyWill


Joined: 26 May 2006
Posts: 2949
Location: Southampton, UK

PostPosted: Wed 19 Mar 2008, 07:09    Post subject:  

Sorry, I should have been more clear. Both the text in the window and on the button is in the system default font at only 10 or 12 points high. I tried poking at the section that exports the temporary gtk settings, I could change other things but nothing I seemed to do to the font made any difference.

Wait. If you are developing this in dingo then it has no gtk1, the problem may only exist if gtk1 is installed.

_________________
Will
contribute: community website, screenshots, puplets, wiki, rss
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Wed 19 Mar 2008, 07:50    Post subject:  

zigbert wrote:

from
Code:
base[NORMAL]   = "#000000" }
to
Code:
 base[NORMAL]   = "#FFFFFF" }


This will give white background.

Sigmund


Cool that works but I am getting
multiple lines of output - see image
sw.jpg
 Description   
 Filesize   15.11 KB
 Viewed   1684 Time(s)

sw.jpg


_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
HairyWill


Joined: 26 May 2006
Posts: 2949
Location: Southampton, UK

PostPosted: Wed 19 Mar 2008, 08:03    Post subject:  

well that disproves my gtk1 theory
_________________
Will
contribute: community website, screenshots, puplets, wiki, rss
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5760
Location: Valåmoen, Norway

PostPosted: Wed 19 Mar 2008, 10:04    Post subject:  

HairyWill wrote:
aha
a project you could not do in gtkdialog
I challenge you to port it
If you beat me with this, I would be nothing else that VERY pleased.
I guess you have an idea how much I have tried. Smile

Lobster wrote:

that works but I am getting
multiple lines of output
I seems that Xdialog doesn't use the size parameters in your pupEEE system. Have you tried it on another puppy?

What background color should we use, since black maybe isn't the best choice.

Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5760
Location: Valåmoen, Norway

PostPosted: Wed 19 Mar 2008, 11:53    Post subject:  

Version 0.3

The stop watch didn't start correct. Now there are a 3 sec countdown to sync with system clock.

Tested in Puppy4

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Wed 19 Mar 2008, 12:17    Post subject:  

Quote:
Have you tried it on another puppy?


not yet - it's barking at me (v 0.3) Confused

Quote:
What background color should we use, since black maybe isn't the best choice.


the text needs to be smaller or the display window bigger to get it all in. If you are working towards Dingo - then I suggest orange for now
black, white and grey are the neutral colours . . .
. . .or a variable to be configured . . .

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
HairyWill


Joined: 26 May 2006
Posts: 2949
Location: Southampton, UK

PostPosted: Wed 19 Mar 2008, 12:51    Post subject:  

just tested both 0.2 and 0.3 in dingo7
for both of them the main window appears black with no visible text, the button font is the correct size

tested both on mini-muppy 8
background is black font is just legible but the fonts come out at the system default size

without the -s parameter it is thrashing my cpu

running with fractions o

_________________
Will
contribute: community website, screenshots, puplets, wiki, rss
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5760
Location: Valåmoen, Norway

PostPosted: Wed 19 Mar 2008, 13:00    Post subject:  

Quote:
just tested both 0.2 and 0.3 in dingo7
for both of them the main window appears black with no visible text, the button font is the correct size


I tested 0.3 on 3 different machines one alpha6, one alpha7, and one 3.01. All shows a nice stop watch. What goes wrong here? Confused

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5760
Location: Valåmoen, Norway

PostPosted: Fri 21 Mar 2008, 08:44    Post subject:  

Version 0.4

- Stopping clock during countdown crashed program
- Beeps for Barks.

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Fri 21 Mar 2008, 19:13    Post subject: a suggestion or two  

Dear zigbert,

Thanks. I like the app but also ran into problems with fonts etc. (tiny, standard). One way out of the problem is to do the following after line 18 of the main script:
Code:

mygtk="cat /root/.gtkrc-2.0 | grep include"

and
Code:

echo '$mygtk

as the first line of the sequence that creates gtkrc_mono.

Then, only export the following:
Code:

export GTK2_RC_FILES=/tmp/gtkrc_mono

This will ensure that the user's style is preserved with only the font size and colour changing.

In my case, the relevant line in /root/.gtkrc-2.0 is:
Code:

include "/usr/share/themes/MacOS-X/gtk-2.0/gtkrc"

Also, I have attached two tiny wav files with nice pop sounds. I included one of them in the "Stop" part:
Code:

"$APPDIR"/pstopwatch_counter &
Xdialog --title "Stop Watch" --smooth --screen-center --no-ok --cancel-label "Stop" --logbox /tmp/pstopwatch-clock 383x137
play ./pop-high.wav > /dev/null 2>&1
echo stop > /tmp/pstopwatch-status
tail /tmp/pstopwatch-clock | grep -v "^$" > /tmp/pstopwatch-clock
"$APPDIR"/pstopwatch


Again, thanks and kind regards,
vovchik
pop-waves.tar.gz
Description 
gz

 Download 
Filename  pop-waves.tar.gz 
Filesize  4.27 KB 
Downloaded  897 Time(s) 
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 3 [40 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0924s ][ Queries: 12 (0.0045s) ][ GZIP on ]