0

I'm running Ubuntu 14.04 with brackets installed (btw, does brackets work on Ubuntu 17? Coz when I checked with 16 it didn't? But anyway...)

The problem

When I open Brackets it always comes up in this tiny window which is no good fit working with.

What I want

I wish... I wish that Brackets would open in a maximised window... Unfortunately, the has been this bug around for like 3 years and it doesn't look like anyone is willing to do anything about it... I would therefore like to propose a workaround.

Proposed (theoretical) workaround

I found that this command

wmctrl -r Brackets -b add,maximized_horz,maximized_vert

will maximise the window if Brackets is open. So now I need to find a way to run it immediately after Brackets opens.

I have tried to put the command into the brackets.desktop file, but it doesn't seem to work...

Exec=/opt/brackets/brackets %U && wmctrl -r Brackets -b add,maximized_horz,maximized_vert

I've also tried with a semicolon instead of && but it also doesn't work. I have a feeling that it's because I can't put 2 commands like that in a desktop file, since it will only run the second one after it finished with the first one, which would be after the program is closed... Am I right? I'm just making this up...

I've also tried to do this by setting the maximised settings in the desktop file (can't remember exactly what I did, it was a long time ago).

So, is there any way for me to achieve the desired outcome here?

1 Answers1

0

So I made a simple script that will do this:

#!/bin/bash
/opt/brackets/brackets &
sleep 1
wmctrl -r Brackets -b add,maximized_horz,maximized_vert

The sleep 1 is just to give the window time to open so it is recognised by the following command which will maximise it.

Then I just changed the Exec=/opt/brackets/brackets line in the Brackets.desktop file to Exec=/path/to/script.sh.

Remember to make the script executable with

sudo chmod +x /path/to/script.sh