awesome-shifty
awesome-shifty copied to clipboard
No sane default position for floating windows
If you have two screens, new windows in floating layout can appear offscreen and inaccessible.
The below patch on 3.5 branch fixed it for me (borrowed from awesome's original rc.lua).
diff --git a/init.lua b/init.lua index 8e7a760..631e7d9 100644 --- a/init.lua +++ b/init.lua @@ -756,6 +756,14 @@ function match(c, startup) awful.placement.no_offscreen(c) end + if not startup then + -- Put windows in a smart way, only if they does not set an initial position. + if not c.size_hints.user_position and not c.size_hints.program_position then + awful.placement.no_overlap(c) + awful.placement.no_offscreen(c) + end + end + local sel = awful.tag.selectedlist(target_screen) if not target_tag_names or #target_tag_names == 0 then -- if not matched to some names try putting
@kcburge It's tough to tell what the patch was intended to look like, as both "+" and "-" show up as bullets when pasted raw. Perhaps you could wrap the diff in <pre>
tags, so that people can see the actual diff.
FWIW, I just confirmed that this patch is still in my branch off of shifty, which has been modified to work with newer awesome versions.
Awesome. Thanks for the quick response!