#303 mouse location as key (hot corners/active edges)

open
nobody
None
5
2014-08-20
2011-12-10
Anonymous
No

It would be pretty sweet if we could use mouse location as a key.

The most simple form would be:

OnRight MouseOver :TakeToNextWorkspace
OnBottomRight Mouse1 :Exec x-terminal-emulator

Including a duration would be better, but the keys file doesn't appear to take arguments on keys or modifiers. A simple solution would be pre-set duration modifiers like OneSecond, TwoSeconds, ... TenSeconds, ThirtySeconds, OneMinute. Ideally duration could be a modifier with an argument:

OnRight OneSecond MouseOver :TakeToNextWorkspace
OnTopRight Duration(1s) MouseOver :TakeToNextWorkspace
OnBottomLeft MouseOver(1s) :RootMenu

I think it would be robust enough if you could specify the mouse position by a rectangle or circle and by pixels or percent relative to either side of the screen. Again, the functionality appears to be lacking for parameters to keys:

InGeometry(rectangle) Duration(time) MouseOver :cmd
InCircle(circle) Duration(time) MouseOver :cmd

'rectangle' could be defined in many ways, like two points {X,Y} {X,Y} or point-and-offsets XxY+X+Y. Coordinates could be done in pixels or % of screen and negative numbers would start from the opposite edge. {-0,-0} {-10,-10} would be a 10x10 in the bottom right corner. {0x0} {1%x1%} would be a 1% square in the top left corner.

'circle' could be defined by a point and a radius. Both point and radius could be percentage of total screen. Negatives on the point would flip the axis. {50%x50%x1%} would be a circle with radius 1% of the screen right in the center.

For example:

InGeometry(0x0+5+5) Duration(1s) MouseOver :Exec /usr/local/bin/one_second_in_topright
InCircle(0x0x5%) MouseOver :Exec lockscreen

It would be so cool. I'd like to mute and screensaver after 30 seconds if I mouse up in the corner and walk away.

Discussion

  • Mathias Gumz

    Mathias Gumz - 2012-12-12

    i would rather define the "hot-zones" in .fluxbox/init and then have one OnHotX modifier in .fluxbox/keys. i implemented once a tiny tool called "akwarp" which did the hotzones via "mouse position polling". an alternative version would use input-only windows, allthough there might be issues with layers etc, so maybe polling is good enough.

     
  • Andre Barros

    Andre Barros - 2013-01-17

    "Hot-zones" is a pretty good answer for lots of problems I think. I would like to use it to switch to already running applications or to run some commands if the mouse stay stand on some zones for an specified amount of time.

    It seems to me that the window manager is the right place to have this feature as it may receive and check events without disturbing the events regularly processed by applications, i.e., to make an application to process "mouse position polling" and them make them send events to X11 or to the window manager or, worst, to adapt applications we would like to respond to these 'Hot-zones" to do the polling themselves.

    Also, after all, almost all functionalities needed are already there.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks