diff --git a/autorotate/changeautorotatestatus.py b/autorotate/changeautorotatestatus.py deleted file mode 100644 index 0a12799..0000000 --- a/autorotate/changeautorotatestatus.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python2 -import os -from gi.repository import Notify - -path = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) - -def readFile(path): #self.filename - myDatei = open(path, "r") - myList = [] - #Liste aus Datei erstellen - for Line in myDatei: - Line = Line.rstrip() - #Line = Line.decode('utf8') - myList.append(Line) - myDatei.close() - return(myList) - -def writeFile(path, myList): #self.filename - myDatei = open(path, "w") - #Liste aus Datei erstelle - myDatei.writelines(myList) - myDatei.close() - -status = readFile(os.path.join(path, 'status.txt')) -if status[0] == "on": - writeFile(os.path.join(path, 'status.txt'), ["off"]) - Notify.init ("Rotation-ON") - RotationOFF=Notify.Notification.new ("Rotation","Screenrotation is now turned OFF","dialog-information") - RotationOFF.show () -if status[0] == "off": - writeFile(os.path.join(path, 'status.txt'), ["on"]) - Notify.init ("Rotation-OFF") - RotationON=Notify.Notification.new ("Rotation","Screenrotation is now turned ON","dialog-information") - RotationON.show () diff --git a/autorotate/status.txt b/autorotate/status.txt deleted file mode 100644 index e8fd903..0000000 --- a/autorotate/status.txt +++ /dev/null @@ -1 +0,0 @@ -on \ No newline at end of file diff --git a/autorotate/touch.py b/autorotate/touch.py deleted file mode 100644 index 54f50d3..0000000 --- a/autorotate/touch.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python2 -import os - -def readFile(path): #self.filename - myDatei = open(path, "r") - myList = [] - #Liste aus Datei erstellen - for Line in myDatei: - Line = Line.rstrip() - #Line = Line.decode('utf8') - myList.append(Line) - myDatei.close() - return(myList) - -def writeFile(path, myList): #self.filename - myDatei = open(path, "w") - #Liste aus Datei erstelle - myDatei.writelines(myList) - myDatei.close() - - -devicename = "NTRG0001:01 1B96:1B05" -penname = "'NTRG0001:01 1B96:1B05 Pen'" -path = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) - -status = readFile(os.path.join(path, 'touch.txt')) -if str(status[0]) == "on": - writeFile(os.path.join(path, 'touch.txt'), ["off"]) -if str(status[0]) == "off": - writeFile(os.path.join(path, 'touch.txt'), ["on"]) diff --git a/autorotate/touch.txt b/autorotate/touch.txt deleted file mode 100644 index b3d8640..0000000 --- a/autorotate/touch.txt +++ /dev/null @@ -1 +0,0 @@ -on