Пример #1
0
def autostart():
	import os

	for f in autostart_files_iter():
		try:
			d = DesktopFile(f)
		except Exception, e:
			print '%s while parsing %s: %s' % (e.__class__.__name__, f, str(e))
			continue
		# print d
		d = d['Desktop Entry']
		if 'Hidden' in d and d['Hidden']:
			print 'autostart: Skipping uninstalled %s' % d['Name']
			continue
		if d['Type'] != 'Application':
			print 'autostart: Skipping non-application %s' % d['Name']
			continue
		if 'NotShowIn' in d and environment_name in d['NotShowIn']:
			print 'autostart: Skipping %s which is EXPLICITLY not to be started in %s' % (d['Name'], environment_name)
			continue
		compat_environs = set([environment_name] + ignore_only_shown_in_environs)
		if 'OnlyShowIn' in d \
				and compat_environs.intersection(d['OnlyShowIn']) == set() \
				and os.path.split(f)[1] not in ignore_only_shown_in_filenames:
			print 'autostart: Skipping %s which is implicitly not to be started in %s' % (d['Name'], ', '.join(compat_environs))
			continue
		print 'autostart: Starting %s...' % d['Name']

		# FIXME: shell=True here is lazyness to handle quoted
		# arguments, see above commented out DesktopFile::Exec:
		comm = d['Exec']
		if d['Terminal']:
			comm = launch.terminal(comm)
		launch._launch(comm, shell=True)
Пример #2
0
def fixX11():
	import threading

	notify("Applying X11 settings")
	_launch("setxkbmap -option terminate:ctrl_alt_bksp".split())
	_launch("setxkbmap -option keypad:pointerkeys".split())

	wacom.apply_profile('Wacom Intuos3 9x12 pad', 'gimp')

	subprocess.call('dispwin -I /home/dss/colorhug/results/samsung/samsung.icc'.split())

	t = threading.Timer(xmodmap_delay, do_xmodmap)
	t.daemon = True
	t.start()
Пример #3
0
def fixX11():
	notify("Applying X11 settings")
	_launch(['xinput', 'set-float-prop', 'Primax Lenovo Laser Mouse', 'Device Accel Constant Deceleration', '2'])
	_launch(['xinput', 'set-float-prop', 'Dell BT Mouse', 'Device Accel Constant Deceleration', '2'])
	_launch("setxkbmap -option terminate:ctrl_alt_bksp".split())
	_launch("setxkbmap -option keypad:pointerkeys".split())

	wacom.apply_profile('Wacom Intuos3 9x12 pad', 'gimp')
Пример #4
0
def fixX11():
	notify("Applying X11 settings")
	_launch("setxkbmap -option terminate:ctrl_alt_bksp".split())
	_launch("setxkbmap -option keypad:pointerkeys".split())

	wacom.apply_profile('Wacom Intuos3 9x12 pad', 'gimp')
Пример #5
0
def do_xmodmap():
	_launch(['xmodmap', os.path.expanduser('~/.xmodmaprc')])
Пример #6
0
def fix_tray():
	try:
		_launch(wmiirc.tray + ('-SE',))
	except AttributeError:
		notify('Warning: No Tray', 'tray')