예제 #1
0
	def setRotation(self, o):
		for d in self.__devices:
			runCmd("%s set %s Rotate %s" % (self.__xsetwacom, d, wacomRotations[o]))
예제 #2
0
	def getPenButton(self):
		return runCmd('%s get %s %s' % (self.__xsetwacom, self.__devices[0], wacomButton))[0].strip()
예제 #3
0
	def __findDevices(self):
		dev = runCmd("%s list dev | awk {'print $1'}" % self.__xsetwacom)
		return map(lambda s: s.strip(), dev)
예제 #4
0
	def setRotation(self, o):
		runCmd("%s --output LVDS --rotate %s" % (self.__xrandr, o))
		self.__wacom.setRotation(o)
		self.__updateArrowKeys(o)
예제 #5
0
	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()
예제 #6
0
파일: X11.py 프로젝트: minad/thinkpad-tools
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)
예제 #7
0
	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