Any way to center Cinnamon Windows ????

Please post suggestions for improvement of Cinnamon here
https://github.com/linuxmint/Cinnamon

Any way to center Cinnamon Windows ????

Postby sfeltch on Wed Jul 25, 2012 11:45 am

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
sfeltch
Level 1
Level 1
 
Posts: 3
Joined: Fri Jun 22, 2012 7:25 am

Linux Mint is funded by ads and donations.
 

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

Postby herbie643 on Tue Aug 07, 2012 3:06 pm

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.
herbie643
Level 3
Level 3
 
Posts: 138
Joined: Tue Oct 19, 2010 9:16 pm

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

Postby GeneC on Tue Aug 07, 2012 3:57 pm

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:
GeneC

AMD Phenom2x4 3.2 ghz, 12GB DDR3, Nvidia GTX 460

Sparky Cin 2.2 (SID)
Manjaro .9.0dev Cin 2.4 (Testing)
Arch XFCE/Budgie
User avatar
GeneC
Level 7
Level 7
 
Posts: 1582
Joined: Fri Sep 03, 2010 1:59 pm
Location: Maine, USA

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

Postby lurkatron on Tue Aug 07, 2012 5:09 pm

personally i want windows to appear in pre-defined fixed positions
lurkatron
Level 3
Level 3
 
Posts: 101
Joined: Tue Nov 01, 2011 2:18 pm

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

Postby herbie643 on Thu Nov 08, 2012 9:26 pm

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.
herbie643
Level 3
Level 3
 
Posts: 138
Joined: Tue Oct 19, 2010 9:16 pm

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

Postby twodogs on Mon Nov 12, 2012 4:36 am

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.
--
Image
Lenovo laptop B575 8 gigs memory, 750 hard drive, and Linux Mint 17 Qiana Cinnamon 64-bit
User avatar
twodogs
Level 4
Level 4
 
Posts: 270
Joined: Sat Jun 09, 2007 9:18 pm

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

Postby HoppityBob on Tue Nov 20, 2012 9:06 am

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.
HoppityBob
Level 1
Level 1
 
Posts: 45
Joined: Sun Feb 14, 2010 1:59 pm

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

Postby allypink on Mon Nov 26, 2012 6:24 am

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.
;)
Desktop; DELL Optiplex Core 2 Quad 8GB RAM
Run Mint 17.1, 1TB WD black 7200 and Win 7 320GB WD black 7200 (gotta for work)
A happy donor to the effort. If you use it...... DONATE!
User avatar
allypink
Level 3
Level 3
 
Posts: 178
Joined: Sun May 30, 2010 10:27 pm
Location: Nambour Australia

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

Postby d00med on Tue Dec 18, 2012 12:17 am

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.
d00med
Level 4
Level 4
 
Posts: 333
Joined: Fri Nov 26, 2010 9:55 am

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

Postby herbie643 on Fri Dec 21, 2012 10:14 pm

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.
herbie643
Level 3
Level 3
 
Posts: 138
Joined: Tue Oct 19, 2010 9:16 pm

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

Postby herbie643 on Mon Dec 24, 2012 2:35 pm

Check out my post on Center Windows.. I use devilspie...
herbie643
Level 3
Level 3
 
Posts: 138
Joined: Tue Oct 19, 2010 9:16 pm

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

Postby d00med on Tue Dec 25, 2012 12:30 pm

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.
d00med
Level 4
Level 4
 
Posts: 333
Joined: Fri Nov 26, 2010 9:55 am

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

Postby viking777 on Tue Dec 25, 2012 2:42 pm

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
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

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

Postby d00med on Fri Dec 28, 2012 6:37 pm

Thanks for the suggestions of Devil's Pie. It's extra overhread, but it so nice to have the windows behave like they should,
d00med
Level 4
Level 4
 
Posts: 333
Joined: Fri Nov 26, 2010 9:55 am

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

Postby nomko on Thu Jan 03, 2013 5:41 pm

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...."??
MSI GE70-2PE*Quad core Intel Core i7-4710HQ*Kingston 16 GB RAM*Intel 4th Gen. Integr. GPU/NVidia GeForce GTX860M*Qualcomm Atheros Killer E2200/Intel Wireless 3160*Sitecom X5-N600 Router (WLR-5100)
Linux tips and tricks
User avatar
nomko
Level 9
Level 9
 
Posts: 2949
Joined: Sat Feb 25, 2012 7:28 pm
Location: The Hague, The Netherlands

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

Postby nomko on Thu Jan 03, 2013 5:48 pm

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??
MSI GE70-2PE*Quad core Intel Core i7-4710HQ*Kingston 16 GB RAM*Intel 4th Gen. Integr. GPU/NVidia GeForce GTX860M*Qualcomm Atheros Killer E2200/Intel Wireless 3160*Sitecom X5-N600 Router (WLR-5100)
Linux tips and tricks
User avatar
nomko
Level 9
Level 9
 
Posts: 2949
Joined: Sat Feb 25, 2012 7:28 pm
Location: The Hague, The Netherlands

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

Postby viking777 on Fri Jan 04, 2013 5:35 am

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.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

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

Postby nomko on Fri Jan 04, 2013 2:11 pm

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.
MSI GE70-2PE*Quad core Intel Core i7-4710HQ*Kingston 16 GB RAM*Intel 4th Gen. Integr. GPU/NVidia GeForce GTX860M*Qualcomm Atheros Killer E2200/Intel Wireless 3160*Sitecom X5-N600 Router (WLR-5100)
Linux tips and tricks
User avatar
nomko
Level 9
Level 9
 
Posts: 2949
Joined: Sat Feb 25, 2012 7:28 pm
Location: The Hague, The Netherlands

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

Postby viking777 on Fri Jan 04, 2013 2:26 pm

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.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

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

Postby nomko on Fri Jan 04, 2013 3:35 pm

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...
MSI GE70-2PE*Quad core Intel Core i7-4710HQ*Kingston 16 GB RAM*Intel 4th Gen. Integr. GPU/NVidia GeForce GTX860M*Qualcomm Atheros Killer E2200/Intel Wireless 3160*Sitecom X5-N600 Router (WLR-5100)
Linux tips and tricks
User avatar
nomko
Level 9
Level 9
 
Posts: 2949
Joined: Sat Feb 25, 2012 7:28 pm
Location: The Hague, The Netherlands

Linux Mint is funded by ads and donations.
 
Next

Return to Cinnamon

Who is online

Users browsing this forum: No registered users and 5 guests