Hi, Am 28.05.2015 um 13:32 schrieb Aleksander Szczygieł: > I have question - I need custom signal in my rc and I used undocumented > function client.add_signal("custom_signal") (like it was made in > awesoem/lib/awful/client.lua) to do it before using > client.emit_signal("custom_signal"), but this function is undocumented so I'm > not so sure if my way doing it is correct...
Hm, yay for our documentation... > copied example from rc.lua: > > -- add signal for toggling wibox on top (needed for forcing maximized clients > resize) > client.add_signal("wibox_toggle") > . > . > . > globalkeys = awful.util.table.join( > . > . > . > awful.key({ modkey, }, "b", > function () > mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible > client.emit_signal("wibox_toggle") > end, "Toggle panel"), > . > . > . > -- Connect toggle wibox signal to a resize function > client.connect_signal("wibox_toggle", reload_maximized_windows) > > I'm not sure if this function should be used from user side (but it doesn't > work without it) and I think if it function can be used it should be written > in documentation. Yes this works, but, well, why? Just call your function directly? Or connect via drawin.connect_signal("property::visible", function() print("foo") end) to "whenever any wibox' visible property changes". But, yeah, you can just add arbitrary signals and emit these signals with arbitrary arguments. These arguments will be given to every function connected to this signal. Cheers, Uli -- - Buck, when, exactly, did you lose your mind? - Three months ago. I woke up one morning married to a pineapple. An ugly pineapple... But I loved her. -- To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.