power menu, redshift, polybar
This commit is contained in:
18
.config/polybar/scripts/info-ethermine/README.md
Normal file
18
.config/polybar/scripts/info-ethermine/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Script: info-ethermine
|
||||
|
||||
This script reports the current hashrate (in MH/s) for your ethermine account.
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
* `python-requests`
|
||||
|
||||
|
||||
## Module
|
||||
|
||||
```ini
|
||||
[module/info-ethermine]
|
||||
type = custom/script
|
||||
exec = ~/polybar-scripts/info-ethermine.sh
|
||||
interval = 60
|
||||
```
|
||||
12
.config/polybar/scripts/info-ethermine/info-ethermine.py
Normal file
12
.config/polybar/scripts/info-ethermine/info-ethermine.py
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
|
||||
miner = ""
|
||||
|
||||
data = requests.get(f"https://api.ethermine.org/miner/{miner}/dashboard").json()['data']['statistics']
|
||||
data = data[-1]
|
||||
current_hash_rate = data["currentHashrate"]
|
||||
currentMHs = round(current_hash_rate/1e6, 1)
|
||||
|
||||
print(f"{currentMHs}MH/s")
|
||||
Reference in New Issue
Block a user