Some minor docstuff ; functionally equivalent
This commit is contained in:
parent
7df811b9a1
commit
394e80ad4e
@ -40,8 +40,6 @@ class Bitcoin(IntervalModule):
|
|||||||
("colorize", "Enable color change on price increase/decrease"),
|
("colorize", "Enable color change on price increase/decrease"),
|
||||||
("color_up", "Color for price increases"),
|
("color_up", "Color for price increases"),
|
||||||
("color_down", "Color for price decreases"),
|
("color_down", "Color for price decreases"),
|
||||||
("leftclick", "URL to visit or command to run on left click"),
|
|
||||||
("rightclick", "URL to visit or command to run on right click"),
|
|
||||||
("interval", "Update interval."),
|
("interval", "Update interval."),
|
||||||
("symbol", "Symbol for bitcoin sign"),
|
("symbol", "Symbol for bitcoin sign"),
|
||||||
"status"
|
"status"
|
||||||
@ -54,16 +52,14 @@ class Bitcoin(IntervalModule):
|
|||||||
colorize = False
|
colorize = False
|
||||||
color_up = "#00FF00"
|
color_up = "#00FF00"
|
||||||
color_down = "#FF0000"
|
color_down = "#FF0000"
|
||||||
leftclick = "electrum"
|
|
||||||
rightclick = "https://bitcoinaverage.com/"
|
|
||||||
interval = 600
|
interval = 600
|
||||||
status = {
|
status = {
|
||||||
"price_up": "▲",
|
"price_up": "▲",
|
||||||
"price_down": "▼",
|
"price_down": "▼",
|
||||||
}
|
}
|
||||||
|
|
||||||
on_leftclick = "handle_leftclick"
|
on_leftclick = "electrum"
|
||||||
on_rightclick = "handle_rightclick"
|
on_rightclick = [user_open, "https://bitcoinaverage.com/"]
|
||||||
|
|
||||||
_price_prev = 0
|
_price_prev = 0
|
||||||
|
|
||||||
@ -128,9 +124,3 @@ class Bitcoin(IntervalModule):
|
|||||||
"full_text": self.format.format(**fdict),
|
"full_text": self.format.format(**fdict),
|
||||||
"color": color,
|
"color": color,
|
||||||
}
|
}
|
||||||
|
|
||||||
def handle_leftclick(self):
|
|
||||||
user_open(self.leftclick)
|
|
||||||
|
|
||||||
def handle_rightclick(self):
|
|
||||||
user_open(self.rightclick)
|
|
||||||
|
@ -342,6 +342,7 @@ class Network(IntervalModule, ColorRangeModule):
|
|||||||
self.kbs_arr = [0.0] * self.graph_width
|
self.kbs_arr = [0.0] * self.graph_width
|
||||||
|
|
||||||
def cycle_interface(self, increment=1):
|
def cycle_interface(self, increment=1):
|
||||||
|
"""Cycle through available interfaces in `increment` steps. Sign indicates direction."""
|
||||||
interfaces = [i for i in netifaces.interfaces() if i not in self.ignore_interfaces]
|
interfaces = [i for i in netifaces.interfaces() if i not in self.ignore_interfaces]
|
||||||
if self.interface in interfaces:
|
if self.interface in interfaces:
|
||||||
next_index = (interfaces.index(self.interface) + increment) % len(interfaces)
|
next_index = (interfaces.index(self.interface) + increment) % len(interfaces)
|
||||||
|
Loading…
Reference in New Issue
Block a user