Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimised Thunderbird on startup? #171

Open
orschiro opened this issue Feb 7, 2017 · 5 comments
Open

Minimised Thunderbird on startup? #171

orschiro opened this issue Feb 7, 2017 · 5 comments

Comments

@orschiro
Copy link

orschiro commented Feb 7, 2017

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
Copy link

I would appreciate it too.

@orschiro
Copy link
Author

orschiro commented Mar 15, 2017

@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
Copy link

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

@orschiro
Copy link
Author

orschiro commented Mar 15, 2017 via email

@orschiro
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants