def setRotation(self, o): for d in self.__devices: runCmd("%s set %s Rotate %s" % (self.__xsetwacom, d, wacomRotations[o]))
def getPenButton(self): return runCmd('%s get %s %s' % (self.__xsetwacom, self.__devices[0], wacomButton))[0].strip()
def __findDevices(self): dev = runCmd("%s list dev | awk {'print $1'}" % self.__xsetwacom) return map(lambda s: s.strip(), dev)
def setRotation(self, o): runCmd("%s --output LVDS --rotate %s" % (self.__xrandr, o)) self.__wacom.setRotation(o) self.__updateArrowKeys(o)
def getRotation(self): l = runCmd(self.__xrandr) l = [x for x in l if re.search(r'(LVDS|default) connected', x)][0] l = l.split(' ')[3] l = re.sub(r'\(', '', l) return l.strip()
def __getDisplays(): who = runCmd('/usr/bin/who -s') l = filter(lambda s: re.search('^[^\s]+\s+(:[\.\d]+)', s), who) return map(lambda x: (re.split('\s+', x)[0], re.split('\s+', x)[1]), l)
def read(self): l = runCmd('hddtemp %s' % self.__disk) for x in l: m = re.match('[^:]+:[^:]+:\s+(\d+)\s+C', x) if m: return float(m.group(1)) return None