Created
April 23, 2019 11:45
-
-
Save OKsign/193dbe392a889d87c10036e5a2e5b202 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Xdotool, Python installed | |
# user input | |
searchProcess = "xdotool search --onlyvisible --class 'Process Name'" | |
minimizeWindow = "xdotool windowminimize $(xdotool search --onlyvisible --class 'Process Name')" | |
# end of user input | |
import time | |
import os | |
checkVisible = os.system(searchProcess) | |
if checkVisible is 0: | |
time.sleep(0.7) | |
os.system(minimizeWindow) | |
os.system("notify-send 'Linux Mint - Python Script 1' 'Done!'") | |
else: | |
while (checkVisible is not 0): | |
time.sleep(1) | |
checkVisible = os.system(searchProcess) | |
time.sleep(0.7) | |
os.system(minimizeWindow) | |
os.system("notify-send 'Linux Mint - Python Script 1' 'Done!'") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment