2

Can I force Ubuntu 22.04 to open all applications in the maximized state?

I'm using these apps:

  1. Terminal
  2. Files
  3. VS Code
  4. Text Editor
  5. Chrome

And right now, I should maximize each of them after opening, which is inefficient.

I already saw these questions and none solved my problem:

Howto force all Windows to open not Maximized
How can I open gthumb maximized?
Open windows maximized!
How to auto un-maximize all windows for all applications?

I would be happy to even have a script running all the time, listening for application opening events and maximizing them automatically.

Or better approach is to somehow tell Ubuntu's window manager to maximize each new window forcefully.

Saeed Neamati
  • 793
  • 2
  • 7
  • 20
  • 1
    You missed https://askubuntu.com/questions/1408912/maximized-windows-by-default-on-ubuntu-22-04-with-gnome That extension still works on gnome shell. – Rinzwind Aug 20 '22 at 09:47
  • @Rinzwind, I looked at that extension. It's a simple JavaScript code. One code file. I'm confused. What JS has to do with shell? – Saeed Neamati Aug 20 '22 at 13:21

1 Answers1

3

There is little control on most linux desktops on the size and placement of new windows, and it gets worse with Wayland.

On Xorg, there are the old tools devilspie and devilspie2 that still do a marvelous job at resizing and positioning windows that meet your criteria the way you want.

For example, in devilspie2, this single rule would do the job of maximizing any normal window, but not dialogs or application widgets:

if (get_window_type() == "WINDOW_TYPE_NORMAL" and not string.match(get_window_property("_NET_WM_STATE"),"_NET_WM_STATE_SKIP_PAGER") ) then
    maximize();
end
vanadium
  • 88,010
  • thank you. Can you also explain where should I put that script? I read the GitHub's page for the devilspie2 but I couldn't find out how can I add that script to it. – Saeed Neamati Aug 20 '22 at 14:35
  • For devilspie2, you can see documentation with the command less /usr/share/doc/devilspie2/README.gz – vanadium Aug 20 '22 at 15:08