hot corners?

I swear I ran across someone asking this before, but I couldn’t find anything in my searching.

Is it possible to have hot corners in fvwm? By that I mean, if you hover your mouse in the corner of the screen after a few seconds a command will launch.

I’m not sure how to accomplish such a thing by just using fvwm, or if it is possible.

Not as such. What you could do is something like this:

EdgeCommand Left FvwmRunCommand $[pointer.x] $[pointer.y]
EdgeCommand Top FvwmRunCommand $[pointer.x] $[pointer.y]

That’ll set up FVWM to react to something when the cursor hits the left or top edge of the screen. Of course, at the moment, this affects anywhere along the top or left side of the screen. So you’ll have to test for the cursor position, as in:

DestroyFunc FvwmRunCommand
AddToFunc   FvwmRunCommand
+ I PipeRead `[ $0 == 0 ]  && [ $1 == 0 ] && echo "Schedule 500 Exec exec my command"`

Hence, the above function checks to see whether the cursor’s position was in the very far left corner (which the top and left edge of the screen defines).

Again, for the top-right edge, you could still have to define an EdgeCommand for Top, but also for Right this time, and will then have to check to ensure the $[pointer.y] position is equal to $[vp.x], likewise for the other corners.

There are some issues with this though: the main one is that this method really does mean in the corner of a window, which of course is a little cumbersome.

What would be nice perhaps, is a “ActiveCommand” command to FvwmButtons that triggered a command when the mouse hovered over a button – that way, you could easily accomplish this by placing a FvwmButtons instance in each corner of the screen, perhaps transparent with no border. I might look into this.

Note, as an intentional effect that the above functions pass in the cursor position. This is important since when a complex functioon is executed, the pointer is grabbed. When this happens, the cursor position could be completely different to when it starts.

– Thomas Adam

Awesome. I will definitely need to work some of this into my config and see how it works.

I was also thinking about the button approach, but didn’t know you could launch a command on hover. Is it possible to set a delay timer to this as well, since the goal is to have the pointer sit there for a few seconds first?

I think the first method you wrote about it the most intriguing one, so I will start with that and see how it goes.

Thanks as always Thomas!

You can’t do this with FvwmButtons currently. At best, you can only approximate it given my somewhat crude solution.

No – not really. That’s why you’d have to use Schedule. It’s definitely a bit of a kludge.

– Thomas Adam

Well, now you can (sort of). Currently there’s no timeout value to run actions after a delay, but see:


– Thomas Adam

Very cool… when I get a chance I’ll try out the patch!