Skip to content
Snippets Groups Projects
Commit 9ebe7929 authored by Lucio Zambon's avatar Lucio Zambon
Browse files

Add new file

parent 1e23b54b
No related branches found
No related tags found
No related merge requests found
import subprocess
import sys
import psutil
from time import sleep
#print('vibration', sys.argv)
process_name = sys.argv[1]
params = sys.argv[2:]
#print('Popen(/home/fermi/utenti/lz/guistat acquisition |grep -A1 "'+' '.join(sys.argv[1:])+'"')
processInfo = subprocess.Popen('/home/fermi/utenti/lz/guistat acquisition |grep -A1 "'+' '.join(sys.argv[1:])+'" | tail -1', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
coo = processInfo.stdout.read().decode("utf-8").split()
wid = coo[0]
x = int(coo[3])-3
y = int(coo[4])-29
#subprocess.run(['wmctrl', '-i', '-r', wid, '-b', 'add,above'], check=True)
#subprocess.run(['wmctrl', '-i', '-r', wid, '-a'], check=True)
cmd1 = 'wmctrl -i -v -r '+wid+'-e 0,'+str(x)+','+str(y)+','+coo[5]+','+coo[6]
cmd2 = 'wmctrl -i -v -r '+wid+'-e 0,'+str(x+30)+','+str(y+30)+','+coo[5]+','+coo[6]
for i in range(0, 20):
#print(cmd2)
p = subprocess.Popen(cmd2, shell=True)
sleep(0.05)
#print(cmd1)
p = subprocess.Popen(cmd1, shell=True)
sleep(0.05)
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment