You are not logged in.
Hi, I tried to make xterm transparent by using xcompmgr in lua file on awesome WM. Here is a part of my rc.lua.
-- Hook function to execute when focusing a client---------------------------------------------------
awful.hooks.focus.register(function (c)
if not awful.client.ismarked(c) then
c.border_color = beautiful.border_focus
if c.class == "XTerm" then c.opacity = 0.7 end
end
end)
-- Hook function to execute when unfocusing a client-----------------------------------------------
awful.hooks.unfocus.register(function (c)
if not awful.client.ismarked(c) then
c.border_color = beautiful.border_normal
if c.class == "XTerm" then c.opacity = 0.6 end
end
end)
But I received an error: attempt to index a nil value (field "hooks").
I'm new to lua code and awesome. Anyone have any idea how to fix it? Or anyone have any other ideas to make xterm transparent?
Last edited by miyavi (2016-09-23 18:20:45)
Offline
I am not good at lua either, but I got my terminal things working on my env. What I have in rc.lua is
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
keys = clientkeys,
buttons = clientbuttons,
size_hints_honor = false,
opacity = 0.8 } },
{
}
I also put them on github, welcome to check out and find a way to solve your problem: https://github.com/shwsun/awesome
Offline
jethronsun7, thank you for your reply, and I'm so sorry for not replying sooner...
Based on your hint, I added a rule to my own rules in rc.lua. What I added is last one in following.
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
keys = clientkeys,
buttons = clientbuttons} },
........
{ rule = { class = "XTerm" },
properties = { opacity = 0.75 } },
}
It makes only xterm transparent. Thank you so much for your great hint!
Offline
You are welcome, have fun!
Offline