| Author |
Message |
DreamsToGo

Joined: 27 Jan 2006 Posts: 117 Location: Castelnaudary, south France, World Capital of Cassoulet
|
Posted: Fri 09 May 2008, 15:24 Post subject:
Change the clock format from 12 hour to 24 hour - Puppy 4 Subject description: Change from 12 hour to 24 hour and back |
|
Hello All,
I have written a script to change the time format of the JWM clock from 12 hour to 24 hour formats and vice versa. It is called "clocktype".
I have also changed the JWMConfig tray applet to be able to call the clock script.
You can download these from the attachments in the post.
I hope these will be useful to you.
Put both these files into /usr/local/jwmconfig2
Barry, could you install these as standard in Puppy? I would really appreciate it - most people in Europe use the 24 hour clock. Thanks
Hilary
| Description |
Change clock display format and integrate to existing tray manager. After download, unpack to /usr/local/jwmconfig2
|

Download |
| Filename |
ChangeClockType.tar.gz |
| Filesize |
1.57 KB |
| Downloaded |
876 Time(s) |
Last edited by DreamsToGo on Sat 10 May 2008, 08:52; edited 2 times in total
|
|
Back to top
|
|
 |
HairyWill

Joined: 26 May 2006 Posts: 2949 Location: Southampton, UK
|
Posted: Fri 09 May 2008, 17:24 Post subject:
|
|
works for me, how about augmenting it to give a few more options.
You could include options that allow the day and/or date as well
_________________ Will
contribute: community website, screenshots, puplets, wiki, rss
|
|
Back to top
|
|
 |
DreamsToGo

Joined: 27 Jan 2006 Posts: 117 Location: Castelnaudary, south France, World Capital of Cassoulet
|
Posted: Sat 10 May 2008, 03:32 Post subject:
|
|
Will, thanks for the suggestions, I'll have a go at putting these options in, although, I have to say that clocktype was my first attempt at a script! and I relied heavily on existing scripts already in Puppy. But that's the way we all learn, isn't it?
Hilary
|
|
Back to top
|
|
 |
HairyWill

Joined: 26 May 2006 Posts: 2949 Location: Southampton, UK
|
Posted: Sat 10 May 2008, 03:42 Post subject:
|
|
Hilary,
Your scripting is a lot neater and easier to follow than mine! I presume you have found all the list of allowable formatters by searching for strftime
_________________ Will
contribute: community website, screenshots, puplets, wiki, rss
|
|
Back to top
|
|
 |
DreamsToGo

Joined: 27 Jan 2006 Posts: 117 Location: Castelnaudary, south France, World Capital of Cassoulet
|
Posted: Sat 10 May 2008, 03:48 Post subject:
|
|
Will, thanks for the compliment.
No, I haven't found all the available options, I was just starting the search; any pointers would be welcome.
Hilary
|
|
Back to top
|
|
 |
DreamsToGo

Joined: 27 Jan 2006 Posts: 117 Location: Castelnaudary, south France, World Capital of Cassoulet
|
Posted: Sat 10 May 2008, 03:58 Post subject:
|
|
Well, I found the available options in strftime(3) as suggested by Will and as found in the JWM configuration page, and there are lots of them!
Before starting to code, what options would be appropriate? I start with,
1) 12 hour or 24 hour clock
2) show date and day, ie Saturday May 10 or just the date with no day.
Any others?
|
|
Back to top
|
|
 |
dptxp
Joined: 12 Sep 2007 Posts: 34
|
Posted: Sat 10 May 2008, 04:19 Post subject:
|
|
Defaults -
24 hours format, preferably with seconds.
Day included with Date - Sat 10th May 2008.
My opinion.
_________________ http://linux.ixcodes.com
|
|
Back to top
|
|
 |
DreamsToGo

Joined: 27 Jan 2006 Posts: 117 Location: Castelnaudary, south France, World Capital of Cassoulet
|
Posted: Sat 10 May 2008, 05:28 Post subject:
|
|
If you float the cursor over the time in the taskbar, you get a yellow popup showing the day, date, time and year.
I'm asking myself why take up taskbar real estate with the day and date when it is already available on demand?
Given this, I am not going to change the clocktype script.
Hilary
|
|
Back to top
|
|
 |
Scoticus

