View Full Version : Improved Mouse Gestures
mikedee
November 30th, 2006, 03:47 PM
Due to public demand I decided to update the mouse gestures plugin to support more complex movements :)
To configure it you now need to enter the gestures into the actions list. They are in this format.
gesture:plugin:action
eg.
r:rotate:rotate_left
l:rotate:rotate_right
d:showdesktop:initiate
9:scale:initiate
lrl:put:put_viewport_left <- 'throw' window gesture
rlr:put:put_viewport_right
the strokes of the gesture are like this
u,d,l,r = up, down, left, right
7,9,1,3 = diagonals like on the numeric keypad
You can have up to 32 strokes per gesture and up to 128 gestures.
If you installed the older simple mouse gestures then run this command before installing the new gconf schema.
gconftool-2 --recursive-unset /apps/compiz/plugins/mousegestures
This is available from my git repo by typing this
git-clone git://people.freedesktop.org/~mike/mousegestures
Let me know if you have problems activating the gestures, I have hard coded the variance (wobblyness of the line) and the minimum stroke length but I could make them options if different people want different values.
Edit: Updated for version 2.1, includes bug fixes plus core actions (close/min/max window)
delphinen
December 7th, 2006, 01:14 PM
Is there any chance that the mouse gestures would be included in the next Compiz release?
mikedee
December 7th, 2006, 05:24 PM
I think I would like it to be distributed with the main distribution eventually. David has no problem as long as they are maintained and can be disabled. I decided to put all the other plugins in the extra package because I didnt write then and so cannot really support them.
There are a few things to do first
1. Fix so that long gestures will not crash it
2. Change some things either here or in core so that you can use gestures to do things like close/minimize/maximize the current window. I havent checked but I do not think these will work yet.
3. Decide on a licence for it . :wink:
mikedee
December 12th, 2006, 02:32 AM
Here is a new version of the plugin with the ability to initiate core actions.
eg. you can now do things like this
1u3:core:close_window
d:core:minimize_window
u:core:maximize_window
http://www.anykeysoftware.co.uk/compiz/plugins/mousegestures-2.1.tar.gz
It will now not do horrible things to your memory if you load a long gesture :)
The only real limitation is that it only does display actions, but there are not many screen actions so it should be OK.
delphinen
December 12th, 2006, 07:01 PM
Thank you mike. Does the plugin comes with preconfigured scripts? I may try this plugin when I finish exams, I think it could be one of the better plugins of Compiz (better as in usefulness ;) )
mikedee
December 12th, 2006, 07:32 PM
I was thinking of adding an extra special type of gesture which could be exec. This could execute any program you like. This program could also be a script which talks back to compiz over dbus. With that you could do anything you like.
I was waiting for some feedback on the gestures that I have mentioned as examples. If they seem good to people then I could make them default. I was hoping for a few suggestions from the mousegesture using community for some more complicated ones though ;)
pichalsi
December 12th, 2006, 09:51 PM
I like the plugin idea, i use gestures in firefox and find very useful. Must try this plugin first :)
EDIT:I put it on my Beryl (i know you dont really like it but i wanted to try out your HOWTO to port from beryl to compiz in reverse order ;), but i dont think anyone will want it. It works very well, my only problem was that beryl doesnt have currentRoot and i had to look into other plugin and copy&paste :P
mikedee
December 26th, 2006, 05:04 PM
I have just updated this to support exec, this means you can run applications with a mousegesture.
eg.
dr:exec:firefox-bin
Just use exec instead of the plugin name and the command as the last part.
I have added a few default gestures to get you going, please let me know if there are some important ones missing.
stjepan
December 26th, 2006, 06:40 PM
The plugin simply doesn't work for me :(
Haisen
December 26th, 2006, 08:44 PM
Hi, mikedee
Rotate action is not working.
ERROR: I found the plugin called 'rotate' but I could not find the action called 'rotate_left ', check that you spelt it correctly in the option.
ERROR: I found the plugin called 'rotate' but I could not find the action called 'rotate_right ', check that you spelt it correctly in the option.
I can execute scale and dr:exec:firefox-bin.
Thanks.
mikedee
December 26th, 2006, 09:51 PM
ERROR: I found the plugin called 'rotate' but I could not find the action called 'rotate_left ', check that you spelt it correctly in the option.
ERROR: I found the plugin called 'rotate' but I could not find the action called 'rotate_right ', check that you spelt it correctly in the option.
Looks like there is a stray space at the end of the option, did you manually copy and paste them in? If you did then just remove the space from the end.
Haisen
December 26th, 2006, 10:22 PM
ERROR: I found the plugin called 'rotate' but I could not find the action called 'rotate_left ', check that you spelt it correctly in the option.
ERROR: I found the plugin called 'rotate' but I could not find the action called 'rotate_right ', check that you spelt it correctly in the option.
Looks like there is a stray space at the end of the option, did you manually copy and paste them in? If you did then just remove the space from the end.
Exactly. Thanks.
stjepan
December 27th, 2006, 09:20 PM
When I try to initiate plugin, nothing happens. I loaded the plugin and it's the last in the list.
What may be wrong?
Do I have to install something?
stjepan
December 28th, 2006, 12:06 PM
Whoa... now plugin works, but I see no grid. How to enable it?
Also it seems mousegestures doesn't like Alt key. After I do a mouse gesture, moving windows is buggy. I press Alt, move window, and I release Alt and mouse button - nothing happens until I press Esc key. The same with rotating cube. I Press ctrl+alt+button1, I release all three keys/buttons and cube doesn't stop spinning until I press Esc. :(
If I use exec, it can run nothing. It always complains like this:
/usr/bin/gimp: /usr/bin/gimp: cannot execute binary file
:(
stjepan
December 28th, 2006, 12:33 PM
Do I have to install anything else than the plugin?
mikedee
December 28th, 2006, 12:39 PM
I am not sure why you are seeing the 'cannot execute binary file' message. Do you have any strange security programs like selinux?
It tries to exec any program you enter by using execl so it should work.
There are lots of strange bugs when using alt + button 3. Maximize a window, then use put to put it on the next viewport. Then go to the viewport and you can manually deform the window using the right mouse button :D
stjepan
December 28th, 2006, 12:43 PM
Mikedee, and what's this: http://www.youtube.com/watch?v=n1MYLXjMsPE ?
mikedee
December 28th, 2006, 12:52 PM
Mikedee, and what's this: http://www.youtube.com/watch?v=n1MYLXjMsPE ?
Dunno :?
Not mine :)
RYX
December 31st, 2006, 02:17 PM
Mikedee, and what's this: http://www.youtube.com/watch?v=n1MYLXjMsPE ?
Looks cool. Very close to my proposal on old beryl-forums. Only needs small sparkles instead of the green line. Anyone knows where to get it? Or do you plan to extend your plugin, mikedee?
(And please tell me that the creator of the video doesn't have microsoft.com as his starting page in Firefox! Otherwise I really question the sanity of the author ...) :x
:)
mikedee
December 31st, 2006, 02:50 PM
Mikedee, and what's this: http://www.youtube.com/watch?v=n1MYLXjMsPE ?
Looks cool. Very close to my proposal on old beryl-forums. Only needs small sparkles instead of the green line. Anyone knows where to get it? Or do you plan to extend your plugin, mikedee?
Could you explain more, is it just the line/trail you are looking for? I have just grokked openGL so it should be easy now :)
I don't really understand the reason behind moving and resizing the gesture though. Does anyone know what that is for?
RYX
December 31st, 2006, 03:26 PM
Do you remember (i.e. did you play) Black&White, the game where you were god himself and were able to cast magic spells by moving your hand around? If not - it looked like a particle emitter that follows the mouse movement, the particles faded out after a short interval. The "glowing" gesture slowly faded out bit by bit.
And I don't see any use in moving the gesture around, too. But it looked like he connected the gesture to a desktop-icon by draggging&dropping the gesture onto the icon - which would be an amazing way of connecting gestures to applications/scripts (and would make configuration much easier for the average user).
mikedee
December 31st, 2006, 07:01 PM
Is it a similar effect to the ctrail plugin, but maybe longer lasting?
Maybe I can have configurable trail styles, either standard lines or snazzy wizard effects :)
lowfi
February 11th, 2007, 01:19 AM
(And please tell me that the creator of the video doesn't have microsoft.com as his starting page in Firefox! Otherwise I really question the sanity of the author ...) :x
don't question the sanity of the author. that's just my goofy sense of humor. :lol:
the video on youtube is my mouse gesture app called chickenscratch. i still haven't released it, because it needs the XevIE extension to catch all events from the XServer and i'm still trying to get rid of this dependency.
the 'moving the icon around' in the video was just to show that you can fully interact with the desktop while drawing a gesture. RYXs idea to configure the gestures that way would be very cool, but this could be hard to implement.
Anyway, if someone wants to play with it (or even better - hack on it) drop me a mail and i'll send you the code.
mikedee
May 19th, 2007, 04:40 PM
I have just put this into git, to checkout type this
git-clone git://people.freedesktop.org/~mike/mousegestures
Git web is available here
http://gitweb.freedesktop.org/?p=users/mike/mousegestures.git;a=summary
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.