forked from sl5net/0ad_pidginFirst4moderators
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0ad_start.py
35 lines (25 loc) · 1.03 KB
/
0ad_start.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import subprocess
# 22-1104_1946-56 N.: ensure that you're in alpha26 with pidgin before connecting 0ad
p2 = subprocess.Popen("pidgin", shell=True)
p2 = subprocess.Popen("screenkey", shell=True) # something usefull for teaching
from pathlib import Path
home = str(Path.home())
c = home + "/git/0a26/binaries/system/pyrogenesis"
# dont wait till the proccess is edndet .
from subprocess import Popen
p = Popen([c, '']) # something long running
# p = Popen([c, '--user=[user]']) # something long running and bit more explicit
# p = Popen([c, '-writableRoot']) # not good idea to run 0ad as root.
# ... do other stuff while subprocess is running
# p.terminate()
time.sleep(.3) # .2 works is maybe sometimes to fast
c = "pyrogenesis.pyrogenesis"
window.activate(c, False, True)
window.resize_move(c, xOrigin=1908, yOrigin=-27, width=1925, height=1089, matchClass=True)
if True:
from plyer import notification
notification.notify(
title = "started ? :)",
message = "hi from 0ad_start",
timeout= 2,
toast=False)