mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2024-12-22 19:22:32 +00:00
Add mouse-middle-click on layout box icon
Middle-click to go straight to the first layout
This commit is contained in:
parent
fc16b2ed41
commit
17c115d52c
|
@ -227,9 +227,11 @@ function theme.at_screen_connect(s)
|
||||||
s.mylayoutbox = awful.widget.layoutbox(s)
|
s.mylayoutbox = awful.widget.layoutbox(s)
|
||||||
s.mylayoutbox:buttons(my_table.join(
|
s.mylayoutbox:buttons(my_table.join(
|
||||||
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
||||||
|
awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[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),
|
||||||
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
||||||
|
|
||||||
-- Create a taglist widget
|
-- Create a taglist widget
|
||||||
s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons)
|
s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons)
|
||||||
|
|
||||||
|
|
|
@ -319,6 +319,7 @@ function theme.at_screen_connect(s)
|
||||||
s.mylayoutbox = awful.widget.layoutbox(s)
|
s.mylayoutbox = awful.widget.layoutbox(s)
|
||||||
s.mylayoutbox:buttons(my_table.join(
|
s.mylayoutbox:buttons(my_table.join(
|
||||||
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
||||||
|
awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[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),
|
||||||
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
||||||
|
|
|
@ -208,6 +208,7 @@ function theme.at_screen_connect(s)
|
||||||
s.mylayoutbox = awful.widget.layoutbox(s)
|
s.mylayoutbox = awful.widget.layoutbox(s)
|
||||||
s.mylayoutbox:buttons(my_table.join(
|
s.mylayoutbox:buttons(my_table.join(
|
||||||
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
||||||
|
awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[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),
|
||||||
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
||||||
|
|
|
@ -305,6 +305,7 @@ function theme.at_screen_connect(s)
|
||||||
s.mylayoutbox = awful.widget.layoutbox(s)
|
s.mylayoutbox = awful.widget.layoutbox(s)
|
||||||
s.mylayoutbox:buttons(my_table.join(
|
s.mylayoutbox:buttons(my_table.join(
|
||||||
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
||||||
|
awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[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),
|
||||||
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
||||||
|
|
|
@ -271,6 +271,7 @@ function theme.at_screen_connect(s)
|
||||||
s.mylayoutbox = awful.widget.layoutbox(s)
|
s.mylayoutbox = awful.widget.layoutbox(s)
|
||||||
s.mylayoutbox:buttons(my_table.join(
|
s.mylayoutbox:buttons(my_table.join(
|
||||||
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
||||||
|
awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[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),
|
||||||
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
||||||
|
|
|
@ -278,6 +278,7 @@ function theme.at_screen_connect(s)
|
||||||
s.mylayoutbox = awful.widget.layoutbox(s)
|
s.mylayoutbox = awful.widget.layoutbox(s)
|
||||||
s.mylayoutbox:buttons(my_table.join(
|
s.mylayoutbox:buttons(my_table.join(
|
||||||
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
||||||
|
awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[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),
|
||||||
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
||||||
|
|
|
@ -317,6 +317,7 @@ function theme.at_screen_connect(s)
|
||||||
s.mylayoutbox = awful.widget.layoutbox(s)
|
s.mylayoutbox = awful.widget.layoutbox(s)
|
||||||
s.mylayoutbox:buttons(my_table.join(
|
s.mylayoutbox:buttons(my_table.join(
|
||||||
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
||||||
|
awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[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),
|
||||||
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
||||||
|
|
|
@ -231,6 +231,7 @@ function theme.at_screen_connect(s)
|
||||||
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(my_table.join(
|
s.mytxtlayoutbox:buttons(my_table.join(
|
||||||
awful.button({}, 1, function() awful.layout.inc(1) end),
|
awful.button({}, 1, function() awful.layout.inc(1) end),
|
||||||
|
awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[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),
|
||||||
awful.button({}, 5, function() awful.layout.inc(-1) end)))
|
awful.button({}, 5, function() awful.layout.inc(-1) end)))
|
||||||
|
|
|
@ -227,6 +227,7 @@ function theme.at_screen_connect(s)
|
||||||
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(my_table.join(
|
s.mytxtlayoutbox:buttons(my_table.join(
|
||||||
awful.button({}, 1, function() awful.layout.inc(1) end),
|
awful.button({}, 1, function() awful.layout.inc(1) end),
|
||||||
|
awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[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),
|
||||||
awful.button({}, 5, function() awful.layout.inc(-1) end)))
|
awful.button({}, 5, function() awful.layout.inc(-1) end)))
|
||||||
|
|
|
@ -408,6 +408,7 @@ function theme.at_screen_connect(s)
|
||||||
s.mylayoutbox = awful.widget.layoutbox(s)
|
s.mylayoutbox = awful.widget.layoutbox(s)
|
||||||
s.mylayoutbox:buttons(my_table.join(
|
s.mylayoutbox:buttons(my_table.join(
|
||||||
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
||||||
|
awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[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),
|
||||||
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
||||||
|
|
Loading…
Reference in a new issue