예제 #1
0
파일: web.py 프로젝트: hacklabcz/pycious
    def __init__(self,
                 widget_name,
                 username,
                 password,
                 server='imap.gmail.com',
                 port=993):
        TextBoxWidget.__init__(self, widget_name)

        # get the mail object
        self.mail = Mail(username, password, server, port)
예제 #2
0
파일: system.py 프로젝트: hacklabcz/pycious
 def __init__(self, widget_name):
     TextBoxWidget.__init__(self, widget_name)
예제 #3
0
파일: apps.py 프로젝트: hacklabcz/pycious
    def __init__(self, widget_name):
        TextBoxWidget.__init__(self, widget_name)

        table = {((), 1): self.f_inc, ((), 3): self.f_dec}
        self.buttons(table)
예제 #4
0
파일: apps.py 프로젝트: hacklabcz/pycious
# Importing apps functions
from pycious.lib.apps import volume
# Importing Base widget
from pycious.api.widget import TextBoxWidget

from pycious.lib.common import getstatusoutput

# TODO Create a dictionary widget

volumewidget = TextBoxWidget('volumewidget')
butts = {}
butts[
    '{}, 1'] = """function () awful.util.spawn('amixer -q set Master 5%+') end"""
butts[
    '{}, 3'] = """function () awful.util.spawn('amixer -q set Master 5%-') end"""
volumewidget.buttons(butts)
# Update to a initial state
volumewidget.text('<b><small>' + volume() + '</small></b>')


class VolumeTextWidget(TextBoxWidget):
    def __init__(self, widget_name):
        TextBoxWidget.__init__(self, widget_name)

        table = {((), 1): self.f_inc, ((), 3): self.f_dec}
        self.buttons(table)

# TODO try to complete callback function problem

    def f_inc(self):
        getstatusoutput('amixer -q set Master 5%+')
예제 #5
0
파일: web.py 프로젝트: fsquillace/pycious
 def __init__(self, widget_name, username, password):
     TextBoxWidget.__init__(self, widget_name)
     
     # get the grss object
     self.grss = Grss(username, password)
예제 #6
0
파일: web.py 프로젝트: fsquillace/pycious
 def __init__(self, widget_name, username, password, server='imap.gmail.com', port=993):
     TextBoxWidget.__init__(self, widget_name)
     
     # get the mail object
     self.mail = Mail(username, password, server, port)
예제 #7
0
 def setUp(self):
     self.textwidget = TextBoxWidget('mailwidget')
예제 #8
0
 def __init__(self, widget_name):
     TextBoxWidget.__init__(self, widget_name)
예제 #9
0
파일: apps.py 프로젝트: fsquillace/pycious
 def __init__(self, widget_name):
     TextBoxWidget.__init__(self, widget_name)
     
     table = {((), 1):self.f_inc, ((), 3):self.f_dec}
     self.buttons(table) 
예제 #10
0
파일: apps.py 프로젝트: fsquillace/pycious
# Importing apps functions
from pycious.lib.apps import volume
# Importing Base widget
from pycious.api.widget import TextBoxWidget

from pycious.lib.common import getstatusoutput

# TODO Create a dictionary widget


volumewidget = TextBoxWidget('volumewidget')
butts = {}
butts['{}, 1'] = """function () awful.util.spawn('amixer -q set Master 5%+') end"""
butts['{}, 3'] = """function () awful.util.spawn('amixer -q set Master 5%-') end"""
volumewidget.buttons(butts)
# Update to a initial state
volumewidget.text('<b><small>'+volume()+'</small></b>')




class VolumeTextWidget(TextBoxWidget):
    def __init__(self, widget_name):
        TextBoxWidget.__init__(self, widget_name)
        
        table = {((), 1):self.f_inc, ((), 3):self.f_dec}
        self.buttons(table) 

# TODO try to complete callback function problem

    def f_inc(self):
예제 #11
0
파일: web.py 프로젝트: hacklabcz/pycious
    def __init__(self, widget_name, username, password):
        TextBoxWidget.__init__(self, widget_name)

        # get the grss object
        self.grss = Grss(username, password)