In floating layout when moving a window I found the default snap value
of 8 somehow annoying, I prefer a snap value of 4.
If I move a window with modkey-btn1 pressed (anywhere on
the window) -- which I rarely do however -- the fix is easy:
I just replace
awful.mouse.client.move
with
function() awful.mouse.client.move(c, 4) end
in the corresponding hook of my rc.lua (copied from the default rc.lua stanza):
-- Hook function to execute when a new client appears.
awful.hooks.manage.register(function (c, startup)
...
-- Add mouse bindings
c:buttons(awful.util.table.join(
awful.button({ }, 1, function (c) client.focus = c; c:raise()
end),
-- original line:
-- awful.button({ modkey }, 1, awful.mouse.client.move),
-- now my modification:
awful.button({ modkey }, 1, function()
awful.mouse.client.move(c, 4) end),
awful.button({ modkey }, 3, awful.mouse.client.resize)
))
...
However the situation is not so easy to modify for moving a window with
just btn1 pressed on the titlebar of a window: I found the following
code to work:
-- Hook function to execute when a new client appears.
-- i e same hook, but further down
awful.hooks.manage.register(function (c, startup)
...
c.titlebar:buttons(awful.util.table.join(
awful.button({ }, 1, function ()
awful.mouse.client.move(c, 4) end)
))
I e here I explicitly say that my client should be moved with snap 4
when pressing btn1 on the titlebar (i. e. pressing btn1 and moving the
mouse keeping btn1 pressed)
However in this case I get error msgs each time I press a titlebar:
W: awesome: luaA_dofunction:264: error running function:
/usr/share/awesome/lib/awful/mouse.lua:174: mousegrabber already running
I suspect the code responsible for this is in
lib/awful/titlebar.lua.in, function add. There is a
button_callback_focus_raise_move already defined, I have no idea
however how to override this callback.
Maybe I can just call mousegrabber.stop() somewhere, where?
Any ideas?
-Andreas
--
To unsubscribe, send mail to [email protected].