On Sun, 29 May 2005, Joerg Lehmann wrote:
a few comments/questions regarding the termtitle plugin.
On 29.05.05, Dag Wieers wrote: [...]
import events, plugin, config, sys, os, re
class config(config.configsection): songformat = config.configstring('%(artist)s - %(title)s') term = os.getenv('TERM')
Is term supposed to be config options? If yes and in case you want to specify a default, use term = config.configstring(os.getenv('TERM'))
Nope, I see no reason to let people specify this themselves.
termre = re.compile('(screen|xterm*)')
Here applies the same, except that you have to compile the regexp in the plugin and not its config.
It would be nicer to check for the capability instead of matching it to a known list. But I'm not sure if that is possible. (ie. other programs do the same)
Ah, I noticed though that it should be xterm*, not xterm-*.
-- dag wieers, dag@wieers.com, http://dag.wieers.com/ -- [all I want is a warm bed and a kind word and unlimited power]