You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.py 545B

12345678910111213141516
  1. from subprocess import *
  2. name = "firefox"
  3. positionX = 350
  4. positionY = 150
  5. width = 500
  6. height = 400
  7. windowID = Popen(["xdotool", "search", "--onlyvisible", "--name", name], stdout=PIPE).communicate()[0].strip()
  8. Popen(["xdotool", "windowsize", windowID, str(width), str(height)], stdout=PIPE).communicate()
  9. Popen(["xdotool", "windowmove", windowID, str(positionX), str(positionY)], stdout=PIPE).communicate()
  10. Popen(["xdotool", "windowactivate", windowID], stdout=PIPE).communicate()[0].strip()
  11. #windowminimize ums ein fenster klein zu machen