Gregor Best a écrit :
Well, that is because the syntax is c:geometry() :)
The . notation is used for object fields, like name, class, whatever, and
the : notation is used for methods.
I tried before, and I just tried again, it does not work : awesome
starts with another config file, probably this one in /etc/xdg
Here is the result of the config file test ; in both cases (. or :), I
get this :
lenn...@sumer:~$ awesome -k
/home/lennyjl/.config/awesome/rc.lua:399: 'then' expected near '='
✔ Configuration file syntax OK.
The line 399 is the one including "then" :
-- Hook function to execute when a new client appears.
awful.hooks.manage.register(function (c)
if use_titlebar then
-- Add a titlebar
awful.titlebar.add(c, { modkey = modkey })
end
-- test if client is ProcMeter3
local cls = c.class
if cls = "ProcMeter3" then
-- Ajustment position and size
c:geometry({ x = 100, y = 400, height = 600, width = 200 })
end
And I don't see what is wrong here.
Jean-Luc
PS : it is not necessary to answer me directly, I am on the awesome list.
Ah, found it... try using a == instead of a = in the if statement. That should
do it.
Yes, the error on "then" disappeared. Good.
But the ProcMeter3 window is still at the top left corner, with the same
size ! I changed the values to x = 400, y = 400, height = 400, width =
400, no change.
It seems the test does not recognize the starting client. I changed
"ProcMeter3" by "procmeter3" without change, the class by instance, no
change.
Perhaps my question was not enough clear : I would like this application
starts at some special position and size, when awesome is starting (I
already did that it starts with awesome). My autostart function is
completely at the end of rc.lua ; is it a problem ?
--
To unsubscribe, send mail to [email protected].