Fer's blog
fer, ferulo, that crazy man

Mon, 26 Jun 2006

Hacking at GUADEC

Really nice GUADEC week here in Vilanova. Interesting talks and meetings. Of course, lot of party and hacking. Yesterday, with the help of Lorenzo Gil I added support to pygtk to report a bug with bug-buddy when an exception happens. Today Arturo, Antonio and me hacked a little application using the hdaps driver for IBM sensor to do funy things with compiz: gtollina.c: (click on it to watch the video)


Notice that this is version 0.1 (Codenamed "Lorenzo nos va a hacer un Gazpacho en la GUADEC")

[16:39] | Permalink | 30 comments

Posted by Gonzalo Esparza at Sun Aug 27 06:49:08 2006
Great

Posted by Atomic at Fri Oct 6 07:30:37 2006
I can see a practical joke coming out of that.
One day when your computer illiterate friend/co-worker gets up and leave their computer, you can switch the workspace. When they get back and become fustrated that their work seems to of gone missing they'll hit the computer and low-and-behold their work will re-appear like magic. Either that or you can come to the rescue and charge them $100 for your expertise in "fixing" the computer by hitting it :P

Posted by Inconexo at Fri Dec 15 18:12:59 2006
Cool.

But I must say that it seems to be switched the left and right. If the screen is hit in the right, the right virtual desktop should be selected. If it is hit on the left, the left one.

This way, it would 'follow the physic laws', and the effect would be nicer.

Posted by drey at Mon Jan 8 11:02:44 2007
Hi,

quite impressive, is your haxx available somewhere?

Thank You, drey

Posted by massimo De Filippi at Sat Jan 27 04:22:11 2007
io

Posted by davide at Wed Jul 25 00:41:08 2007
I correctly compiled your gtollina...
I launced the executable... and then:
No position detection suport!

delusion! I'll buy a notebook with this stuff...
a gtollina addicted

Posted by thoand at Thu Oct 4 15:01:00 2007
hey,

I use compiz-fusion on a thinkpad.

I started your gtollina an it says "X was -502, current X is -529, so going RIGHT" so it seems to work, but nothing happens. I looked in the source code and I think the problem is something dbus related. I have no idea how to test this dbus calls by hand or, what to do else.

Posted by miketl at Sun Oct 21 11:11:35 2007
Works for me on Ubuntu Gutsy using this for the rotate function:

void
rotate (int direction)
{
DBusGConnection *bus;
DBusGProxy *proxy;
GError *error = NULL;

char *ofc = "org.freedesktop.compiz";

// Get the root window id.
Display *display = XOpenDisplay(NULL);
int screen = DefaultScreen(display);
int window = RootWindow(display, screen);

bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);

if (direction == LEFT) {
proxy = dbus_g_proxy_new_for_name (bus, ofc,
"/org/freedesktop/compiz/rotate/allscreens/rotate_left",
ofC
);
} else if (direction == RIGHT) {
proxy = dbus_g_proxy_new_for_name (bus, ofc,
"/org/freedesktop/compiz/rotate/allscreens/rotate_right",
ofc
);
}

dbus_g_proxy_call_no_reply (proxy, "activate",
G_TYPE_STRING, "root",
G_TYPE_INT, window,
G_TYPE_INVALID);
}

Posted by miketl at Sun Oct 21 11:13:31 2007
Forgot to mention, you have to include:
#include <X11/Xlib.h>

Thanks for the fun program!

Posted by thoand at Wed Oct 24 21:23:04 2007
how can I find out which calls rotate my screen? the gutsy version didn't work for me too.

Posted by alcor at Wed Jan 23 14:07:34 2008
working "fine" with miketl rotate function on my gutsy + Thinkpad Z61p. "fine" because it's difficult to find the perfect value to get a good result.
it's probably more efficient on a ultra portable laptop than on my heavy 15,4" wide laptop.
sometime rotating the wrong direction, sometime not rotating, sometime rotating when not hiting the laptop... anyway that's a fun app! ;o)

alcor

