Re: quickly cloning an existing statusbar script (date)?

Juri Mianovich <juri_mian-/[email protected]>
Newsgroups gmane.comp.window-managers.ion.general
Message-ID <[email protected]>
Hello,


--- On Thu, 11/13/08, Tuomo Valkonen <[email protected]> wrote:

> > But the statusbar just has a "??" in it for
> "%ukdate", even though that
> > script exists.
> 
> The monitor must of course be modified to use the correct
> meter names...
> 
> > ALSO, I am not sure how I would edit statusd_ukdate.lc
> to have a +7 hours
> > in its 'date' command, since the .lc file is
> not text, but just binary
> > data.
> 
> ... for which you need to modify the original .lua file.


Thanks for your response.  I think I will pursue it this way,
which is to create a %ukdate.

So, in addition to adding a second item to the default
template, like this:

template="[  %date  %ukdate  ] %filler%systray",

and adding this block of code to cfg_statusbar.lua:

ukdate={
ukdate_format='  %a %Y-%m-%d %H:%M  UK'
}

I also need to:

- edit the monitor
- find the original lua file for statusd_date.lc, edit it
  for a +7 (hard hack for DST, sorry) and recompile it to
  a lc file

If that is correct, would you tell me what/where "the monitor"
is ?

I am going to change this line:

statusd.inform('date', os.date(settings.date_format, tm))

to this:

statusd.inform('date -v +7H', os.date(settings.date_format, tm))

does that seem reasonable ?

Thanks again.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.