Skip to content

Commit 0beba63

Browse files
committed
version 1.0.1
fix uninstall edit installer
1 parent 827fa80 commit 0beba63

4 files changed

Lines changed: 15 additions & 9 deletions

File tree

installer.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@
33
import os
44
import sys
55

6-
APP_VERSION = '1.0.0'
6+
APP_VERSION = '1.0.1'
77

88
if os.geteuid() != 0:
99
print("Root Access required, run as `root` user or use `sudo`.")
1010
sys.exit()
1111

1212

1313
print('Start downloading tuxedo keyboard.')
14-
filename = wget.download("https://github.com/tuxedocomputers/tuxedo-keyboard/archive/refs/heads/master.zip")
14+
try:
15+
filename = wget.download("https://github.com/tuxedocomputers/tuxedo-keyboard/archive/refs/heads/master.zip")
16+
except Exception:
17+
print("Error in download! check your internet connection.")
18+
sys.exit()
1519

1620
print('\nStart unpack tuxedo keyboard.')
1721
shutil.unpack_archive(filename)
@@ -20,12 +24,12 @@
2024

2125
print('Start Compile and install tuxedo keyboard.')
2226
os.chdir("tuxedo-keyboard-master")
23-
os.system("make clean")
24-
os.system("make")
25-
os.system("make clean")
26-
os.system("make dkmsinstall")
27+
os.system("make clean > /dev/null")
28+
os.system("make > /dev/null")
29+
os.system("make clean > /dev/null")
30+
os.system("make dkmsinstall > /dev/null")
2731
os.system("echo tuxedo_keyboard >> /etc/modules")
28-
os.system('echo "options tuxedo_keyboard mode=0 color_left=0xFF0000 color_center=0x00FF00 color_right=0x0000FF" > /etc/modprobe.d/tuxedo_keyboard.conf')
32+
os.system('echo "options tuxedo_keyboard mode=0 color_left=0xFFFFFF color_center=0xFFFFFF color_right=0xFFFFFF" > /etc/modprobe.d/tuxedo_keyboard.conf')
2933

3034
os.chdir("..")
3135
shutil.rmtree("tuxedo-keyboard-master")

main.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from math import fabs
12
from PyQt5 import QtCore, QtGui, QtWidgets
23
import qdarktheme
34
import sys
@@ -12,7 +13,7 @@
1213
import webbrowser
1314

1415

15-
APP_VERSION = '1.0.0'
16+
APP_VERSION = '1.0.1'
1617

1718

1819
def get_file(name):
@@ -456,7 +457,8 @@ def uninstall(self):
456457
quiz = quiz.exec()
457458

458459
if quiz == QtWidgets.QMessageBox.Yes:
459-
src = os.popen("ls /usr/src/ | grep tuxedo").read()
460+
lbm.state(False)
461+
src = os.popen("ls /usr/src/ | grep tuxedo").read().strip()
460462
version = src.replace("tuxedo-keyboard-", "")
461463
src = src.replace("-"+version, "")
462464
cmd = f"sleep 2;dkms remove -m {src} -v {version} --all;rm -rf /usr/src/{src}-{version};rm /etc/modprobe.d/tuxedo_keyboard.conf;"\

screenshot/screen1.png

-4.75 KB
Loading

screenshot/screen2.png

-4.96 KB
Loading

0 commit comments

Comments
 (0)