Posted by Day at Tue May 6 18:18:39 2008
"Forgot to mention, you have to include:
#include <X11/Xlib.h>"
It didn`t work (

Posted by PowerGirl at Wed Aug 6 22:08:34 2008
HI!!
This is soooo cool!!
I have Thinkpad z61t and the latest Hardy Heron 8.04 running on it. Was wondering if i can do this thing on my comp too..
If so.. can you give me the basic directions!? PLZ!

Thanks
~PowerGirl

Posted by Computer Repair Toronto at Fri Jul 24 06:41:56 2009
Computer Repair Toronto and Computer Service Toronto A 2 Z PC.
http://www.a2zpc.ca

Posted by computer service toronto at Sun Aug 16 06:46:10 2009
thanks for everything

Posted by Laptop battery at Tue Sep 29 06:22:27 2009
Good stuff,thanks for sharing.

Posted by anal bondage at Sat Nov 7 07:27:57 2009
But I must say that it seems to be switched the left and right. If the screen is hit in the right, the right virtual desktop should be selected. If it is hit on the left, the left one

Posted by Acheter Caverta at Sun Nov 8 07:35:51 2009
Very good site. Thanks!

Posted by Social Bookmark Submission services at Sat Nov 14 07:50:04 2009
We make sure that you completely understand the impact and the effectiveness of our social bookmarking submission service, by offering you a free submission

Posted by Liath at Wed Nov 18 09:57:49 2009
I updated miketl's update to get it to work with my setup. I believe the need for _key is a Gnome thing, not sure though.

void
rotate (int direction)
{
DBusGConnection *bus;
DBusGProxy *proxy;
GError *error = NULL;

char *ofc = "org.freedesktop.compiz";

// Get the root window id.
Display *display = XOpenDisplay(NULL);
int screen = DefaultScreen(display);
int window = RootWindow(display, screen);

bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);

if (direction == LEFT) {
proxy = dbus_g_proxy_new_for_name (bus, ofc,
"/org/freedesktop/compiz/rotate/allscreens/rotate_left_key",
ofC
);
} else if (direction == RIGHT) {
proxy = dbus_g_proxy_new_for_name (bus, ofc,
"/org/freedesktop/compiz/rotate/allscreens/rotate_right_key",
ofc
);
}

dbus_g_proxy_call_no_reply (proxy, "activate",
G_TYPE_STRING, "root",
G_TYPE_INT, window,
G_TYPE_INVALID);
}

Posted by Penis Enlargement at Thu Nov 19 10:18:53 2009
I thing I naver see type website before its very informative for me. I also want to  ask u some thing You make more this type blog where we can get more knowledge. and any one tell me how can I find this type blog. http://www.penisenlargementz.com

Posted by youtube music at Mon Nov 30 15:09:14 2009
hey how you doing! Nice posting

Posted by youtube videos at Wed Dec 2 20:08:36 2009
Nice blog, its great article informative post, thanks for sharing it. Thanks for the information!

Posted by buy viagra online at Fri Dec 4 12:24:15 2009
Good post, thanks!

Posted by penis enlargement at Tue Dec 8 22:51:47 2009
Natural Herbalz Offers wide range FDA and WHO approved products for male enhancement, penis enhancement, male enlargement, penis enlargement, premature ejaculation, erection and impotence treatment at www.naturalherbalz.com

Posted by term paper writing at Fri Feb 12 08:38:54 2010
I updated the miketl update get it to work with my settings. I believe that, _key is needed is a dwarf thing, but not sure.

Posted by coursework help at Fri Feb 12 08:41:39 2010
A good blog, its great wealth post articles, thanks to share it. Thank you for your message!

Posted by coursework writing at Fri Feb 12 08:43:51 2010
How do I know if my phone rotate the screen? The version in gutsy does not work for me

Posted by CaliPlus at Sun Feb 14 15:06:55 2010
Interesting blog, the author thanks so much for the interesting explanation!
Keep it up, great success! Bloggy wish a lot of good posts!

Posted by Provillus at Mon Feb 15 20:53:46 2010
Provillus - Rated NO.1 Hair Loss Treatment on the Market! For more information visitProvillus Official Site CLICK HER E!!! Money Back Guarantee! www.Managehairloss.com

This blog has been moved to: http://blogs.gnome.org/fherrera
Please, update your bookmarks and feeds


About

Fernando Herrera


Recently...
< June 2006 >
SuMoTuWeThFrSa
     1 2 3
4 5 6 7 8 910
11121314151617
18192021222324
252627282930 

RSS 2.0