コード例 #1
0
ファイル: date.py プロジェクト: alberand/lemonbar
    def __init__(self, value=''):
        '''
        Params:
            bg: background color
            fg: foreground color
            icon: icon
        '''
        Widget.__init__(self)
        self.value = value

        self.bg = None
        self.fg = colors['c_white']
        self.icon = icons['clock']
コード例 #2
0
    def __init__(self, value=''):
        '''
        Params:
            bg: background color
            fg: foreground color
            icon: icon
        '''
        Widget.__init__(self)
        self.value = value

        self.bg = None
        self.fg = None
        self.icon = None
        self.gaps = (0, 0)
コード例 #3
0
ファイル: WiFiHS.py プロジェクト: alberand/lemonbar
    def __init__(self, value=''):
        '''
        Params:
            bg: background color
            fg: foreground color
            icon: icon
        '''
        Widget.__init__(self)
        self.value = value

        self.bg = None
        self.fg = colors['c_gray_l']
        self.icon = icons['ssid']
        self.gaps = (10, 7)
        self.show_text = False
コード例 #4
0
    def __init__(self, value=''):
        '''
        Params:
            bg: background color
            fg: foreground color
            icon: icon
        '''
        Widget.__init__(self)
        self.value = value

        self.bg = None
        self.fg = colors['c_white']
        self.icon = icons['thermometer_half']
        self.gaps = (10, 7)
        self.temp = 0
        self.show_text = False
コード例 #5
0
ファイル: __init__.py プロジェクト: tyleretchart/vic
 def rebuild_network(self, hostnames):
     self.widgets = {}
     for name, ip in hostnames.items():
         try:
             r = requests.get(url='http://{}:8000/widget'.format(ip))
             if r.json()["msg"] == "True":
                 self.widgets[name] = Widget(name=name, ip=ip)
         except Exception as e:
             pass
コード例 #6
0
ファイル: battery.py プロジェクト: alberand/lemonbar
    def __init__(self, value=''):
        '''
        Params:
            bg: background color
            fg: foreground color
            icon: icon
        '''
        Widget.__init__(self)
        self.value = value

        self.bg = None
        self.fg = colors['c_white']
        self.icon = icons['battery_full']
        self.gaps = (10, 7)
        self.charge = 0
        self.show_text = False
        # 0: Normal. (charge > 30% or Plugged)
        # 1: Unplugged. (charge > 30% and unplugged)
        # 2: 30% limit. (charge < 30% and unplugged)
        # 3: 10% limit. (charge < 10% and unplugged)
        # 4: Charging. (charge < 30% and plugged)
        self.status = 0
コード例 #7
0
ファイル: __init__.py プロジェクト: tyleretchart/vic
 def add_widget(self, hostname, ip):
     self.widgets[hostname] = Widget(name=hostname, ip=ip)