2

I have a number of applications set to autolaunch and they seem to start in similar positions and sizes as the last exit but with some offset and change in size. How is the size and position determined on launch?

I am using the Auto Move Windows extension to move windows to specified workspaces. I'm trying to avoid using the Put Windows extension on top of that to set the location and size per window if possible.

I'm on Ubuntu 20.04 with Gnome 3.36 and X11

asheeshr
  • 783

1 Answers1

6

Window size and window position are in priority controlled by the application itself. Some applications remember their window size, others start with a default. Some applications remember the window position, others not. Then, the window manager decides on the position.

Ubuntu, that by default uses Gnome Shell, uses "mutter" as the window manager. The default placement of windows is controlled by the "Smart" algorithm. That algorithm will tend to place windows in the left corner, and else on another place of the window that is free. If no free space is available, new windows will be placed in a cascading order starting from the left top.

You can change the default placement of "smart" to "center" using Gnome Tweaks. Head to the "Windows" tab to activate the setting. That way, new windows will be created in the center of the screen, unless the application itself overrides it.

Only when using the traditional X11 display manager, you can have more control on where window are positioned upon launch, either with the "Put windows" extension, or —and this works on any desktop running on X11— with one of the venerable tools "devilspie" or "devilspie2", daemons that watch the creation of new windows and size and place them according to your rules.

vanadium
  • 88,010
  • Most of my application windows are actually Chrome tabs running in app mode which Put Windows cannot seem to distinguish between. They are independent entries with their own .desktop files for autostart but are run by Chrome. – asheeshr Mar 20 '21 at 22:14
  • I'll actually ask a new question specifically for that since your answer makes sense and does work for a set of unique applications. – asheeshr Mar 20 '21 at 22:15
  • It is interesting that the move windows extension recognizes these tabs as unique processes and handles moving them across workspaces as expected. – asheeshr Mar 20 '21 at 22:17
  • Does this mean to say that apps that start with a "default" size or location start that way because Gnome decides their size and location? – matanox Mar 12 '22 at 09:36
  • Gnome Tweak solved my problem! – Riko Jul 20 '22 at 04:32
  • Ok... so how do we change this to act like Windows and macOS have since the 90s? WTF are the Gnome ppl doing here with this hair brained nonsense? – zezba9000 Sep 30 '23 at 07:25