Replace deprecated awful.util.table.join w/ gears.table.join
This commit is contained in:
parent
e9de2b426a
commit
9a2c8d4ca8
|
@ -108,7 +108,7 @@ awful.layout.layouts = {
|
|||
--lain.layout.termfair,
|
||||
--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({ modkey }, 1, function(t)
|
||||
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({ }, 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)
|
||||
if c == client.focus then
|
||||
c.minimized = true
|
||||
|
@ -214,7 +214,7 @@ awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s)
|
|||
-- }}}
|
||||
|
||||
-- {{{ Mouse bindings
|
||||
root.buttons(awful.util.table.join(
|
||||
root.buttons(gears.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 +222,7 @@ root.buttons(awful.util.table.join(
|
|||
-- }}}
|
||||
|
||||
-- {{{ Key bindings
|
||||
globalkeys = awful.util.table.join(
|
||||
globalkeys = gears.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 +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,
|
||||
{description = "magnify client", group = "client"}),
|
||||
awful.key({ modkey, }, "f",
|
||||
|
@ -553,7 +553,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 = awful.util.table.join(globalkeys,
|
||||
globalkeys = gears.table.join(globalkeys,
|
||||
-- View tag only.
|
||||
awful.key({ modkey }, "#" .. i + 9,
|
||||
function ()
|
||||
|
@ -599,7 +599,7 @@ for i = 1, 9 do
|
|||
)
|
||||
end
|
||||
|
||||
clientbuttons = awful.util.table.join(
|
||||
clientbuttons = gears.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 +663,7 @@ client.connect_signal("request::titlebars", function(c)
|
|||
|
||||
-- Default
|
||||
-- buttons for the titlebar
|
||||
local buttons = awful.util.table.join(
|
||||
local buttons = gears.table.join(
|
||||
awful.button({ }, 1, function()
|
||||
client.focus = c
|
||||
c:raise()
|
||||
|
|
|
@ -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.
|
||||
-- We need one layoutbox per screen.
|
||||
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({ }, 3, function () awful.layout.inc(-1) end),
|
||||
awful.button({ }, 4, function () awful.layout.inc( 1) end),
|
||||
|
|
|
@ -252,7 +252,7 @@ theme.volume = lain.widget.alsabar({
|
|||
}
|
||||
})
|
||||
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.spawn.with_shell(string.format("%s -e alsamixer", awful.util.terminal))
|
||||
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.
|
||||
-- We need one layoutbox per screen.
|
||||
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({ }, 3, function () awful.layout.inc(-1) end),
|
||||
awful.button({ }, 4, function () awful.layout.inc( 1) end),
|
||||
|
|
|
@ -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.
|
||||
-- We need one layoutbox per screen.
|
||||
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({ }, 3, function () awful.layout.inc(-1) end),
|
||||
awful.button({ }, 4, function () awful.layout.inc( 1) end),
|
||||
|
|
|
@ -174,25 +174,25 @@ theme.mpd = lain.widget.mpd({
|
|||
local musicbg = wibox.container.background(theme.mpd.widget, theme.bg_focus, gears.shape.rectangle)
|
||||
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)))
|
||||
prev_icon:buttons(awful.util.table.join(awful.button({}, 1,
|
||||
prev_icon:buttons(gears.table.join(awful.button({}, 1,
|
||||
function ()
|
||||
awful.spawn.with_shell("mpc prev")
|
||||
theme.mpd.update()
|
||||
end)))
|
||||
next_icon:buttons(awful.util.table.join(awful.button({}, 1,
|
||||
next_icon:buttons(gears.table.join(awful.button({}, 1,
|
||||
function ()
|
||||
awful.spawn.with_shell("mpc next")
|
||||
theme.mpd.update()
|
||||
end)))
|
||||
stop_icon:buttons(awful.util.table.join(awful.button({}, 1,
|
||||
stop_icon:buttons(gears.table.join(awful.button({}, 1,
|
||||
function ()
|
||||
play_pause_icon:set_image(theme.play)
|
||||
awful.spawn.with_shell("mpc stop")
|
||||
theme.mpd.update()
|
||||
end)))
|
||||
play_pause_icon:buttons(awful.util.table.join(awful.button({}, 1,
|
||||
play_pause_icon:buttons(gears.table.join(awful.button({}, 1,
|
||||
function ()
|
||||
awful.spawn.with_shell("mpc toggle")
|
||||
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.
|
||||
-- We need one layoutbox per screen.
|
||||
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({ }, 3, function () awful.layout.inc(-1) end),
|
||||
awful.button({ }, 4, function () awful.layout.inc( 1) end),
|
||||
|
|
|
@ -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.
|
||||
-- We need one layoutbox per screen.
|
||||
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({ }, 3, function () awful.layout.inc(-1) end),
|
||||
awful.button({ }, 4, function () awful.layout.inc( 1) end),
|
||||
|
|
|
@ -110,7 +110,7 @@ theme.cal = lain.widget.calendar({
|
|||
-- Mail IMAP check
|
||||
local mailicon = wibox.widget.imagebox(theme.widget_mail)
|
||||
--[[ 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({
|
||||
timeout = 180,
|
||||
server = "server",
|
||||
|
@ -131,7 +131,7 @@ local mail = lain.widget.imap({
|
|||
-- MPD
|
||||
local musicplr = awful.util.terminal .. " -title Music -g 130x34-320+16 -e ncmpcpp"
|
||||
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({ }, 1, function ()
|
||||
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.
|
||||
-- We need one layoutbox per screen.
|
||||
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({ }, 3, function () awful.layout.inc(-1) end),
|
||||
awful.button({ }, 4, function () awful.layout.inc( 1) end),
|
||||
|
|
|
@ -122,16 +122,16 @@ lain.widget.contrib.task.attach(task, {
|
|||
-- do not colorize output
|
||||
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)
|
||||
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
|
||||
local mailicon = wibox.widget.imagebox(theme.widget_mail)
|
||||
--[[ 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({
|
||||
timeout = 180,
|
||||
server = "server",
|
||||
|
@ -158,7 +158,7 @@ theme.volume = lain.widget.alsabar({
|
|||
-- MPD
|
||||
local musicplr = awful.util.terminal .. " -title Music -g 130x34-320+16 -e ncmpcpp"
|
||||
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({ }, 1, function ()
|
||||
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.
|
||||
-- We need one layoutbox per screen.
|
||||
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({ }, 3, function () awful.layout.inc(-1) end),
|
||||
awful.button({ }, 4, function () awful.layout.inc( 1) end),
|
||||
|
|
|
@ -167,7 +167,7 @@ theme.volume = lain.widget.alsabar({
|
|||
})
|
||||
theme.volume.tooltip.wibox.fg = theme.fg_focus
|
||||
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.spawn.with_shell(string.format("%s -e alsamixer", terminal))
|
||||
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))])
|
||||
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)
|
||||
s.mytxtlayoutbox:buttons(awful.util.table.join(
|
||||
s.mytxtlayoutbox:buttons(gears.table.join(
|
||||
awful.button({}, 1, function() awful.layout.inc(1) end),
|
||||
awful.button({}, 3, function() awful.layout.inc(-1) end),
|
||||
awful.button({}, 4, function() awful.layout.inc(1) end),
|
||||
|
|
|
@ -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))])
|
||||
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)
|
||||
s.mytxtlayoutbox:buttons(awful.util.table.join(
|
||||
s.mytxtlayoutbox:buttons(gears.table.join(
|
||||
awful.button({}, 1, function() awful.layout.inc(1) end),
|
||||
awful.button({}, 3, function() awful.layout.inc(-1) end),
|
||||
awful.button({}, 4, function() awful.layout.inc(1) end),
|
||||
|
|
|
@ -205,7 +205,7 @@ theme.volume = lain.widget.alsabar({
|
|||
volicon:set_image(theme[index])
|
||||
end
|
||||
})
|
||||
volicon:buttons(awful.util.table.join (
|
||||
volicon:buttons(gears.table.join (
|
||||
awful.button({}, 1, function()
|
||||
awful.spawn.with_shell(string.format("%s -e alsamixer", awful.util.terminal))
|
||||
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.
|
||||
-- We need one layoutbox per screen.
|
||||
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({ }, 3, function () awful.layout.inc(-1) end),
|
||||
awful.button({ }, 4, function () awful.layout.inc( 1) end),
|
||||
|
|
Loading…
Reference in New Issue