1
0
Fork 0

proper setslave + do not snap windows to each other

This commit is contained in:
Von Random 2015-03-16 02:11:16 +03:00
parent 1bf3c96f08
commit 252144e31b

10
rc.lua
View file

@ -75,6 +75,9 @@ theme.font = 'Terminus 9'
theme.taglist_squares_sel = nil theme.taglist_squares_sel = nil
theme.taglist_squares_unsel = nil theme.taglist_squares_unsel = nil
-- amount of pixels to snap windows from
snap = 0
-- set wallpaper -- set wallpaper
local wallpaper = '/home/von/Pictures/wallpaper.png' local wallpaper = '/home/von/Pictures/wallpaper.png'
if exists(wallpaper) then if exists(wallpaper) then
@ -525,7 +528,7 @@ end
clientbuttons = awful.util.table.join( clientbuttons = awful.util.table.join(
awful.button({ }, 1, function (c) client.focus = c; c:raise() end), awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
awful.button({ modkey }, 1, awful.mouse.client.move), awful.button({ modkey }, 1, function (c) client.focus = c; awful.mouse.client.move(c, snap) end),
awful.button({ modkey }, 3, awful.mouse.client.resize) awful.button({ modkey }, 3, awful.mouse.client.resize)
) )
@ -542,8 +545,7 @@ awful.rules.rules = {
border_color = beautiful.border_normal, border_color = beautiful.border_normal,
focus = awful.client.focus.filter, focus = awful.client.focus.filter,
keys = clientkeys, keys = clientkeys,
buttons = clientbuttons, buttons = clientbuttons
callback = awful.client.setslave
} }
}, },
-- Floating only rules: -- Floating only rules:
@ -678,7 +680,7 @@ client.connect_signal(
if not startup then if not startup then
-- Set the windows at the slave, -- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master. -- i.e. put it at the end of others instead of setting it master.
-- awful.client.setslave(c) awful.client.setslave(c)
-- Put windows in a smart way, only if they do not set an initial position. -- Put windows in a smart way, only if they do not set an initial position.
if not c.size_hints.user_position and not c.size_hints.program_position then if not c.size_hints.user_position and not c.size_hints.program_position then