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

Don't take focus away from current window if ui is not needed #121

Open
dylan-chong opened this Issue May 19, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@dylan-chong

dylan-chong commented May 19, 2018

When i call plantuml some-file the focus is taken away from a current window, on Mac. This is rather annoying because I have a set up in vim that automatically runs the plant UML commandline tool everytime I save the file. The focus is taken away from vim.

It would be nice if, when the UI is not needed, for example when the commandline arguments are sufficient, do not start up the UI.

@arnaudroques

This comment has been minimized.

Contributor

arnaudroques commented May 21, 2018

Maybe you can try the -Djava.awt.headless=true trick.
See http://forum.plantuml.net/5403/popup-icon-disrupts-gui-use-grabbing-keyboard-window-focus

@dylan-chong

This comment has been minimized.

dylan-chong commented May 21, 2018

Ah, the headless option needs to become before the jar file in java -jar ...

Running plantuml using the executable from homebrew doesnt allow you to do this

> which plantuml | xargs cat
#!/bin/bash
GRAPHVIZ_DOT="/usr/local/opt/graphviz/bin/dot" exec java -jar /usr/local/Cellar/plantuml/1.2018.3/libexec/plantuml.jar "$@"

@arnaudroques

This comment has been minimized.

Contributor

arnaudroques commented May 22, 2018

Ok, so we've build a new beta http://beta.plantuml.net/plantuml.jar
With this beta, you can use a new -headless flag but it has to be set as the very first argument in the command line.
Example:
java -jar plantuml.jar -headless -verbose some-file
It's difficult for us to test this option, so tell us if it's working for you.
Thanks,

@dylan-chong

This comment has been minimized.

dylan-chong commented May 25, 2018

The headless option is working for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment