You are not logged in.

#1 2013-06-12 20:25:30

wujek.srujek
Member
Registered: 2013-06-12
Posts: 38

detect mouse entering screen corners and perform action

This is my first post here so: hello, world!
I am a recent convert from the Debian-land (mostly *buntu) and I like Arch a lot. I am especially impressed with pacman and your wiki - it's the best I've seen. Keep up the great work!

I have a usability question. I am using Openbox with tint2 and it doesn't have a 'show desktop' key. I thought maybe I can do it myself, and I came up with the idea that moving the mouse to the top left corner would do exactly that. I am struggling, the best I've come up with is the following (super+d is my openbox shortcut for the ShowDesktop action):

xautolock -locker 'xdotool key "super+d"' -corners +000 -cornerdelay 1 -cornerredelay 999999 &

It has a few problems:
1. it uses xautolock, which seems strange because it should normally lock the screen
2. I can't seem to make it work to perform the action immediately; -cornerdelay 0 feels slightly longer than 1, -cornerdelay 1 is still quite long, and fractions like 0.1 seem not to be supported
3. it has the concept of repeating the action if the mouse stays in the corner, that's why I use the impossibly high redelay
4. it seems I can start only one xautolock process at a time, but what if I want to start skippy if I move the mouse to the other corner? I could write a script that is called as the locker and that checks the mouse position to call this or that, but this gets even uglier

It kind of works, but I don't really like it. Is there anything better I could use? Maybe there is a small app for that somewhere, by someone? Any thought?

wujek

Offline

#2 2013-06-13 01:14:07

obguy
Member
Registered: 2013-06-13
Posts: 1

Re: detect mouse entering screen corners and perform action

Hi wujek. First post for me as well.  This solution doesn't exactly address what you're asking about, but the tint2 site has a simple modification which allows you to click on the clock in the panel to as a "show desktop" action:

https://code.google.com/p/tint2/wiki/FA … op'_button

obguy

Offline

#3 2013-06-13 01:24:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,552
Website

Re: detect mouse entering screen corners and perform action

Tint2 has launchers.  You can use any image of your chosing (find a "desktop" image) and launch arbitrary commands (like telling openbox to show the desktop).
Or at least tin2-svn has launchers, but I suspect it's made it into the official version by now.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB