1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-10-22 20:41:22 +00:00

modkey-tab optional cycle between instead of two-history-swapping; closes #274

This commit is contained in:
Luca CPZ 2019-11-26 15:44:48 +00:00
parent 99988d7c1f
commit 06f05ac740
No known key found for this signature in database
GPG key ID: D44FC5FFC3500D1E

View file

@ -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 ()
awful.client.focus.history.previous() if cycle_prev then
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 ()