modkey-tab optional cycle between instead of two-history-swapping; closes #274
This commit is contained in:
parent
99988d7c1f
commit
06f05ac740
|
@ -91,6 +91,7 @@ local modkey = "Mod4"
|
||||||
local altkey = "Mod1"
|
local altkey = "Mod1"
|
||||||
local terminal = "urxvtc"
|
local terminal = "urxvtc"
|
||||||
local vi_focus = false -- vi-like client focus - https://github.com/lcpz/awesome-copycats/issues/275
|
local vi_focus = false -- vi-like client focus - https://github.com/lcpz/awesome-copycats/issues/275
|
||||||
|
local cycle_prev = true -- cycle trough all previous client or just the first -- https://github.com/lcpz/awesome-copycats/issues/274
|
||||||
local editor = os.getenv("EDITOR") or "vim"
|
local editor = os.getenv("EDITOR") or "vim"
|
||||||
local gui_editor = os.getenv("GUI_EDITOR") or "gvim"
|
local gui_editor = os.getenv("GUI_EDITOR") or "gvim"
|
||||||
local browser = os.getenv("BROWSER") or "firefox"
|
local browser = os.getenv("BROWSER") or "firefox"
|
||||||
|
@ -334,12 +335,26 @@ globalkeys = my_table.join(
|
||||||
{description = "jump to urgent client", group = "client"}),
|
{description = "jump to urgent client", group = "client"}),
|
||||||
awful.key({ modkey, }, "Tab",
|
awful.key({ modkey, }, "Tab",
|
||||||
function ()
|
function ()
|
||||||
|
if cycle_prev then
|
||||||
awful.client.focus.history.previous()
|
awful.client.focus.history.previous()
|
||||||
|
else
|
||||||
|
awful.client.focus.byidx(-1)
|
||||||
|
end
|
||||||
if client.focus then
|
if client.focus then
|
||||||
client.focus:raise()
|
client.focus:raise()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
{description = "go back", group = "client"}),
|
{description = "cycle with previous/go back", group = "client"}),
|
||||||
|
awful.key({ modkey, "Shift" }, "Tab",
|
||||||
|
function ()
|
||||||
|
if cycle_prev then
|
||||||
|
awful.client.focus.byidx(1)
|
||||||
|
if client.focus then
|
||||||
|
client.focus:raise()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
{description = "go forth", group = "client"}),
|
||||||
|
|
||||||
-- Show/Hide Wibox
|
-- Show/Hide Wibox
|
||||||
awful.key({ modkey }, "b", function ()
|
awful.key({ modkey }, "b", function ()
|
||||||
|
|
Loading…
Reference in New Issue