awesome-wmxrandr

Forcing Awesome to restart when connecting a new screen


I have some complicated screen and docking station setup and would like to automatically restart Awesome when docking and undocking. How can I tell Awesome to do that?

I know the preferred way of doing things is to avoid restarting and using the awful.screen.connect_for_each_screen function, but given my configuration, I want to restart Awesome instead.


Solution

  • screen.connect_signal("added", function() awesome.restart() end)
    -- Perhaps you also want the following?
    -- screen.connect_signal("removed", function() awesome.restart() end)