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 Thu 31 Jul 2014, 01:43
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Remove leading zero from desktop clock
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
cimarron

Joined: 30 May 2013
Posts: 86

PostPosted: Mon 30 Sep 2013, 09:52    Post subject:  Remove leading zero from desktop clock
Subject description: Works on times or dates
 

To remove the leading zero from single digit hours or dates on the desktop clock, just add a dash/minus before the desired digit in this line in .jwmrc-tray (hidden in the root directory). Like this:
Code:
<Clock format="%-I:%M%p"></Clock>

Restart JWM to see the change.

(That's if you use JWM, but it should be similar in other window managers. Adding the dash also works for times and dates in other places, such as in the Spacefm file manager, where you can specify the format for date and time of file modifications)

So instead of 08:51AM, the clock will now show this:
clock.png
 Description   
 Filesize   2.49 KB
 Viewed   318 Time(s)

clock.png


Last edited by cimarron on Tue 01 Oct 2013, 09:16; edited 3 times in total
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 10948
Location: Arizona USA

PostPosted: Mon 30 Sep 2013, 10:30    Post subject:  

Works like a charm. Very Happy
Out of idle curiosity, how did you discover this?
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Mon 30 Sep 2013, 11:41    Post subject:  

Flash wrote:
Works like a charm. Very Happy
Out of idle curiosity, how did you discover this?


Type or paste
Code:
date --help

into a console and press ENTER key Wink
Back to top
View user's profile Send private message 
cimarron

Joined: 30 May 2013
Posts: 86

PostPosted: Mon 30 Sep 2013, 12:39    Post subject:  

I found the tip on a blog post about XFCE, and just tried it. But L18L's info is better; lots more options. I like AM/PM better in lower case too (use %P instead of %p).
Back to top
View user's profile Send private message 
toronado

Joined: 04 Sep 2013
Posts: 94

PostPosted: Wed 06 Nov 2013, 19:15    Post subject:  

Thanks. Works for me in PHATSlacko5502.
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Thu 07 Nov 2013, 10:50    Post subject:  

toronado wrote:
...Works...

date is NOT puppy and is NOT linux it is GNU

http://www.gnu.org/software/coreutils/manual/html_node/Examples-of-date.html

Very Happy
Back to top
View user's profile Send private message 
toronado

Joined: 04 Sep 2013
Posts: 94

PostPosted: Thu 07 Nov 2013, 15:50    Post subject:  

L18L wrote:
toronado wrote:
...Works...

date is NOT puppy and is NOT linux it is GNU

http://www.gnu.org/software/coreutils/manual/html_node/Examples-of-date.html

Very Happy
OK. It reminds me a little bit of http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-format
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
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.0599s ][ Queries: 13 (0.0099s) ][ GZIP on ]