0

How to make Alt + mouse Scroll to run awful.tag.viewnext and awful.tag.viewprev, having mouse position anywhere ? I tried:

 root.buttons(gears.table.join(
    awful.button({ }, 3, function () mymainmenu:toggle() end),
    awful.button({"Alt" }, 4, awful.tag.viewnext),
    awful.button({"Alt" }, 5, awful.tag.viewprev)
))

But it dosent works.

StackUser
  • 243
  • 2
  • 19

2 Answers2

2

root.buttons only works if your cursor is outside of any window. When over a client, you have to add the keybinding to the client. There is an extra section for that somewhere in the config (there are button bindings in there to focus the client when you click it). You have to add the button in both places.

Uli Schlachter
  • 9,337
  • 1
  • 23
  • 39
1

Still cant use Alt. But it works with modkey. Here how i made it:

root.buttons(gears.table.join(
    awful.button({ }, 3, function () mymainmenu:toggle() end),
    awful.button({ modkey }, 5, awful.tag.viewnext),
    awful.button({ modkey }, 4, awful.tag.viewprev)
))
...
clientbuttons = gears.table.join(
    awful.button({ modkey }, 5,   function(t) awful.tag.viewnext(1) end),
    awful.button({ modkey }, 4,   function(t) awful.tag.viewprev(1) end),
    ...
StackUser
  • 243
  • 2
  • 19