3

In Ubuntu 22.04, most apps (particularly Slack) opened as maximized by default. On 24.04, Slack opens only on the middle part of the screen. How can I make selected apps open as maximized by default?

Maximized by default GNOME extension would open all apps as maximized by default. I want only selected apps to do so, e.g. Slack - yes, terminal - no.

EDIT: Slack and some other apps do not have an explicit setting to do this in-app, that's why I'm looking for general Ubuntu solution.

qalis
  • 143
  • 5

2 Answers2

1

I just learn a program devilspie2 from this question, and think this should suits your need.

First, install devilspie2

sudo apt update && sudo apt install devilspie2 -y

Then, write your scripts for your apps which want to maximize when open; I've tested by myself to match Slack. To debug, you can run with devilspie2 -d to see debug_print. Please do read README - less /usr/share/doc/devilspie2/README.gz, might be chatgpt can help you, if you not very good at scripting.

mkdir -p ~/.config/devilspie2
## below is an example script, which can be pasted to terminal 
## and create it as ~/.config/devilspie2/max_my_loved.lua
cat > ~/.config/devilspie2/max_my_loved.lua << \EOF
if (get_window_type() == "WINDOW_TYPE_NORMAL" and not string.match(get_window_property("_NET_WM_STATE"),"_NET_WM_STATE_SKIP_PAGER") ) then
  -- uncomment below line with devilspie2 -d, you can catch
  -- all windows' name
  -- debug_print('catch windows: ' .. get_application_name());
  if string.find(get_application_name(), "Slack") then
    debug_print("Maximize: " .. get_application_name());
    maximize();
  end
end
EOF

then run devilspie2, you can test its effect.

devilspie2

Oh, don't forget to put devilspie2 to your startup applications list.

alfred
  • 603
0

Also as a workaround, which helped me:

  • manually resize the window to full size (without clicking maximize button)
  • some windows on ubuntu 24 don't have resizing cursor, but you can resize them by pressing WIN key + holding MiddleButton mouse click

Then for me all the windows, resized in this way keep their size and position on close-open

Yehor
  • 161