You are not logged in.

#1 2009-10-29 16:23:51

trann
Member
Registered: 2009-10-29
Posts: 32

[SOLVED] Change default time format on Awesome3

So I am trying to change the clock format on the normal awesome top bar from 24h to 12h. The default format is "%a %b %d, %H:%M" as per the awesome documentation here.

That link also explains the textclock widget function call that is present in .config/awesome/rc.lua , so I have been trying to figure out why adding the format parameter (shown below) doesn't change the clock to a 12h display

I went from:

mytextclock = awful.widget.textclock({ align = "right" })

to the new code:

mytextclock = awful.widget.textclock({ align = "right", format = "%a %b %d, %I:%M" })

And that is having no effect.  Can anyone tell me the correct place I can edit this time format?  smile

Last edited by trann (2009-10-29 17:30:51)

Offline

#2 2009-10-29 17:10:26

fastfret79
Member
Registered: 2009-09-05
Posts: 87

Re: [SOLVED] Change default time format on Awesome3

You're in the right place, but your formatting is a bit off. My line is as follows:

mytextclock = awful.widget.textclock({ align = "right" }, " %a %d %b, %H:%M:%S ", 1)

so you need to update your line to:

mytextclock = awful.widget.textclock({ align = "right" }, "%a %b %d, %I:%M", 60)

Last edited by fastfret79 (2009-10-29 17:14:54)

Offline

#3 2009-10-29 17:30:36

trann
Member
Registered: 2009-10-29
Posts: 32

Re: [SOLVED] Change default time format on Awesome3

yep, that worked perfectly.  Thank you fastfret79

marking as solved.

Offline

Board footer

Powered by FluxBB