cortesi/qtile — Issue #101: A strange config file invocation
Author: ei-grad
Created: 2011-10-18 21:44:36+00:00
State: open

Hi.

With

screens = [
Screen(bottom=Bar([
widget.GroupBox(),
widget.WindowName(font="fixed", fontsize=12)
], 30)),
Screen(bottom=Bar([
widget.GroupBox(),
widget.WindowName(font="fixed", fontsize=12)
], 30))
]

all good. But with

def get_bar():
return Bar([
widget.GroupBox(),
widget.WindowName(font="fixed", fontsize="12")
], 30)

screens = [
Screen(bottom=get_bar()),
Screen(bottom=get_bar()),
]

there is a:

Traceback (most recent call last):
File "/usr/bin/qtile", line 72, in
main()
File "/usr/bin/qtile", line 58, in main
c = confreader.File(options.configfile)
File "/usr/lib/python2.7/site-packages/libqtile/confreader.py", line 58, in __init__
raise ConfigError(str(v))
libqtile.confreader.ConfigError: global name 'Bar' is not defined

.... wtf???

> execfile(self.fname, {}, globs)

OMG. Why not import it???