diff --git a/themes/blackburn/theme.lua b/themes/blackburn/theme.lua index 16f5a70..cfc209d 100644 --- a/themes/blackburn/theme.lua +++ b/themes/blackburn/theme.lua @@ -5,11 +5,13 @@ --]] -local gears = require("gears") -local lain = require("lain") -local awful = require("awful") -local wibox = require("wibox") -local os = { getenv = os.getenv } +local gears = require("gears") +local lain = require("lain") +local awful = require("awful") +local wibox = require("wibox") + +local os = { getenv = os.getenv } +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local theme = {} theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/blackburn" @@ -222,7 +224,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(gears.table.join( + s.mylayoutbox:buttons(my_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), diff --git a/themes/copland/theme.lua b/themes/copland/theme.lua index 7484a01..703460d 100644 --- a/themes/copland/theme.lua +++ b/themes/copland/theme.lua @@ -5,12 +5,14 @@ --]] -local gears = require("gears") -local lain = require("lain") -local awful = require("awful") -local wibox = require("wibox") -local os = { getenv = os.getenv, setlocale = os.setlocale } +local gears = require("gears") +local lain = require("lain") +local awful = require("awful") +local wibox = require("wibox") + +local os = { getenv = os.getenv, setlocale = os.setlocale } local awesome, client = awesome, client +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local theme = {} theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/copland" @@ -252,7 +254,7 @@ theme.volume = lain.widget.alsabar({ } }) theme.volume.tooltip.wibox.fg = theme.fg_focus -theme.volume.bar:buttons(gears.table.join ( +theme.volume.bar:buttons(my_table.join ( awful.button({}, 1, function() awful.spawn.with_shell(string.format("%s -e alsamixer", awful.util.terminal)) end), @@ -316,7 +318,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(gears.table.join( + s.mylayoutbox:buttons(my_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), diff --git a/themes/dremora/theme.lua b/themes/dremora/theme.lua index c1eff2a..4f30a97 100644 --- a/themes/dremora/theme.lua +++ b/themes/dremora/theme.lua @@ -5,11 +5,13 @@ --]] -local gears = require("gears") -local lain = require("lain") -local awful = require("awful") -local wibox = require("wibox") -local os = { getenv = os.getenv } +local gears = require("gears") +local lain = require("lain") +local awful = require("awful") +local wibox = require("wibox") + +local os = { getenv = os.getenv } +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local theme = {} theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/dremora" @@ -204,7 +206,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(gears.table.join( + s.mylayoutbox:buttons(my_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), diff --git a/themes/holo/theme.lua b/themes/holo/theme.lua index b33b0da..2d28dc0 100644 --- a/themes/holo/theme.lua +++ b/themes/holo/theme.lua @@ -5,12 +5,14 @@ --]] -local gears = require("gears") -local lain = require("lain") -local awful = require("awful") -local wibox = require("wibox") +local gears = require("gears") +local lain = require("lain") +local awful = require("awful") +local wibox = require("wibox") + local string = string -local os = { getenv = os.getenv } +local os = { getenv = os.getenv } +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local theme = {} theme.default_dir = require("awful.util").get_themes_dir() .. "default" @@ -174,25 +176,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(gears.table.join(awful.button({ }, 1, +musicwidget:buttons(my_table.join(awful.button({ }, 1, function () awful.spawn(theme.musicplr) end))) -prev_icon:buttons(gears.table.join(awful.button({}, 1, +prev_icon:buttons(my_table.join(awful.button({}, 1, function () awful.spawn.with_shell("mpc prev") theme.mpd.update() end))) -next_icon:buttons(gears.table.join(awful.button({}, 1, +next_icon:buttons(my_table.join(awful.button({}, 1, function () awful.spawn.with_shell("mpc next") theme.mpd.update() end))) -stop_icon:buttons(gears.table.join(awful.button({}, 1, +stop_icon:buttons(my_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(gears.table.join(awful.button({}, 1, +play_pause_icon:buttons(my_table.join(awful.button({}, 1, function () awful.spawn.with_shell("mpc toggle") theme.mpd.update() @@ -303,7 +305,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(gears.table.join( + s.mylayoutbox:buttons(my_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), diff --git a/themes/multicolor/theme.lua b/themes/multicolor/theme.lua index 426b254..d67b985 100644 --- a/themes/multicolor/theme.lua +++ b/themes/multicolor/theme.lua @@ -5,12 +5,13 @@ --]] - local gears = require("gears") local lain = require("lain") local awful = require("awful") local wibox = require("wibox") -local os = { getenv = os.getenv, setlocale = os.setlocale } + +local os = { getenv = os.getenv, setlocale = os.setlocale } +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local theme = {} theme.confdir = os.getenv("HOME") .. "/.config/awesome/themes/multicolor" @@ -268,7 +269,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(gears.table.join( + s.mylayoutbox:buttons(my_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), diff --git a/themes/powerarrow-dark/theme.lua b/themes/powerarrow-dark/theme.lua index 797d364..2e6dec9 100644 --- a/themes/powerarrow-dark/theme.lua +++ b/themes/powerarrow-dark/theme.lua @@ -9,7 +9,9 @@ local gears = require("gears") local lain = require("lain") local awful = require("awful") local wibox = require("wibox") -local os = { getenv = os.getenv } + +local os = { getenv = os.getenv } +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local theme = {} theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/powerarrow-dark" @@ -110,7 +112,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(gears.table.join(awful.button({ }, 1, function () awful.spawn(mail) end))) +mailicon:buttons(my_table.join(awful.button({ }, 1, function () awful.spawn(mail) end))) local mail = lain.widget.imap({ timeout = 180, server = "server", @@ -131,7 +133,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(gears.table.join( +mpdicon:buttons(my_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 +277,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(gears.table.join( + s.mylayoutbox:buttons(my_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), diff --git a/themes/powerarrow/theme.lua b/themes/powerarrow/theme.lua index 87a23e9..547e56f 100644 --- a/themes/powerarrow/theme.lua +++ b/themes/powerarrow/theme.lua @@ -9,7 +9,9 @@ local gears = require("gears") local lain = require("lain") local awful = require("awful") local wibox = require("wibox") + local os, math, string = os, math, string +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local theme = {} theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/powerarrow" @@ -122,16 +124,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(gears.table.join(awful.button({}, 1, lain.widget.contrib.task.prompt))) +task:buttons(my_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(gears.table.join(awful.button({}, 1, function() awful.spawn("xsel | xsel -i -b") end))) +scissors:buttons(my_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(gears.table.join(awful.button({ }, 1, function () awful.spawn(mail) end))) +mailicon:buttons(my_table.join(awful.button({ }, 1, function () awful.spawn(mail) end))) local mail = lain.widget.imap({ timeout = 180, server = "server", @@ -158,7 +160,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(gears.table.join( +mpdicon:buttons(my_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 +313,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(gears.table.join( + s.mylayoutbox:buttons(my_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), diff --git a/themes/rainbow/theme.lua b/themes/rainbow/theme.lua index fbd64f7..5b34a68 100644 --- a/themes/rainbow/theme.lua +++ b/themes/rainbow/theme.lua @@ -9,7 +9,9 @@ local gears = require("gears") local lain = require("lain") local awful = require("awful") local wibox = require("wibox") -local os = { getenv = os.getenv } + +local os = { getenv = os.getenv } +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local theme = {} theme.default_dir = require("awful.util").get_themes_dir() .. "default" @@ -167,7 +169,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(gears.table.join ( +theme.volume.bar:buttons(my_table.join ( awful.button({}, 1, function() awful.spawn.with_shell(string.format("%s -e alsamixer", terminal)) end), @@ -228,7 +230,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(gears.table.join( + s.mytxtlayoutbox:buttons(my_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), diff --git a/themes/steamburn/theme.lua b/themes/steamburn/theme.lua index b08bf0f..0056979 100644 --- a/themes/steamburn/theme.lua +++ b/themes/steamburn/theme.lua @@ -9,7 +9,9 @@ local gears = require("gears") local lain = require("lain") local awful = require("awful") local wibox = require("wibox") -local os = { getenv = os.getenv } + +local os = { getenv = os.getenv } +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local theme = {} theme.zenburn_dir = require("awful.util").get_themes_dir() .. "zenburn" @@ -222,7 +224,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(gears.table.join( + s.mytxtlayoutbox:buttons(my_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), diff --git a/themes/vertex/theme.lua b/themes/vertex/theme.lua index ac2eac8..b90738b 100644 --- a/themes/vertex/theme.lua +++ b/themes/vertex/theme.lua @@ -1,7 +1,7 @@ --[[ - Vertex Awesome WM theme - github.com/lcpz + Vertex Awesome WM theme + github.com/lcpz --]] @@ -11,6 +11,7 @@ local awful = require("awful") local wibox = require("wibox") local math, string, tag, tonumber, type, os = math, string, tag, tonumber, type, os +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local theme = {} theme.default_dir = require("awful.util").get_themes_dir() .. "default" @@ -205,7 +206,7 @@ theme.volume = lain.widget.alsabar({ volicon:set_image(theme[index]) end }) -volicon:buttons(gears.table.join ( +volicon:buttons(my_table.join ( awful.button({}, 1, function() awful.spawn.with_shell(string.format("%s -e alsamixer", awful.util.terminal)) end), @@ -404,7 +405,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(gears.table.join( + s.mylayoutbox:buttons(my_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),