Page 1 of 2

Any way to center Cinnamon Windows ????

Posted: Wed Jul 25, 2012 11:45 am
by sfeltch
Hi all,

I am currently using mate 13 but would like to use Cinnamon. The thing that stops me is I hate the opening of windows in random or "smart" placement. Is there a way and am I missing it somewhere to center window placement in Cinnamon? If not I would hope that this would be a feature to add.

Thanks in advance,

sfeltch

Re: Any way to center Cinnamon Windows ????

Posted: Tue Aug 07, 2012 3:06 pm
by herbie643
I 2nd that. Centering windows is an option in Compiz but since Compiz is not supported it cannot be done. I have written code that automatically centers windows. It is not that hard. To add as an option would be childsplay. Come on guys, add that feature. It will be welcomed I am sure.

Re: Any way to center Cinnamon Windows ????

Posted: Tue Aug 07, 2012 3:57 pm
by GeneC
herbie643 wrote:......... I have written code that automatically centers windows. It is not that hard.............
:D

herbie

Can you share?
I know nothing of writing code, but if you post a "HOW TO".. :mrgreen:

I posted asking for this when Cinnamon first came out, so I would not wait on it to be implemented by the developers soon.... :lol:

Re: Any way to center Cinnamon Windows ????

Posted: Tue Aug 07, 2012 5:09 pm
by lurkatron
personally i want windows to appear in pre-defined fixed positions

Re: Any way to center Cinnamon Windows ????

Posted: Thu Nov 08, 2012 9:26 pm
by herbie643
I did a Google search on 'center window in css' and found this

.centered {
position: fixed;
top: 50%;
left: 50%;
}
and inserted into the theme gtkwidgets.css
at the Gtkwindow section

Mine now looks like
GtkWindow {
color: @theme_fg_color;
.centered {
position: fixed;
top: 50%;
left: 50%;
}
}

Now this only seems to work on GTK3 applications. Haven't found a way in GTKRC yet.
I realize this is a kludge of sorts, since most users have no clue where to look.


The path would be /usr/share/themes/themename/gtk-3,0/gtkwidgets.css

But at least it seems to work.

Re: Any way to center Cinnamon Windows ????

Posted: Mon Nov 12, 2012 4:36 am
by twodogs
You can center windows in Cinnamon!

Go to Cinnamon Settings and click 'Keyboard.'
Under 'windows' scroll down to the keyboard shortcut for centering windows.

There is not one currently set so you will have to do it.

I use alt + space and my windows immediately center.


Hope this helps.

I use Cinnamon 1.6 yadda yadda yadda.

Re: Any way to center Cinnamon Windows ????

Posted: Tue Nov 20, 2012 9:06 am
by HoppityBob
Cinammon is really nice and I love the clean, uncluttered look, but I would also like the option to set the position (and even the size) of windows as they open. Personally I like them to open centered and to remember their previous size, not open scattered randomly about the screen.

I'd also very much like the option to force specific windows/applications to open/stay on certain workspaces. Kde can do this and I'll be sticking with it as my main DE so long as it's the only one that seems to able to.

Re: Any way to center Cinnamon Windows ????

Posted: Mon Nov 26, 2012 6:24 am
by allypink
How do folks.
Seriously loving cini 1.6. Thanks Clem and the gang.
Centering was easy with twodogs advice (there's a good Ausie expression) using the second 'windows menu key' on the rhs of the keyboard leaving the other for Mint's menu.
Would be better to have the option in cini setup to do it automaticly. I have to agree.......... on a large screen not centering is a pain!
I think with this version of Mint if have found my Mint 10 upgrade.
;)

Re: Any way to center Cinnamon Windows ????

Posted: Tue Dec 18, 2012 12:17 am
by d00med
herbie643 wrote:Mine now looks like
GtkWindow {
color: @theme_fg_color;
.centered {
position: fixed;
top: 50%;
left: 50%;
}
}
This doesn't work here at all, but I can't imagine how that would be valid CSS. Don't believe I've ever seen a nested class like that. I tried defferent versions of that CSS centering hack, but none worked.

Re: Any way to center Cinnamon Windows ????

Posted: Fri Dec 21, 2012 10:14 pm
by herbie643
I got the code from a google search on centering in css.
Like I said, it worked for me. .xsession-errors complained about needing a ; but other than that it worked.

Re: Any way to center Cinnamon Windows ????

Posted: Mon Dec 24, 2012 2:35 pm
by herbie643
Check out my post on Center Windows.. I use devilspie...

Re: Any way to center Cinnamon Windows ????

