Add option to choose bitcoin symbol

This commit is contained in:
David Foucher 2015-02-09 22:54:11 +01:00
parent 7d8ebb948f
commit b6f6eeaf36

View File

@ -28,6 +28,7 @@ class Bitcoin(IntervalModule):
* {last_tx_value} * {last_tx_value}
* {balance_btc} * {balance_btc}
* {balance_fiat} * {balance_fiat}
* {symbol}
""" """
@ -42,10 +43,12 @@ class Bitcoin(IntervalModule):
("leftclick", "URL to visit or command to run on left click"), ("leftclick", "URL to visit or command to run on left click"),
("rightclick", "URL to visit or command to run on right click"), ("rightclick", "URL to visit or command to run on right click"),
("interval", "Update interval."), ("interval", "Update interval."),
("symbol", "Symbol for bitcoin sign"),
"status" "status"
) )
format = "฿ {status}{last_price}" format = "{symbol} {status}{last_price}"
currency = "USD" currency = "USD"
symbol = "฿"
wallet_addresses = "" wallet_addresses = ""
color = "#FFFFFF" color = "#FFFFFF"
colorize = False colorize = False
@ -79,6 +82,7 @@ class Bitcoin(IntervalModule):
def run(self): def run(self):
price_data = self._fetch_price_data() price_data = self._fetch_price_data()
fdict = { fdict = {
"symbol": self.symbol,
"daily_average": price_data["24h_avg"], "daily_average": price_data["24h_avg"],
"ask_price": price_data["ask"], "ask_price": price_data["ask"],
"bid_price": price_data["bid"], "bid_price": price_data["bid"],