sawfish.wm.ext.hot-spots.jl availabe now (attached).



Hi all,

a long time (~ 4 years ago) I found some application for X11 which does the following:

Then the pointer hit one of the screen-corners it executed a command. While working on
toggle-or-exec, I remembered it, and thought something like this would be nice to have.

So here it is: hot-spots.jl (requires edge-flip enabled!).

- 8 hot-spots:
 __   ____________   ___
|top-left  top          | top-right        

|                       |
| left            right |
|                       |
                           
|__  ______________  ___| bottom-right
bottom-left bottom 

corners are 200 px along the border, and 5 px inside the screen
eg: if the screen is 1600x900 then bottom-right is:

x is 1400 to 1600 while y is 895 to 900
AND
x is 1595 to 1600 while y is 700 to 900

one might think that the tolerance of 5 is not required, as the bottom-right corner is at
1600x900... nope it's not. Here sawfish sees the bottom-right corner at 1599x899
(screen-width and screen-height are ok, it's just either flipping or query-pointer).

anything px left are the long sides.

- exports utility function get-cursor-position. returns 'top-left, 'top-right,
  'bottom-left or 'bottom-right. (see above)

- supports both calling functions and applications.

- options can be found in SawfishConfig in Workspace > Hot Spots.

HS (Hot Spots) interaction with ID and EF (Infinite Desktop/Edge Flip):

interaction is possible. As already said, EF must be enabled for HS to work.
All you need to do for proper interactions is to check your configuration:

- hot-spot-delay is ideally at least smaller than edge-flip-delay by 100 (default
  EF-delay is 250 and default HS-delay 150, so defaults are good). The difference depends
  on your reaction-time. So play around with it a bit until you can activate the hot
  spots without always flipping the screen.

- only use the corners when using traditional EF or ID (so you can flip via the bigger
  borders normally)

Comments welcome. 

Have Fun!
Chris

Attachment: hot-spots.jl
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]