Posted: Tue Dec 25, 2012 12:30 pm
by d00med
herbie643 wrote:I got the code from a google search on centering in css.
Like I said, it worked for me. .xsession-errors complained about needing a ; but other than that it worked.
Yeah, but it isn't proper CSS as far as I know, and there likely isn't a .centered class in the theme's CSS file. Should be something like

Code: Select all

GtkWindow {
color: @theme_fg_color;
position: fixed;
top: 50%;
left: 50%;
}
But this didn't work for me either.

Re: Any way to center Cinnamon Windows ????

Posted: Tue Dec 25, 2012 2:42 pm
by viking777
gdevilspie is great for this sort of thing and it is available in the package manager and absolutely tiny.

Instructions here (see part 2):

http://www.webupd8.org/2011/02/how-to-s ... mized.html

Re: Any way to center Cinnamon Windows ????

Posted: Fri Dec 28, 2012 6:37 pm
by d00med
Thanks for the suggestions of Devil's Pie. It's extra overhread, but it so nice to have the windows behave like they should,

Re: Any way to center Cinnamon Windows ????

Posted: Thu Jan 03, 2013 5:41 pm
by nomko
twodogs wrote:Go to Cinnamon Settings and click 'Keyboard.'
Under 'windows' scroll down to the keyboard shortcut for centering windows.
I have Cinnamon 1.6 and when i open the keyboatrd settings in the Cinnamon settings menu i see 2 tabs: Typing and Keys (shortcuts). What do you mean with "Under windows scroll down...."??

Re: Any way to center Cinnamon Windows ????

Posted: Thu Jan 03, 2013 5:48 pm
by nomko
viking777 wrote:gdevilspie is great for this sort of thing and it is available in the package manager and absolutely tiny.

Instructions here (see part 2):

http://www.webupd8.org/2011/02/how-to-s ... mized.html
Is it also applicable for Cinnamon??

Re: Any way to center Cinnamon Windows ????

Posted: Fri Jan 04, 2013 5:35 am
by viking777
nomko wrote:
viking777 wrote:gdevilspie is great for this sort of thing and it is available in the package manager and absolutely tiny.

Instructions here (see part 2):

http://www.webupd8.org/2011/02/how-to-s ... mized.html
Is it also applicable for Cinnamon??
Well it works for centering my terminal window on Cinnamon, but I haven't tried every window type there is, that is about all I do with it at the moment. I don't suppose the information is much use to you, but when I tried it on Manjaro it failed to reposition my package manager window (which always opens up across two screens instead of on my main monitor) so it obviously has some limitations.

Re: Any way to center Cinnamon Windows ????

Posted: Fri Jan 04, 2013 2:11 pm
by nomko
viking777 wrote:
nomko wrote:
viking777 wrote:gdevilspie is great for this sort of thing and it is available in the package manager and absolutely tiny.

Instructions here (see part 2):

http://www.webupd8.org/2011/02/how-to-s ... mized.html
Is it also applicable for Cinnamon??
Well it works for centering my terminal window on Cinnamon, but I haven't tried every window type there is, that is about all I do with it at the moment. I don't suppose the information is much use to you, but when I tried it on Manjaro it failed to reposition my package manager window (which always opens up across two screens instead of on my main monitor) so it obviously has some limitations.
And how can i set delispie to open all Windopws on the right side of my screen? What are the coordinates of the screen/desktop? See screenshot: http://www.wuala.com/nomko/Afbeeldingen ... 1_002.png/ download the file to see the whole screenshot.

Re: Any way to center Cinnamon Windows ????

Posted: Fri Jan 04, 2013 2:26 pm
by viking777
The instructions to use gdevilspie are on the link I gave starting about half way down with the words "To add a new rule using gDevilspie". About the only thing is doesn't tell you is that you have to manually position/size the windows you want before clicking 'get' . Everything else is more or less automatic. (you do have to have the deamon running but that is just a checkbox in the gui). I repeat though I only use this to centre my terminal window when it starts up I haven't investigated the more complex functions.

Re: Any way to center Cinnamon Windows ????

Posted: Fri Jan 04, 2013 3:35 pm
by nomko
viking777 wrote:The instructions to use gdevilspie are on the link I gave starting about half way down with the words "To add a new rule using gDevilspie". About the only thing is doesn't tell you is that you have to manually position/size the windows you want before clicking 'get' . Everything else is more or less automatic. (you do have to have the deamon running but that is just a checkbox in the gui). I repeat though I only use this to centre my terminal window when it starts up I haven't investigated the more complex functions.
Didn't worked for me... Only the terminal pops up in the screen centre now, but that's it! Firefox still opens at the left side of the screen...