コード例 #1
0
def intel_vol(command):
    try:
        import music
        if music.is_playing():
            # NOTE: These commands are executed async, so we can't
            # catch errors here. The music plugin will direct the
            # request back to us if it can't handle it.
            if command in ('up', 'down'):
                music.command('Volume %s' % command.title())
            else:
                music.command(command.title())
            return
    except ImportError:
        pass

    globals()['vol_%s' % command]()
コード例 #2
0
ファイル: mixer.py プロジェクト: DarkStarSword/wmii-config
def intel_vol(command):
	try:
		import music
		if music.is_playing():
			# NOTE: These commands are executed async, so we can't
			# catch errors here. The music plugin will direct the
			# request back to us if it can't handle it.
			if command in ('up', 'down'):
				music.command('Volume %s' % command.title())
			else:
				music.command(command.title())
			return
	except ImportError:
		pass

	globals()['vol_%s'%command]()
コード例 #3
0
ファイル: commands.py プロジェクト: GrumbelsTrashbin/junk
def music(command):
    import music
    music.command(command)
コード例 #4
0
ファイル: XF86keys.py プロジェクト: DarkStarSword/wmii-config
def music(command):
	import music
	music.command(command)