예제 #1
0
파일: apps.py 프로젝트: hacklabcz/pycious
def volume():
    """
    Returns: a tuple (vol, state)
    """
    st, out = getstatusoutput('amixer get Master')
    for line in out.split('\n'):
        m = re.match('.* \[(\d+)%\] +\[(.+)\]', line)
        if m:
            vol, st = m.groups()
            return int(vol), st 
예제 #2
0
파일: apps.py 프로젝트: hacklabcz/pycious
 def f_dec(self):
     getstatusoutput('amixer -q set Master 5%-')
     self()
예제 #3
0
파일: apps.py 프로젝트: hacklabcz/pycious
 def f_inc(self):
     getstatusoutput('amixer -q set Master 5%+')
     self()
예제 #4
0
파일: apps.py 프로젝트: fsquillace/pycious
 def f_dec(self):
     getstatusoutput('amixer -q set Master 5%-')
     self()
예제 #5
0
파일: apps.py 프로젝트: fsquillace/pycious
 def f_inc(self):
     getstatusoutput('amixer -q set Master 5%+')
     self()