The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

Is there any way to use "hot corners" to execute a command?

asked 2015-05-29 14:41:42 +0000

curious_one gravatar image

I'd like to be able to trigger an action (exec) by moving the mouse to a corner. I think this would be handy, for example, to trigger skippy-xd for functionality similar to gnome-shell.

Is this possible in i3?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-05-29 17:00:52 +0000

Airblader gravatar image

No, i3 does not offer anything like that. However, you can use xdotool to do that. Check out man xdotool for behave_screen_edge. Excerpt:

Examples:
        # Activate google-chrome when you move the mouse to the bottom-left corner:
        xdotool behave_screen_edge bottom-left \
          search --class google-chrome windowactivate

        # Go to the next workspace (right). Known to work in GNOME (metacity and compiz)
        xdotool behave_screen_edge --delay 500 bottom-right key XF86Forward

        # Activate firefox and do a web search in a new tab for text in your clipboard
        xdotool behave_screen_edge --delay 1000 top-left \
            search --classname Navigator \
            windowactivate --sync key --delay 250 ctrl+t ctrl+k ctrl+v Return

Note that this only works on the corners of the root window, so if you use multiple outputs, it may not be quite as useful depending on your setup.

edit flag offensive delete link more

Comments

That works well on my laptop's display. Unfortunately, I'm using external monitors about 90% of the time, and I cannot get xdotool to do anything with 'behave_screen_edge' on those monitors. Thanks for the tip though; xdotool looks like a very useful tool for i3 users.

curious_one gravatar imagecurious_one ( 2015-05-30 02:33:25 +0000 )edit

I wrote a tool called xedgewarp which could do this even with external monitors. It would have to be implemented, though.

Airblader gravatar imageAirblader ( 2015-05-30 10:25:00 +0000 )edit

@Airblader Sounds interesting. Do you have it on github or anything?

curious_one gravatar imagecurious_one ( 2015-06-04 18:34:28 +0000 )edit

Yep :) https://github.com/Airblader/xedgewarp I already opened this as an issue as well.

Airblader gravatar imageAirblader ( 2015-06-04 18:44:49 +0000 )edit

Question Tools

Stats

Asked: 2015-05-29 14:41:42 +0000

Seen: 248 times

Last updated: May 29