nmaier / mintrayr

Mozilla extension: Minimize windows into the system tray (Firefox, Thunderbird, Seamonkey, Instantbird)
https://tn123.org/mintrayr/
Mozilla Public License 2.0
84 stars 37 forks source link

Minimised Thunderbird on startup? #171

Open orschiro opened 7 years ago

orschiro commented 7 years ago

Dear @nmaier,

What a fantastic add-on.

Thank you so much! :-)

I have a question:

I added Thunderbird to the Startup Application Preferences on Ubuntu 16.10 to run on startup.

It currently opens with a maximised window. I need to click on the close button to have it minimised to tray thanks to your add-on.

My question to you:

Can you add an option to your add-on to launch Thunderbird directly minimised?

Yours,

Robert

mattmart3 commented 7 years ago

I would appreciate it too.

orschiro commented 7 years ago

@matteomartelli,

For now I run this script on startup as a workaround:

orschiro@x230:~$ cat Software/close_windows_startup.sh 
#!/bin/bash
# Script enters into this while loop, and keeps checking
# if wmctrl -l lists firefox. Condition is true if firefox
# isn't there. When firefox appears, condition is false,
# loop exits

while ! [[ "$(wmctrl -lx)" =~ "Mail.Thunderbird" ]]
do
    # number of seconds can be changed for better precision
    # but shorter time equals more pressure on CPU
    sleep 1
done

# Only after firefox appears , we get to here
echo "Found Thunderbird, closing it now..."
sleep 1
wmctrl -c Thunderbird

# Same idea as before - we enter the waiting loop,
# and keep looping until Thunderbird is not on the list
while  [[ "$(wmctrl -lx)" =~ "Mail.Thunderbird" ]]
do
    sleep 1
done

#When loop exits, that means programs aren't on the list
echo "Script is done"
mattmart3 commented 7 years ago

@orschiro Thank you very much. This is a very useful workaround.

orschiro commented 7 years ago

You are welcome. :-)

On Wed, Mar 15, 2017 at 7:34 AM Matteo Martelli notifications@github.com wrote:

@orschiro https://github.com/orschiro Thank you very much. This is a very useful workaround.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/nmaier/mintrayr/issues/171#issuecomment-286653596, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKbw0OhqXnZDXpLsQXxzgmAJi87-9kCks5rl4Z5gaJpZM4L568N .

orschiro commented 7 years ago

Quick follow up: any news on implementing it directly into the add-on?