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

217: 4.{0,1} table join compatibility

This commit is contained in:
Luca CPZ 2018-01-27 11:07:49 +01:00
parent 1feeed5df3
commit 94e0d9ea3b
2 changed files with 10 additions and 9 deletions

2
lain

@ -1 +1 @@
Subproject commit aee7ecac5f002f069b43d6b1094765778d206601
Subproject commit 003beff59fee7b42233326c57f545419c67e592c

View file

@ -19,6 +19,7 @@ local lain = require("lain")
--local menubar = require("menubar")
local freedesktop = require("freedesktop")
local hotkeys_popup = require("awful.hotkeys_popup").widget
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
-- }}}
-- {{{ Error handling
@ -108,7 +109,7 @@ awful.layout.layouts = {
--lain.layout.termfair,
--lain.layout.termfair.center,
}
awful.util.taglist_buttons = gears.table.join(
awful.util.taglist_buttons = my_table.join(
awful.button({ }, 1, function(t) t:view_only() end),
awful.button({ modkey }, 1, function(t)
if client.focus then
@ -124,7 +125,7 @@ awful.util.taglist_buttons = gears.table.join(
awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end),
awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end)
)
awful.util.tasklist_buttons = gears.table.join(
awful.util.tasklist_buttons = my_table.join(
awful.button({ }, 1, function (c)
if c == client.focus then
c.minimized = true
@ -214,7 +215,7 @@ awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s)
-- }}}
-- {{{ Mouse bindings
root.buttons(gears.table.join(
root.buttons(my_table.join(
awful.button({ }, 3, function () awful.util.mymainmenu:toggle() end),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
@ -222,7 +223,7 @@ root.buttons(gears.table.join(
-- }}}
-- {{{ Key bindings
globalkeys = gears.table.join(
globalkeys = my_table.join(
-- Take a screenshot
-- https://github.com/lcpz/dots/blob/master/bin/screenshot
awful.key({ altkey }, "p", function() os.execute("screenshot") end,
@ -507,7 +508,7 @@ globalkeys = gears.table.join(
--]]
)
clientkeys = gears.table.join(
clientkeys = my_table.join(
awful.key({ altkey, "Shift" }, "m", lain.util.magnify_client,
{description = "magnify client", group = "client"}),
awful.key({ modkey, }, "f",
@ -553,7 +554,7 @@ for i = 1, 9 do
descr_move = {description = "move focused client to tag #", group = "tag"}
descr_toggle_focus = {description = "toggle focused client on tag #", group = "tag"}
end
globalkeys = gears.table.join(globalkeys,
globalkeys = my_table.join(globalkeys,
-- View tag only.
awful.key({ modkey }, "#" .. i + 9,
function ()
@ -599,7 +600,7 @@ for i = 1, 9 do
)
end
clientbuttons = gears.table.join(
clientbuttons = my_table.join(
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
awful.button({ modkey }, 1, awful.mouse.client.move),
awful.button({ modkey }, 3, awful.mouse.client.resize))
@ -663,7 +664,7 @@ client.connect_signal("request::titlebars", function(c)
-- Default
-- buttons for the titlebar
local buttons = gears.table.join(
local buttons = my_table.join(
awful.button({ }, 1, function()
client.focus = c
c:raise()