Example #1
0
def voldown():
	"""On volume up request we:
	- Tell the window manager to decrease the volume and
	- Tell mplayer to increase the volume
	"""
	xorg.shell('xdotool', 'key', 'XF86AudioLowerVolume')
	fifo.send("volume -20")
	return 'ok'
Example #2
0
def voldown():
    """On volume up request we:
	- Tell the window manager to decrease the volume and
	- Tell mplayer to increase the volume
	"""
    xorg.shell('xdotool', 'key', 'XF86AudioLowerVolume')
    fifo.send("volume -20")
    return 'ok'
Example #3
0
def mute():
	"""On mute toggle request we:
	- Tell mplayer to toggle the volume
	- Tell the window manager to toggle the volume and
	"""
	if fifo.send("mute") == 'ok':
		return 'ok'

	else:
		xorg.shell('xdotool', 'key', 'XF86AudioMute')

	return 'ok'
Example #4
0
def mute():
    """On mute toggle request we:
	- Tell mplayer to toggle the volume
	- Tell the window manager to toggle the volume and
	"""
    if fifo.send("mute") == 'ok':
        return 'ok'

    else:
        xorg.shell('xdotool', 'key', 'XF86AudioMute')

    return 'ok'
Example #5
0
	def run(self):
		xdir = 1
		while True:
			mouse_pos = xorg.get_mouse_pos()
			logging.debug('mouse shift from ' + str(mouse_pos))
			if mouse_pos is not None:
				x, y = mouse_pos
				x = int(x)
				# if x > 0:
					# x -= 1
				# else:
					# x += 1
				x += xdir
				xdir = -xdir

				xorg.shell('xdotool', 'mousemove', str(x), y)

			time.sleep(self.delay)
Example #6
0
    def run(self):
        xdir = 1
        while True:
            mouse_pos = xorg.get_mouse_pos()
            logging.debug('mouse shift from ' + str(mouse_pos))
            if mouse_pos is not None:
                x, y = mouse_pos
                x = int(x)
                # if x > 0:
                # x -= 1
                # else:
                # x += 1
                x += xdir
                xdir = -xdir

                xorg.shell('xdotool', 'mousemove', str(x), y)

            time.sleep(self.delay)