View Full Version : Snap by default
justinjstark
December 13th, 2006, 05:02 AM
Is there any way to make compiz snap windows to the screen edge, other windows, and panels without having to hold down a key or have wobbly windows enabled? This is a feature available in beryl as well as metacity and I would really like to be able to do this in compiz.
rememo
December 13th, 2006, 09:43 AM
Is there any way to make compiz snap windows to the screen edge, other windows, and panels without having to hold down a key or have wobbly windows enabled? This is a feature available in beryl as well as metacity and I would really like to be able to do this in compiz.
This feature has been a long time in compiz wobbly plugin (actually beryl took it from compiz, as they still do with new features) and it is currently being enhanced by the compiz devs for multi-monitor setups.
Anyways, what you want is availabe in gconf-editor (i'm supposing you have loaded gconf plugin) : just enable snap_inverted in
/apps/compiz/plugins/wobbly/allscreens/options
(snap_inverted means you will have to press a key to disable snapping)
rememo
December 13th, 2006, 10:53 AM
I just "re"- read your message and I think I misunderstood you... sorry
So you want the default snapping without wobblying windows, am I right? This is currently not implemented in compiz. I think it could be done in the wobbly plugin (maybe by adding options to set wobbly parameters). But the better way could be to separate wobbly and snapping code in different plugins (because wobbly is not wobbly if you set the parameters to not wobble at all). Anyways, I'm not an expert to this and don't know if this is possible. Maybe mikedee could help... I think this could be an useful option for all those that don't want wobblying windows but the metacity snapping behaviour. So sorry again for misunderstanding you :oops:
Amaranth
December 13th, 2006, 11:10 AM
I'm pretty sure you were right the first time seeing how Beryl does not do window snapping without wobbly either.
rememo
December 13th, 2006, 11:39 AM
I'm pretty sure you were right the first time seeing how Beryl does not do window snapping without wobbly either.
Alright, thanks amaranth for clarifying this. Left Beryl some time ago, so I couldn't test it... Good to know compiz doesn't lag behind :wink:
imnotpc
December 13th, 2006, 12:44 PM
I was also wondering if this could be done without a keypress. Good to know. Is there any reason that snapping shouldn't be the default behavior?
rememo
December 13th, 2006, 01:24 PM
Currently david and other devs are optimizing the snapping code in wobbly. I think in the earlier days there were problems with handling snapping on mulitmonitor setups. Also a problem is that when you have a window with a special size whose borders are near oppositing edges, wobbly tries to snap to both which gives funny results (earlier it chrashed compiz completely, but this is resolved). This is currently discussed at the mailing list and should be fixed soon. When this is done, I don't see any reason why it shouldn't be default as in metacity. But this is up to david...
justinjstark
December 13th, 2006, 04:34 PM
Currently david and other devs are optimizing the snapping code in wobbly. I think in the earlier days there were problems with handling snapping on mulitmonitor setups. Also a problem is that when you have a window with a special size whose borders are near oppositing edges, wobbly tries to snap to both which gives funny results (earlier it chrashed compiz completely, but this is resolved). This is currently discussed at the mailing list and should be fixed soon. When this is done, I don't see any reason why it shouldn't be default as in metacity. But this is up to david...
I'm not even saying that it needs to be enabled by default, but the option should be there to snap without wobbly or a keypress. Thanks for the replies.
mikedee
December 13th, 2006, 05:41 PM
I think this situation is just an oversight really, edge snapping could be added to the move plugin fairly easilly (I assume). It is probably something that will be done since people want it, I wouldnt hold your breath though ;)
Moses
December 15th, 2006, 02:37 AM
One thing I miss from Metacity is snap-on-resize...
When I first started using Compiz, the things that bothered me the most was the lack of snapping, which has been partly added, and the fact that it wouldn't remember the positions of windows across logins, which also has been partly fixed.
In the olden days, when I used Metacity, I would log into four dektops. The first one would contain Gaim sort of vertically maximized (Since Metacity doesn't/didn't support one dimensional maximization, I just sized it to the height of the workspace---something Metacity for some reason wouldn't remember though, so I had to resize it manually, but with the window borders snapping to my Gnome panel) and the second one Rhythmbox maximized.
Today when I log into my Compiz session, The Gaim window is placed where I want it, correctly sized, but Rhythmbox pops up in the same viewport.
This is a small inconvenience though, since I log out only once every other fortnight.
By the way, is it possible to make window resizing wobbly as well? I'm thinking about a visual effect similar to what you get when you press alt and drag a window corner.
wfarr
December 15th, 2006, 03:00 AM
For viewport (aka desktop) placement, use the state plugin.
You'll have to activate it through gconf.
Once it's added, go to the State Options, and add keys to the corresponding wishes of your own. EG.
Under viewport, add - p:rhythmbox:2
This while make rhythmbox always open in the second viewport.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.