1

I'm using AwesomeWM, and I'm trying to display the time in my wibox using this code

vicious.register(datewidget, vicious.widgets.date, os.date("%b ")..(os.date("%d")+0).. ', ' ..(os.date("%I")+0)..os.date(":%M")..string.lower( os.date(" %p ")), 1)

The time is correct when I open AwesomeWM, but it doesn't update. For whatever reason , 1) doesn't work.

heres my full rc.lua

hjpotter92
  • 78,589
  • 36
  • 144
  • 183
user10850
  • 49
  • 7
  • Instead of so many concatenations; a simple: `os.date("%b %d, %I:%M ")..string.lower( os.date("%p ")` would work as you're just adding 0 to those values. – hjpotter92 Feb 18 '13 at 03:38

1 Answers1

1

I guess the problem is with what the register function expects. It expects a format string with which it can calculate date itself. Here you're passing a literal string instead of formatting parameters.

From your older question, I found a different method for the same. Now, your vicious need to be like:

vicious.register(datewidget, vicious.widgets.date, "<span font-family='terminus' color='#999999'>%b %d, %l:%M %P</span>", 1)

And it should work.

P.S. Thanks to sa1

Community
  • 1
  • 1
hjpotter92
  • 78,589
  • 36
  • 144
  • 183