mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2024-12-22 19:22:32 +00:00
Merge pull request #216 from cool-cool-sweat/master
Replace deprecated awful.util.table.join w/ gears.table.join + handle client borders when un/maximising
This commit is contained in:
commit
633c344ecc
|
@ -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()
|
||||||
|
@ -711,14 +711,16 @@ client.connect_signal("mouse::enter", function(c)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- No border for maximized clients
|
-- No border for maximized clients
|
||||||
client.connect_signal("focus",
|
function border_adjust(c)
|
||||||
function(c)
|
if c.maximized then -- no borders if only 1 client visible
|
||||||
if c.maximized then -- no borders if only 1 client visible
|
c.border_width = 0
|
||||||
c.border_width = 0
|
elseif #awful.screen.focused().clients > 1 then
|
||||||
elseif #awful.screen.focused().clients > 1 then
|
c.border_width = beautiful.border_width
|
||||||
c.border_width = beautiful.border_width
|
c.border_color = beautiful.border_focus
|
||||||
c.border_color = beautiful.border_focus
|
end
|
||||||
end
|
end
|
||||||
end)
|
|
||||||
|
client.connect_signal("focus", border_adjust)
|
||||||
|
client.connect_signal("property::maximized", border_adjust)
|
||||||
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
|
@ -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),
|
||||||
|
|
|
@ -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),
|
||||||
|
|
|
@ -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),
|
||||||
|
|
|
@ -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),
|
||||||
|
|
|
@ -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),
|
||||||
|
|
|
@ -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),
|
||||||
|
|
|
@ -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),
|
||||||
|
|
|
@ -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),
|
||||||
|
|
|
@ -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),
|
||||||
|
|
|
@ -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),
|
||||||
|
|
Loading…
Reference in a new issue