Anhang:
bg.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import time
import os
import touchpad
import maus
mausstatus = False # Maus am anfang als ausgesteckt deklarieren, damit falls sie angesteckt ist, das Touchpad sofoert ausgeschalten wird
while True:
time.sleep(1)
if mausstatus != maus.ReadFile():
touchpadstatus = touchpad.ReadFile()
mausstatus = maus.ReadFile()
if mausstatus == False and touchpadstatus == False:
os.system("/usr/local/bin/touchpad.py")
elif mausstatus == True and touchpadstatus == True:
os.system("/usr/local/bin/touchpad.py")
|
Anhang herunterladen
Diese Revision wurde am 10. Oktober 2018 15:13 von ubuntuusers erstellt.