diff --git a/Makefile b/Makefile
index 8c7505a..4fdf983 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
.PHONY: build install uninstall clean deb
-package = xmrigui_1.0-0_amd64
+package = xmrigui_1.1-0_amd64
build:
pyinstaller --onefile -w xmrigui.py
diff --git a/README.md b/README.md
index 5cefe82..e333daa 100644
--- a/README.md
+++ b/README.md
@@ -8,25 +8,34 @@ XMRiGUI is free and open-source crypto miner for Linux. It uses [XMRig](http://g
## Features
Coins:
-* **Monero**
-* Ravencoin (soon)
-* Chukwa (soon)
-* CCX (soon)
-* Keva (soon)
-* Dero (soon)
-* Talleo (soon)
-* Safex (soon)
-* ArQmA (soon)
-* NINJA (soon)
-* Wownero (soon)
+* Monero
+* Ravencoin
+* Uplexa
+* Chukwa
+* Chukwa v2
+* CCX
+* Keva
+* Dero
+* Talleo
+* Safex
+* ArQmA
+* NINJA
+* Wownero
Other cryptos **may** work if the algorithm is the same.
Mining backends:
* **CPU** x64
* **CPU** ARMv8 (soon)
-* **OpenCL** for AMD GPUs (soon)
-* **CUDA** for NVIDIA GPUs (soon)
+* **OpenCL** for AMD GPUs
+* **CUDA** for NVIDIA GPUs
+
+If OpenCL doesn't work try to install [this driver](https://github.com/Diolinux/amd-opencl-pro-linux-resolve).
+
+
+For CUDA to work you need to build [Cuda plugin](http://github.com/xmrig/xmrig-cuda#linux-usage) and put it into `/opt/xmrigui/`
+
+**I NEVER TESTED OPENCL OR CUDA BECAUSE I DON'T HAVE THAT GOOD GPU! PLEASE TEST AND IF SOMETHING GOES WRONG PLEASE REPORT!**
diff --git a/settings.json b/settings.json
index e7b5987..431bc2b 100644
--- a/settings.json
+++ b/settings.json
@@ -4,5 +4,9 @@
"user": "YOUR_MONERO_WALLET",
"password": "PASSWORD / YOUR_WORKER_NAME",
"donate": "1",
- "threads": "0"
+ "threads": "0",
+ "cuda": false,
+ "opencl": false,
+ "cpu": true,
+ "coin": 0
}
diff --git a/xmrig b/xmrig
index 53a12c7..c807417 100755
Binary files a/xmrig and b/xmrig differ
diff --git a/xmrigui.desktop b/xmrigui.desktop
index de6805d..fae4b9d 100644
--- a/xmrigui.desktop
+++ b/xmrigui.desktop
@@ -1,6 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
-Version=1.0
+Version=1.1
Type=Application
Terminal=false
Exec=/usr/local/bin/xmrigui
diff --git a/xmrigui.py b/xmrigui.py
index 27aea3b..5b0d60b 100644
--- a/xmrigui.py
+++ b/xmrigui.py
@@ -43,32 +43,27 @@ def call_instance():
class XMRiGUI(Gtk.Window):
def __init__(self):
super().__init__()
- self.user = os.getlogin()
- self.settings_path = f'/home/{self.user}/.config/xmrigui.json'
- self.xmrig_path = '/opt/xmrigui/xmrig'
- self.icon_path = '/usr/share/icons/hicolor/256x256/apps/xmrigui.png'
+ self.load_data()
self.config = self.get_config()
self.draw()
if self.config['mine']: self.start_mining(save=False)
def get_config(self):
- config = '''{
- "mine": false,
- "pool": "POOL",
- "user": "YOUR_MONERO_WALLET",
- "password": "PASSWORD / YOUR_WORKER_NAME",
- "donate": "1",
- "threads": "0"
-}
-'''
-
try:
- with open(self.settings_path, 'r') as f:
- return json.loads(f.read())
+ with open(self.settings_path, 'r') as f: pass
+ try:
+ with open(self.settings_path, 'r') as f:
+ config = json.loads(f.read())
+ test = config['coin']
+ return config
+ except:
+ with open(self.settings_path, 'w') as f:
+ f.write(self.raw_config)
+ return json.loads(self.raw_config)
except:
with open(self.settings_path, 'x'): pass
- with open(self.settings_path, 'w')as f: f.write(config)
- return json.loads(config)
+ with open(self.settings_path, 'w') as f: f.write(self.raw_config)
+ return json.loads(self.raw_config)
def onSwitch(self, source, state):
if state: self.start_mining()
@@ -78,15 +73,19 @@ def start_mining(self, save=True):
if save:
self.config['mine'] = True
self.save('switch', restart=False)
-
- pool = f' --url={self.config["pool"]}'
- user = f' --user={self.config["user"]}'
- password = f' --pass={self.config["password"]}'
- donate = f' --donate-level={self.config["donate"]}'
- if self.config['threads'] != '0': threads = f' --threads={self.config["threads"]}'
- else: threads = ''
-
- os.system(self.xmrig_path + ' --background --coin=monero' + pool + user + password + donate + threads)
+
+ args = ''
+ args += f' --algo={self.algos[self.config["coin"]]}'
+ args += f' --url={self.config["pool"]}'
+ args += f' --user={self.config["user"]}'
+ args += f' --pass={self.config["password"]}'
+ args += f' --donate-level={self.config["donate"]}'
+ if self.config['threads'] != '0': args += f' --threads={self.config["threads"]}'
+ if self.config['cuda']: args += f' --cuda --cuda-loader={self.cuda_plugin_path}'
+ if self.config['opencl']: args += ' --opencl'
+ if not self.config['cpu']: args += ' --no-cpu'
+
+ os.system(self.xmrig_path + ' --background' + args)
def stop_mining(self, save=True):
if save:
@@ -100,14 +99,19 @@ def save(self, source, restart=True):
self.config['password'] = self.pass_entry.get_text()
self.config['donate'] = self.donate_entry.get_text()
self.config['threads'] = self.threads_entry.get_text()
+ self.config['cuda'] = self.cuda_switch.get_active()
+ self.config['opencl'] = self.opencl_switch.get_active()
+ self.config['cpu'] = self.cpu_switch.get_active()
+ self.config['coin'] = self.crypto_chooser.get_active()
+ print(self.config['coin'])
with open(self.settings_path, 'w') as f: f.write(json.dumps(self.config))
if restart and self.config['mine']:
- self.stop_mining()
- self.start_mining()
+ self.stop_mining(save=False)
+ self.start_mining(save=False)
- def draw(self):
+ def draw(self, update=True):
self.set_title('XMRiGUI')
self.icon = GdkPixbuf.Pixbuf.new_from_file(filename=self.icon_path)
self.set_icon(self.icon)
@@ -185,9 +189,102 @@ def draw(self):
self.settings.attach(self.donate_box, 1,0,1,1)
self.settings.attach(self.threads_box, 1,1,1,1)
self.settings.attach(self.save_button, 1,2,1,1)
+
+ self.advanched_settings = Gtk.Expander(label='Advanched options')
+ self.advanched_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=10)
+ self.advanched_grid = Gtk.Grid(column_homogeneous=True, row_spacing=10)
+
+ self.cuda_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
+ self.cuda_label = Gtk.Label(label='NVidia GPU')
+ self.cuda_switch = Gtk.Switch()
+ self.cuda_switch.connect('state-set', self.save)
+ self.cuda_switch.set_active(self.config['cuda'])
+ self.cuda_box.pack_start(self.cuda_label, True, False, 0)
+ self.cuda_box.pack_start(self.cuda_switch, True, False, 0)
+
+ self.opencl_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
+ self.opencl_label = Gtk.Label(label='AMD GPU')
+ self.opencl_switch = Gtk.Switch()
+ self.opencl_switch.connect('state-set', self.save)
+ self.opencl_switch.set_active(self.config['opencl'])
+ self.opencl_box.pack_start(self.opencl_label, True, False, 0)
+ self.opencl_box.pack_start(self.opencl_switch, True, False, 0)
+
+ self.cpu_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
+ self.cpu_label = Gtk.Label(label='CPU')
+ self.cpu_switch = Gtk.Switch()
+ self.cpu_switch.connect('state-set', self.save)
+ self.cpu_switch.set_active(self.config['cpu'])
+ self.cpu_box.pack_start(self.cpu_label, True, False, 0)
+ self.cpu_box.pack_start(self.cpu_switch, True, False, 0)
+
+ self.crypto_chooser = Gtk.ComboBoxText()
+ self.crypto_chooser.set_entry_text_column(0)
+ self.crypto_chooser.connect("changed", self.save)
+ for crypto in self.cryptos: self.crypto_chooser.append_text(crypto)
+ if update: self.crypto_chooser.set_active(self.config['coin'])
+ else: self.crypto_chooser.set_active(self.config['coin']+1)
+
+ self.advanched_grid.attach(self.cuda_box, 0,0,1,1)
+ self.advanched_grid.attach(self.opencl_box, 0,1,1,1)
+ self.advanched_grid.attach(self.cpu_box, 0,2,1,1)
+ self.advanched_grid.attach(self.crypto_chooser, 1,0,1,2)
+ self.advanched_box.pack_start(self.advanched_grid, True, True, 20)
+ self.advanched_settings.add(self.advanched_box)
self.box.pack_start(self.main_box, True, True, 0)
self.box.pack_start(self.settings, True, True, 0)
+ self.box.pack_start(self.advanched_settings, True, True, 0)
+
+ def load_data(self):
+ self.user = os.getlogin()
+ self.settings_path = f'/home/{self.user}/.config/xmrigui.json'
+ self.xmrig_path = '/opt/xmrigui/xmrig'
+ self.icon_path = '/usr/share/icons/hicolor/256x256/apps/xmrigui.png'
+ self.cuda_plugin_path = '/opt/xmrigui/libxmrig-cuda.so'
+ self.cryptos = [
+ 'Monero',
+ 'Ravencoin',
+ 'Uplexa',
+ 'Chukwa',
+ 'Chukwa v2',
+ 'CCX',
+ 'Keva',
+ 'Dero',
+ 'Talleo',
+ 'Safex',
+ 'ArQmA',
+ 'NINJA',
+ 'Wownero'
+ ]
+ self.algos = [
+ 'rx/0',
+ 'kawpow',
+ 'cn/upx2',
+ 'argon2/chukwa',
+ 'argon2/chukwav2',
+ 'cn/ccx',
+ 'rx/keva',
+ 'astrobwt',
+ 'cn-pico/tlo',
+ 'rx/sfx',
+ 'rx/arq',
+ 'argon2/ninja',
+ 'rx/wow'
+ ]
+ self.raw_config = '''{
+ "mine": false,
+ "pool": "POOL",
+ "user": "YOUR_MONERO_WALLET",
+ "password": "PASSWORD / YOUR_WORKER_NAME",
+ "donate": "1",
+ "threads": "0",
+ "cuda": false,
+ "opencl": false,
+ "cpu": true,
+ "coin": 0
+}
+'''
class AppIndicator():
@@ -217,7 +314,7 @@ def quit(self, widget):
def show(self, widget):
self.window.config = self.window.get_config()
- self.window.draw()
+ self.window.draw(update=False)
self.window.show_all()
diff --git a/xmrigui_1.0-0_amd64/DEBIAN/rules b/xmrigui_1.0-0_amd64/DEBIAN/rules
deleted file mode 100644
index 575541f..0000000
--- a/xmrigui_1.0-0_amd64/DEBIAN/rules
+++ /dev/null
@@ -1,3 +0,0 @@
-override_dh_fixperms:
- dh_fixperms
- chmod 666 /opt/xmrigui/settings.json
\ No newline at end of file
diff --git a/xmrigui_1.0-0_amd64/DEBIAN/control b/xmrigui_1.1-0_amd64/DEBIAN/control
similarity index 93%
rename from xmrigui_1.0-0_amd64/DEBIAN/control
rename to xmrigui_1.1-0_amd64/DEBIAN/control
index ab99e63..3bd43e3 100644
--- a/xmrigui_1.0-0_amd64/DEBIAN/control
+++ b/xmrigui_1.1-0_amd64/DEBIAN/control
@@ -1,6 +1,6 @@
Package: xmrigui
Source: xmrigui
-Version: 1.0
+Version: 1.1
Architecture: amd64
Maintainer: LinuxHeki
Description: GUI for XMRig crypto miner