diff --git a/awesomerc.lua b/awesomerc.lua index 0029e197..11dcc93e 100755 --- a/awesomerc.lua +++ b/awesomerc.lua @@ -428,6 +428,7 @@ awful.rules.rules = { raise = true, keys = clientkeys, buttons = clientbuttons, + screen = awful.screen.preferred, placement = awful.placement.no_overlap+awful.placement.no_offscreen } }, diff --git a/lib/awful/screen.lua b/lib/awful/screen.lua index 48efa13c..f477d6a0 100644 --- a/lib/awful/screen.lua +++ b/lib/awful/screen.lua @@ -214,10 +214,12 @@ function screen.object.set_padding(self, padding) end end ---- Return the currently screen for new clients. --- This is exactly the same as `awful.screen.focused` exept it avoids clients --- being moved when Awesome is restarted. This is used by the default `rc.lua`. --- @tparam client c A client +--- Get the preferred screen in the context of a client. +-- This is exactly the same as `awful.screen.focused` except that it avoids +-- clients being moved when Awesome is restarted. +-- This is used in the default `rc.lua` to ensure clients get assigned to the +-- focused screen by default. +-- @tparam client c A client. -- @treturn screen The preferred screen. function screen.preferred(c) return capi.awesome.startup and c.screen or screen.focused()