[dev] Re: [wmii]clarifications on python script usage

From: pascal <lepascalou_AT_gmail.com>
Date: Sun, 30 May 2010 23:01:50 +0200

Le Sun, 30 May 2010 16:12:08 -0400
Kris Maglione <maglione.k_AT_gmail.com> a écrit:

> I'm getting confused trying to read the above, so I'll just
> explain from the begining.
Yes, I was confused myself, hehe.

> You don't want to copy wmiirc.py to wmiirc_local.py. The whole
> point of wmiirc_local.py is that it gets called *in addion to*
> wmiirc.py. So if you copy the former to the latter, you just
> execute it twice (and therefore you execute witray twice, as
> well). The witray error is because, for the moment, witray just
> gives up rathe than taking over for another system tray. It may
> change in the future.
>
> As for copying files from /etc/wmii-hg, you almost certainly
> don't want to do that. Instead, run wmii as ‘wmii -r
> python/wmiirc’ and it will run /etc/wmii-hg/python/wmiirc for
> you. Any customization you want to do, do in
> ~/.wmii-hg/wmiirc_local.py or
> ~/.wmii-hg/plugins/any_filename_you_want.py. Only in the event
> that you can't manage your customizations in wmiirc_local.py
> should you copy /etc/wmii-hg/python/wmiirc.py to
> ~/.wmii-hg/wmiirc.py and edit it. But don't copy *any* other
> files.
>
> I hope the above wasn't too confusing. If you want an example,
> my wmiirc_local.py is attached.
>
Thanks for the explanations, it's much clearer now.

> Why would you want any kind of locale-specific time? Here's what
> I do:
>
> @defmonitoR(colors=wmii['focuscolors'], name='time')
> def s9time(self):
> return time.strftime('%H:%M:%S %Z')
> @defmonitor(interval=60)
> def s9date(self):
> return time.strftime('%a, %d %b')
>
It's a detail but I prefer to read for example "Dim, 30 Mai"
instead of "Sun, 30 May".

Pascal
Received on Sun May 30 2010 - 21:01:50 UTC

This archive was generated by hypermail 2.2.0 : Sun May 30 2010 - 21:12:02 UTC