Joined: 01 Jan 2007 Posts: 443 Location: Erskine, Scotland
|
Posted: Fri 15 Aug 2008, 17:50 Post subject:
Change the clock format from 12 hour to 24 hour - Puppy 4 |
|
DreamsToGo
Many thanks for all your good work. I was getting to like banging my head against a brick wall. You have saved a life.
So much frustration over such a minor difference in format.
Could I suggest that a moderator set this as a sticky as no doubt there are many more that I looking for a resolution to this problem. Perhaps they might also give Barry a heads up on it also
Once again thanks vm
|
|
Back to top
|
|
 |
Monson

Joined: 25 May 2008 Posts: 23 Location: Germany
|
Posted: Sun 17 Aug 2008, 01:10 Post subject:
|
|
Hello to all,
yes, me for example. This is one of the questions I've been asking myself and would have asked ASAP, after a few others.
Make it easy to find.
Bye,
Monson.
_________________ DE:Wer nicht wa:hlt, hat nichts zu melden/maulen. EN:Those not voting have nothing to say/moan about.
Puppy 4.21; CD2HDD; AMD64 & X86. Slow: Laptop x86-PI@133MHz-64mb RAM (modded Puppy); Fast:Laptop AMD64X2@2.2GHz-4gb RAM.
|
|
Back to top
|
|
 |
Artie

Joined: 04 Oct 2005 Posts: 423 Location: Norway
|
Posted: Mon 24 Nov 2008, 19:36 Post subject:
|
|
I have installed your script in 4.1.1 but how exactly do I change from 12 to 24 hour format?
Artie
|
|
Back to top
|
|
 |
Monson

Joined: 25 May 2008 Posts: 23 Location: Germany
|
Posted: Thu 27 Nov 2008, 18:07 Post subject:
|
|
Hi there,
well, I didn't need to install any scripts to change the format.
My version of puppy is 4.00 Dingo, installed the CD-Version to HDD.
Goto your root dir, i.e.
/root #
and edit file ".jwmrc-tray" (without the quotes, notice the leading dot)
and change your CLOCK line to the following:
<Clock format="%H:%M:%S">minixcal</Clock>
That's all there was to it for me on two different systems.
Hope it helps you.
Bye, Monson
_________________ DE:Wer nicht wa:hlt, hat nichts zu melden/maulen. EN:Those not voting have nothing to say/moan about.
Puppy 4.21; CD2HDD; AMD64 & X86. Slow: Laptop x86-PI@133MHz-64mb RAM (modded Puppy); Fast:Laptop AMD64X2@2.2GHz-4gb RAM.
|
|
Back to top
|
|
 |
Béèm

Joined: 21 Nov 2006 Posts: 11782 Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
|
Posted: Thu 27 Nov 2008, 18:13 Post subject:
|
|
If you don't want the seconds it can be like: | Code: | | <Clock format="%R">minixcal</Clock> |
_________________ Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
|
|
Back to top
|
|
 |
`f00

Joined: 06 Nov 2008 Posts: 789 Location: the Western Reserve
|
Posted: Wed 03 Dec 2008, 05:38 Post subject:
Subject description: everyone has a standard (; |
|
Yep, that works as long as you have a jwmrc_tray (%T for 24hr w/seconds, but be sure to use a mono font and check it .. otherwise it can 'bump' the tray components in a distracting manner). Tooltip I like to have as two-digit ymd (following the greater-to-lesser timespan logic of the normal clock) with a full dayname following - putting the time in a tooltip seems needless if it's there on the tray already (unless you use it for inputting a time-ref). Some wm's I haven't quite found where to config the time format to my liking (not to mention tooltips), usually it's conky to the rescue then as it seems to work consistently in most situations even when there is no tray
Offhand, is there a strftime notation for internetime (aka 'swatch' where the day is divided by 1000 parts), I find it handy for an unambiguous short reference of world time (no offsets, etc) - TClockEx in win32 gives me that in a tooltip @442
|
|
Back to top
|
|
 |
CatDude

Joined: 03 Jan 2007 Posts: 1355 Location: UK
|
Posted: Thu 04 Dec 2008, 16:51 Post subject:
|
|
Hi
If you are using IceWM
1. Open Rox-Filer
2. Make sure show hidden files is enabled (click on the eye)
3. Go to /root/.icewm
4. Right click on preferences file, select Open As Text.
5. Search for: TimeFormat=
For 24 Hour Clock (showing seconds)
use: TimeFormat="%H:%M:%S"
6. Make sure you remove the "#" at the beginning of the line.
7. Restart IceWM by going to menu -> Shutdown -> Retstart IceWM
You can find more info here: IceWM FAQ's
CatDude
.
_________________

|
|
Back to top
|
|
 |
|