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

Replace deprecated awful.util.table.join w/ gears.table.join

This commit is contained in:
cool-cool-sweat 2018-01-22 05:51:55 -05:00
parent e9de2b426a
commit 9a2c8d4ca8
11 changed files with 32 additions and 32 deletions

View file

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

View file

@ -222,7 +222,7 @@ function theme.at_screen_connect(s)
-- Create an imagebox widget which will contains an icon indicating which layout we're using. -- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen. -- We need one layoutbox per screen.
s.mylayoutbox = awful.widget.layoutbox(s) s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(awful.util.table.join( s.mylayoutbox:buttons(gears.table.join(
awful.button({ }, 1, function () awful.layout.inc( 1) end), awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 3, function () awful.layout.inc(-1) end), awful.button({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc( 1) end), awful.button({ }, 4, function () awful.layout.inc( 1) end),

View file

@ -252,7 +252,7 @@ theme.volume = lain.widget.alsabar({
} }
}) })
theme.volume.tooltip.wibox.fg = theme.fg_focus theme.volume.tooltip.wibox.fg = theme.fg_focus
theme.volume.bar:buttons(awful.util.table.join ( theme.volume.bar:buttons(gears.table.join (
awful.button({}, 1, function() awful.button({}, 1, function()
awful.spawn.with_shell(string.format("%s -e alsamixer", awful.util.terminal)) awful.spawn.with_shell(string.format("%s -e alsamixer", awful.util.terminal))
end), end),
@ -316,7 +316,7 @@ function theme.at_screen_connect(s)
-- Create an imagebox widget which will contains an icon indicating which layout we're using. -- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen. -- We need one layoutbox per screen.
s.mylayoutbox = awful.widget.layoutbox(s) s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(awful.util.table.join( s.mylayoutbox:buttons(gears.table.join(
awful.button({ }, 1, function () awful.layout.inc( 1) end), awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 3, function () awful.layout.inc(-1) end), awful.button({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc( 1) end), awful.button({ }, 4, function () awful.layout.inc( 1) end),

View file

@ -204,7 +204,7 @@ function theme.at_screen_connect(s)
-- Create an imagebox widget which will contains an icon indicating which layout we're using. -- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen. -- We need one layoutbox per screen.
s.mylayoutbox = awful.widget.layoutbox(s) s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(awful.util.table.join( s.mylayoutbox:buttons(gears.table.join(
awful.button({ }, 1, function () awful.layout.inc( 1) end), awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 3, function () awful.layout.inc(-1) end), awful.button({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc( 1) end), awful.button({ }, 4, function () awful.layout.inc( 1) end),

View file

@ -174,25 +174,25 @@ theme.mpd = lain.widget.mpd({
local musicbg = wibox.container.background(theme.mpd.widget, theme.bg_focus, gears.shape.rectangle) local musicbg = wibox.container.background(theme.mpd.widget, theme.bg_focus, gears.shape.rectangle)
local musicwidget = wibox.container.margin(musicbg, 0, 0, 5, 5) local musicwidget = wibox.container.margin(musicbg, 0, 0, 5, 5)
musicwidget:buttons(awful.util.table.join(awful.button({ }, 1, musicwidget:buttons(gears.table.join(awful.button({ }, 1,
function () awful.spawn(theme.musicplr) end))) function () awful.spawn(theme.musicplr) end)))
prev_icon:buttons(awful.util.table.join(awful.button({}, 1, prev_icon:buttons(gears.table.join(awful.button({}, 1,
function () function ()
awful.spawn.with_shell("mpc prev") awful.spawn.with_shell("mpc prev")
theme.mpd.update() theme.mpd.update()
end))) end)))
next_icon:buttons(awful.util.table.join(awful.button({}, 1, next_icon:buttons(gears.table.join(awful.button({}, 1,
function () function ()
awful.spawn.with_shell("mpc next") awful.spawn.with_shell("mpc next")
theme.mpd.update() theme.mpd.update()
end))) end)))
stop_icon:buttons(awful.util.table.join(awful.button({}, 1, stop_icon:buttons(gears.table.join(awful.button({}, 1,
function () function ()
play_pause_icon:set_image(theme.play) play_pause_icon:set_image(theme.play)
awful.spawn.with_shell("mpc stop") awful.spawn.with_shell("mpc stop")
theme.mpd.update() theme.mpd.update()
end))) end)))
play_pause_icon:buttons(awful.util.table.join(awful.button({}, 1, play_pause_icon:buttons(gears.table.join(awful.button({}, 1,
function () function ()
awful.spawn.with_shell("mpc toggle") awful.spawn.with_shell("mpc toggle")
theme.mpd.update() theme.mpd.update()
@ -303,7 +303,7 @@ function theme.at_screen_connect(s)
-- Create an imagebox widget which will contains an icon indicating which layout we're using. -- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen. -- We need one layoutbox per screen.
s.mylayoutbox = awful.widget.layoutbox(s) s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(awful.util.table.join( s.mylayoutbox:buttons(gears.table.join(
awful.button({ }, 1, function () awful.layout.inc( 1) end), awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 3, function () awful.layout.inc(-1) end), awful.button({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc( 1) end), awful.button({ }, 4, function () awful.layout.inc( 1) end),

View file

@ -268,7 +268,7 @@ function theme.at_screen_connect(s)
-- Create an imagebox widget which will contains an icon indicating which layout we're using. -- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen. -- We need one layoutbox per screen.
s.mylayoutbox = awful.widget.layoutbox(s) s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(awful.util.table.join( s.mylayoutbox:buttons(gears.table.join(
awful.button({ }, 1, function () awful.layout.inc( 1) end), awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 3, function () awful.layout.inc(-1) end), awful.button({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc( 1) end), awful.button({ }, 4, function () awful.layout.inc( 1) end),

View file

@ -110,7 +110,7 @@ theme.cal = lain.widget.calendar({
-- Mail IMAP check -- Mail IMAP check
local mailicon = wibox.widget.imagebox(theme.widget_mail) local mailicon = wibox.widget.imagebox(theme.widget_mail)
--[[ commented because it needs to be set before use --[[ commented because it needs to be set before use
mailicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.spawn(mail) end))) mailicon:buttons(gears.table.join(awful.button({ }, 1, function () awful.spawn(mail) end)))
local mail = lain.widget.imap({ local mail = lain.widget.imap({
timeout = 180, timeout = 180,
server = "server", server = "server",
@ -131,7 +131,7 @@ local mail = lain.widget.imap({
-- MPD -- MPD
local musicplr = awful.util.terminal .. " -title Music -g 130x34-320+16 -e ncmpcpp" local musicplr = awful.util.terminal .. " -title Music -g 130x34-320+16 -e ncmpcpp"
local mpdicon = wibox.widget.imagebox(theme.widget_music) local mpdicon = wibox.widget.imagebox(theme.widget_music)
mpdicon:buttons(awful.util.table.join( mpdicon:buttons(gears.table.join(
awful.button({ modkey }, 1, function () awful.spawn.with_shell(musicplr) end), awful.button({ modkey }, 1, function () awful.spawn.with_shell(musicplr) end),
awful.button({ }, 1, function () awful.button({ }, 1, function ()
awful.spawn.with_shell("mpc prev") awful.spawn.with_shell("mpc prev")
@ -275,7 +275,7 @@ function theme.at_screen_connect(s)
-- Create an imagebox widget which will contains an icon indicating which layout we're using. -- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen. -- We need one layoutbox per screen.
s.mylayoutbox = awful.widget.layoutbox(s) s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(awful.util.table.join( s.mylayoutbox:buttons(gears.table.join(
awful.button({ }, 1, function () awful.layout.inc( 1) end), awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 3, function () awful.layout.inc(-1) end), awful.button({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc( 1) end), awful.button({ }, 4, function () awful.layout.inc( 1) end),

View file

@ -122,16 +122,16 @@ lain.widget.contrib.task.attach(task, {
-- do not colorize output -- do not colorize output
show_cmd = "task | sed -r 's/\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g'" show_cmd = "task | sed -r 's/\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g'"
}) })
task:buttons(awful.util.table.join(awful.button({}, 1, lain.widget.contrib.task.prompt))) task:buttons(gears.table.join(awful.button({}, 1, lain.widget.contrib.task.prompt)))
-- Scissors (xsel copy and paste) -- Scissors (xsel copy and paste)
local scissors = wibox.widget.imagebox(theme.widget_scissors) local scissors = wibox.widget.imagebox(theme.widget_scissors)
scissors:buttons(awful.util.table.join(awful.button({}, 1, function() awful.spawn("xsel | xsel -i -b") end))) scissors:buttons(gears.table.join(awful.button({}, 1, function() awful.spawn("xsel | xsel -i -b") end)))
-- Mail IMAP check -- Mail IMAP check
local mailicon = wibox.widget.imagebox(theme.widget_mail) local mailicon = wibox.widget.imagebox(theme.widget_mail)
--[[ commented because it needs to be set before use --[[ commented because it needs to be set before use
mailicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.spawn(mail) end))) mailicon:buttons(gears.table.join(awful.button({ }, 1, function () awful.spawn(mail) end)))
local mail = lain.widget.imap({ local mail = lain.widget.imap({
timeout = 180, timeout = 180,
server = "server", server = "server",
@ -158,7 +158,7 @@ theme.volume = lain.widget.alsabar({
-- MPD -- MPD
local musicplr = awful.util.terminal .. " -title Music -g 130x34-320+16 -e ncmpcpp" local musicplr = awful.util.terminal .. " -title Music -g 130x34-320+16 -e ncmpcpp"
local mpdicon = wibox.widget.imagebox(theme.widget_music) local mpdicon = wibox.widget.imagebox(theme.widget_music)
mpdicon:buttons(awful.util.table.join( mpdicon:buttons(gears.table.join(
awful.button({ modkey }, 1, function () awful.spawn.with_shell(musicplr) end), awful.button({ modkey }, 1, function () awful.spawn.with_shell(musicplr) end),
awful.button({ }, 1, function () awful.button({ }, 1, function ()
awful.spawn.with_shell("mpc prev") awful.spawn.with_shell("mpc prev")
@ -311,7 +311,7 @@ function theme.at_screen_connect(s)
-- Create an imagebox widget which will contains an icon indicating which layout we're using. -- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen. -- We need one layoutbox per screen.
s.mylayoutbox = awful.widget.layoutbox(s) s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(awful.util.table.join( s.mylayoutbox:buttons(gears.table.join(
awful.button({ }, 1, function () awful.layout.inc( 1) end), awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 3, function () awful.layout.inc(-1) end), awful.button({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc( 1) end), awful.button({ }, 4, function () awful.layout.inc( 1) end),

View file

@ -167,7 +167,7 @@ theme.volume = lain.widget.alsabar({
}) })
theme.volume.tooltip.wibox.fg = theme.fg_focus theme.volume.tooltip.wibox.fg = theme.fg_focus
theme.volume.tooltip.wibox.font = theme.font theme.volume.tooltip.wibox.font = theme.font
theme.volume.bar:buttons(awful.util.table.join ( theme.volume.bar:buttons(gears.table.join (
awful.button({}, 1, function() awful.button({}, 1, function()
awful.spawn.with_shell(string.format("%s -e alsamixer", terminal)) awful.spawn.with_shell(string.format("%s -e alsamixer", terminal))
end), end),
@ -228,7 +228,7 @@ function theme.at_screen_connect(s)
s.mytxtlayoutbox = wibox.widget.textbox(theme["layout_txt_" .. awful.layout.getname(awful.layout.get(s))]) s.mytxtlayoutbox = wibox.widget.textbox(theme["layout_txt_" .. awful.layout.getname(awful.layout.get(s))])
awful.tag.attached_connect_signal(s, "property::selected", function () update_txt_layoutbox(s) end) awful.tag.attached_connect_signal(s, "property::selected", function () update_txt_layoutbox(s) end)
awful.tag.attached_connect_signal(s, "property::layout", function () update_txt_layoutbox(s) end) awful.tag.attached_connect_signal(s, "property::layout", function () update_txt_layoutbox(s) end)
s.mytxtlayoutbox:buttons(awful.util.table.join( s.mytxtlayoutbox:buttons(gears.table.join(
awful.button({}, 1, function() awful.layout.inc(1) end), awful.button({}, 1, function() awful.layout.inc(1) end),
awful.button({}, 3, function() awful.layout.inc(-1) end), awful.button({}, 3, function() awful.layout.inc(-1) end),
awful.button({}, 4, function() awful.layout.inc(1) end), awful.button({}, 4, function() awful.layout.inc(1) end),

View file

@ -222,7 +222,7 @@ function theme.at_screen_connect(s)
s.mytxtlayoutbox = wibox.widget.textbox(theme["layout_txt_" .. awful.layout.getname(awful.layout.get(s))]) s.mytxtlayoutbox = wibox.widget.textbox(theme["layout_txt_" .. awful.layout.getname(awful.layout.get(s))])
awful.tag.attached_connect_signal(s, "property::selected", function () update_txt_layoutbox(s) end) awful.tag.attached_connect_signal(s, "property::selected", function () update_txt_layoutbox(s) end)
awful.tag.attached_connect_signal(s, "property::layout", function () update_txt_layoutbox(s) end) awful.tag.attached_connect_signal(s, "property::layout", function () update_txt_layoutbox(s) end)
s.mytxtlayoutbox:buttons(awful.util.table.join( s.mytxtlayoutbox:buttons(gears.table.join(
awful.button({}, 1, function() awful.layout.inc(1) end), awful.button({}, 1, function() awful.layout.inc(1) end),
awful.button({}, 3, function() awful.layout.inc(-1) end), awful.button({}, 3, function() awful.layout.inc(-1) end),
awful.button({}, 4, function() awful.layout.inc(1) end), awful.button({}, 4, function() awful.layout.inc(1) end),

View file

@ -205,7 +205,7 @@ theme.volume = lain.widget.alsabar({
volicon:set_image(theme[index]) volicon:set_image(theme[index])
end end
}) })
volicon:buttons(awful.util.table.join ( volicon:buttons(gears.table.join (
awful.button({}, 1, function() awful.button({}, 1, function()
awful.spawn.with_shell(string.format("%s -e alsamixer", awful.util.terminal)) awful.spawn.with_shell(string.format("%s -e alsamixer", awful.util.terminal))
end), end),
@ -404,7 +404,7 @@ function theme.at_screen_connect(s)
-- Create an imagebox widget which will contains an icon indicating which layout we're using. -- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen. -- We need one layoutbox per screen.
s.mylayoutbox = awful.widget.layoutbox(s) s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(awful.util.table.join( s.mylayoutbox:buttons(gears.table.join(
awful.button({ }, 1, function () awful.layout.inc( 1) end), awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 3, function () awful.layout.inc(-1) end), awful.button({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc( 1) end), awful.button({ }, 4, function () awful.layout.inc( 1) end),