![]() ![]() Windows of Steam have pid 0, which is a problem in the script as it was.Steam runs on start up with at least two windows (one splash- like window), but sometimes an additional message window appears.It turns out Steam does not run one pid, but no less then (in my test) eight!.It turns out Steam behaves quite different from a "normal" application: In such cases, I recommend using the first script.ĮDIT2 a specific version of the script for SteamĪs requested in a comment, below a version, specifically made for starting up STEAM minimized. Match = sum( for l in w_list if p in l] for p in proc], )Īlthough in general the second version should be more reliable, in cases when the application is started by a wrapper script, the pid of the command will be different from the application that is finally called. Proc = subprocess.check_output().decode("utf-8").strip().split() Just like the first script, it needs both wmctrl and xdotool The script #!/usr/bin/env python3 ![]() Return for w in l if w_name in w]Įxcept (Inde圎rror, subprocess.CalledProcessError): L = subprocess.check_output().decode("utf-8").splitlines() The script below does that and can be used as a general solution to startup an application in a minimized way. General solution to startup an application minimized Therefore, the command or script needs to be "smart" the second command should wait for the application window to actually appear. Starting up an application in a minimized way takes two commands: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |