You are not logged in.

#1 2014-09-24 23:38:30

Savolae
Member
Registered: 2014-09-16
Posts: 13

Warping cursor to other screen in Awesome, when reaching screen edge

I'm using xfce with awesome as window manager. One of the most annoying "feature" in xfce is that desktop icons are always in the left screen. Because I'm using Awesome, I can't move icons manually to the right screen and because of xfdesktop's nature Awesome can't set it to spawn only to one screen or to set coordinates.

Setting right screen to left in config sets desktop icons to the correct screen but this has the obvious disadvantage. I started thinking is possible for Awesome to counter this behavior by controlling where cursor warps to the other screen. Like when cursor reached right screen's left edge, it would appear in left screen's right edge (and vice versa) and when it reached right screen's right edge, it would stay in that screen (and similarly in left screen).

what I managed to produce is following in Awesome's config (I can set correct values for all edges when basics work):

mousegrabber.run(function (mouse)
    if mouse.x == 0 then
       mouse.coords({x=200, y=200}, silent)
    return true 
    end
    return true
end, "fleur")

It manages to listen the mouse, but it doesn't however work anywhere near as intended. Only thing it does is change mouse cursor to ugly when starting awesome and to normal when cursor reaches left edge of the right screen. In the meanwhile mouse doesn't interact anymore with anything else.
What I'd want the script do is:
1.) warp when cursor to the set coordinates when it reaches the edge
2.) stay always on (now it exits when edge is reached)
3.) Awesome to work normally when mouse is listened
4.) Cursor to stay normal (this probably can be done by modifying the files)

how should the script be modified to achieve aforementioned?

Also if anyone has any other ideas about how to get xfce's desktop (not some dock widgets) to behave properly, I'd be glad to hear them.

Offline

#2 2014-09-25 18:57:20

Savolae
Member
Registered: 2014-09-16
Posts: 13

Re: Warping cursor to other screen in Awesome, when reaching screen edge

After a lot of hassle and searching I found much simpler and better solution to my problem. In Xfce xfdesktop uses xfwm4 for moving icons. But for some other desktops, a file manager handles the whole thing and they work well under Awesome. I tried Nautilus and pcmanfm and I don't really have anything bad to say from the later one, it works quite perfectly under Awesome.

Last edited by Savolae (2014-09-25 18:57:47)

Offline

Board footer

Powered by FluxBB