From 94e0d9ea3bd98f7db479c5071bb0eab39be0d135 Mon Sep 17 00:00:00 2001 From: Luca CPZ Date: Sat, 27 Jan 2018 11:07:49 +0100 Subject: [PATCH] 217: 4.{0,1} table join compatibility --- lain | 2 +- rc.lua.template | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lain b/lain index aee7eca..003beff 160000 --- a/lain +++ b/lain @@ -1 +1 @@ -Subproject commit aee7ecac5f002f069b43d6b1094765778d206601 +Subproject commit 003beff59fee7b42233326c57f545419c67e592c diff --git a/rc.lua.template b/rc.lua.template index 335291a..3a33410 100644 --- a/rc.lua.template +++ b/rc.lua.template @@ -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()