awesomerc: raise client when focused
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
01a725757a
commit
2de0b063fe
|
@ -128,7 +128,6 @@ mytasklist.buttons = { button({ }, 1, function (c)
|
||||||
awful.tag.viewonly(c:tags()[1])
|
awful.tag.viewonly(c:tags()[1])
|
||||||
end
|
end
|
||||||
client.focus = c
|
client.focus = c
|
||||||
c:raise()
|
|
||||||
end),
|
end),
|
||||||
button({ }, 3, function () if instance then instance:hide() end instance = awful.menu.clients({ width=250 }) end),
|
button({ }, 3, function () if instance then instance:hide() end instance = awful.menu.clients({ width=250 }) end),
|
||||||
button({ }, 4, function () awful.client.focus.byidx(1) end),
|
button({ }, 4, function () awful.client.focus.byidx(1) end),
|
||||||
|
@ -181,16 +180,8 @@ globalkeys =
|
||||||
key({ modkey, }, "Right", awful.tag.viewnext ),
|
key({ modkey, }, "Right", awful.tag.viewnext ),
|
||||||
key({ modkey, }, "Escape", awful.tag.history.restore),
|
key({ modkey, }, "Escape", awful.tag.history.restore),
|
||||||
|
|
||||||
key({ modkey, }, "j",
|
key({ modkey, }, "j", function () awful.client.focus.byidx( 1) end),
|
||||||
function ()
|
key({ modkey, }, "k", function () awful.client.focus.byidx(-1) end),
|
||||||
awful.client.focus.byidx( 1)
|
|
||||||
if client.focus then client.focus:raise() end
|
|
||||||
end),
|
|
||||||
key({ modkey, }, "k",
|
|
||||||
function ()
|
|
||||||
awful.client.focus.byidx(-1)
|
|
||||||
if client.focus then client.focus:raise() end
|
|
||||||
end),
|
|
||||||
|
|
||||||
-- Layout manipulation
|
-- Layout manipulation
|
||||||
key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
|
key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
|
||||||
|
@ -198,13 +189,7 @@ globalkeys =
|
||||||
key({ modkey, "Control" }, "j", function () awful.screen.focus( 1) end),
|
key({ modkey, "Control" }, "j", function () awful.screen.focus( 1) end),
|
||||||
key({ modkey, "Control" }, "k", function () awful.screen.focus(-1) end),
|
key({ modkey, "Control" }, "k", function () awful.screen.focus(-1) end),
|
||||||
key({ modkey, }, "u", awful.client.urgent.jumpto),
|
key({ modkey, }, "u", awful.client.urgent.jumpto),
|
||||||
key({ modkey, }, "Tab",
|
key({ modkey, }, "Tab", function () awful.client.focus.history.previous() end),
|
||||||
function ()
|
|
||||||
awful.client.focus.history.previous()
|
|
||||||
if client.focus then
|
|
||||||
client.focus:raise()
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
|
|
||||||
-- Standard program
|
-- Standard program
|
||||||
key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
|
key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
|
||||||
|
@ -317,6 +302,7 @@ awful.hooks.focus.register(function (c)
|
||||||
if not awful.client.ismarked(c) then
|
if not awful.client.ismarked(c) then
|
||||||
c.border_color = beautiful.border_focus
|
c.border_color = beautiful.border_focus
|
||||||
end
|
end
|
||||||
|
c:raise()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Hook function to execute when unfocusing a client.
|
-- Hook function to execute when unfocusing a client.
|
||||||
|
@ -360,7 +346,7 @@ awful.hooks.manage.register(function (c, startup)
|
||||||
end
|
end
|
||||||
-- Add mouse bindings
|
-- Add mouse bindings
|
||||||
c:buttons({
|
c:buttons({
|
||||||
button({ }, 1, function (c) client.focus = c; c:raise() end),
|
button({ }, 1, function (c) client.focus = c end),
|
||||||
button({ modkey }, 1, awful.mouse.client.move),
|
button({ modkey }, 1, awful.mouse.client.move),
|
||||||
button({ modkey }, 3, awful.mouse.client.resize)
|
button({ modkey }, 3, awful.mouse.client.resize)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue