Skip to content

Throw mouse pointer to new focused windows #25

Closed
@vinipsmaker

Description

Hi, it'd be nice to have an option that throws mouse pointer to the newly focused windows. I'm new to awesome (and lua) and my attempt seems to be broken:

awful.key({ modkey,           }, "Tab",
   function (c)
      local filters = {
         cyclefocus.filters.same_screen,
         cyclefocus.filters.common_tag,
         function (c)
            return c.instance ~= c.screen.quakeconsole.name
         end,
      }
      cyclefocus.cycle({modifier="Super_L", cycle_filters = filters})
      --awful.client.focus.history.previous()
      if client.focus then
         client.focus:raise()
         local npos = client.focus:geometry()
         npos.x = npos.x + npos.width / 2
         npos.y = npos.y + npos.height / 2
         mouse.coords(npos)
      end
   end,
   {description = "go back", group = "client"}),

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions