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 Wed 23 Jul 2014, 10:18
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 2 of 3 [40 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
zigbert


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

PostPosted: Sat 22 Mar 2008, 04:09    Post subject:  

vovchik

Will you please post your hacked code. Since I can't reproduce the trouble, it is hard to test if my coding works.

Nice pops!

Sigmund

_________________
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: Sat 22 Mar 2008, 08:15    Post subject: Hacked script  

Dear Sigmund,

Here is the hacked code. I've restructured the first script so as to be able to understand more clearly the underlying logic. While most of the changes are not salient, you can see my old-school Pascal mania resurfacing.Smile. I introduced, among a few vars, mygeometry - which facilitates tweaking - and sound_high and sound_low, softcoded pointers to sound files to permit easy customization, in addition to the gtkrc hack. The only change introduced in the second script, as I recall, is the softcoding of the sound file vars. Please have a look. I'm interested whether the modded code runs fine on your machine.

With kind regards,
vovchik
pstopwatch-1.tar.gz
Description 
gz

 Download 
Filename  pstopwatch-1.tar.gz 
Filesize  1.65 KB 
Downloaded  370 Time(s) 
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Sat 22 Mar 2008, 11:34    Post subject: Rev with parameter checking  

Dear Sigmund,

Here is a slight revision that includes a very primitive parameter check. I noted that my earlier version ignored the "-s" parameter. The benefit of this mod, apart from properly passing the command line parameter, is that it provides a very rudimentary help - both on the command line and using Xdialog.

With kind regards,
vovchik
pstopwatch-2.tar.gz
Description 
gz

 Download 
Filename  pstopwatch-2.tar.gz 
Filesize  1.32 KB 
Downloaded  355 Time(s) 
Back to top
View user's profile Send private message 
zigbert


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

PostPosted: Sat 22 Mar 2008, 17:13    Post subject:  

Thank you, vovchik.
_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
trapster


Joined: 28 Nov 2005
Posts: 1999
Location: Maine, USA

PostPosted: Sun 23 Mar 2008, 07:23    Post subject:  

Working great now with vovchick's script.
I was getting the repeating list of time like Lobster was.

I had to comment out line 38 in pstopwatch_counter due to "true" showing up in the tenths spot.

I also added a colon (":") before $TENTH in line 40:
echo -e "$MIN:$NULL$SECONDS:$TENTH" >> /tmp/pstopwatch-clock


_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Puppeee4.31 + 1.0, Puppy4.10 + Lupu52
Currently using Slacko AND lupu52 w/ fluxbox
Back to top
View user's profile Send private message Visit poster's website 
zigbert


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

PostPosted: Sun 23 Mar 2008, 13:03    Post subject:  

Version 0.5

Thanks for all input
Please report both success and failures

Sigmund

_________________
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: Sun 23 Mar 2008, 17:54    Post subject: A few suggestions  

Dear Sigmund,

I looked at 0.5 and have the following comments:

1. Your last rev does not preserve the user's GTK style - my last rev does that (see screenshot). You need to include $HOME/.gtkrc-2.0 include, otherwise the app will look foreign on any system where the GTK theme is not identical to yours.

2. My last rev also included a change of geometry when tenths are disposed of. The window should shrink accordingly (i,e, automatically). Also, you should echo - in the case of the -s parameter - only the minutes and seconds to the logfile. This can be done by introducing a check of the value of the $TENTH variable in an "if" construction so as not to disrupt the smaller window x dimension by string overflow.

3. Apart from that, it works fine, but I am still testing and trying out a few tweaks.

With kind regards,
vovchik
pstop2.jpg
 Description   
 Filesize   12.55 KB
 Viewed   875 Time(s)

pstop2.jpg

pstop1.jpg
 Description   
 Filesize   14.76 KB
 Viewed   882 Time(s)

pstop1.jpg

Back to top
View user's profile Send private message 
zigbert


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

PostPosted: Sun 23 Mar 2008, 18:26    Post subject:  

I don't know how you get your choosen gtk-theme to appear. Here is a picture of Ptimer with my default stardust gtk-theme. Then it shows your Pstopwatch which shows the standard gtk-theme. My Pstopwatch above with a stripped gtk-theme.




Confused Confused Confused Confused Confused
Sigmund

_________________
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: Sun 23 Mar 2008, 19:01    Post subject: GTK theme  

Dear Sigmund,

Here is my .gtkrc-2.0 file:
Code:
# -- THEME AUTO-WRITTEN DO NOT EDIT
include "/usr/share/themes/MacOS-X/gtk-2.0/gtkrc"

style "user-font" {
   font_name = "DejaVu Sans 12"
}

widget_class "*" style "user-font"

gtk-font-name="DejaVu Sans 12"

include "/root/.gtkrc.mine"

# -- THEME AUTO-WRITTEN DO NOT EDIT


The first include in $HOME/.gtkrc-2.0 gives the location of the theme in use for a particular user, and that should be the case for all standard gtk2 installations. The second include points to .gtkrc.mine, which is usually empty (in my case, at least). The gtk theme setup in puppy 3.01 is non-standard in some way, unfortunately, and really tries to force stardust on the user (using the settings in /etc), which is not a particularly good approach (it was different in the 2.x series). I struggled for a bit until I found out what was going on and found a means by which I could circumvent this 3.x automatism. I imagine others, such as trapster, have done the same.

With kind regards,
vovchik
Back to top
View user's profile Send private message 
zigbert


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

PostPosted: Mon 24 Mar 2008, 03:22    Post subject:  

the problem is that there is no /root/.gtkrc on my system.
_________________
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: Sun 30 Mar 2008, 21:00    Post subject:  

Glad to hear Barry is adding it to Dingo Smile
Would it be possible to add a tally counter?
(laps, repetitions etc)

Code:
#!/bin/bash
# tally counter v 0.1
# Lobster March 2008

NUMBER=0
PRESS_RETURN=1
   
    echo Press enter after each repetition       
    echo ctrl + c to end       

 while PRESS_RETURN=1
 do
 read -e PRESS_RETURN
  if PRESS_RETURN=" " ; then
         NUMBER=$[NUMBER+1]
    echo Your count for this practice is $NUMBER repetitions     
  fi
 done

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


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

PostPosted: Tue 01 Apr 2008, 07:19    Post subject:  

Code:
Would it be possible to add a tally counter?
I thought everything was possible Confused

Added to the todo-list. I'm not sure how it should be solved, but let's see...

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


Joined: 28 Nov 2005
Posts: 1999
Location: Maine, USA

PostPosted: Tue 01 Apr 2008, 17:26    Post subject:  

Here is a command line bash script for laps and split times.
stopwatch2.tar.gz
Description  Command line stopwatch with lap timer
gz

 Download 
Filename  stopwatch2.tar.gz 
Filesize  1.7 KB 
Downloaded  281 Time(s) 

_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Puppeee4.31 + 1.0, Puppy4.10 + Lupu52
Currently using Slacko AND lupu52 w/ fluxbox
Back to top
View user's profile Send private message Visit poster's website 
zigbert


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

PostPosted: Wed 02 Apr 2008, 05:32    Post subject:  

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


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

PostPosted: Sun 06 Apr 2008, 02:57    Post subject:  

Version 0.6 is uploaded. See main post.

This is a bugfix-release.

Changelog
- 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
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 2 of 3 [40 Posts]   Goto page: Previous 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.0739s ][ Queries: 12 (0.0040s) ][ GZIP on ]