pino
Useless X11 Python notification daemon
git clone https://git.pi66.xyz/pino
About | Files | Commits | Refs | License
Updated install
Author: pixel2175
Date: 2024-12-25 17:48
commit: 20b11fc4
Stat
| M | install.py | 12 | +8 | -4 |
| M | uninstall.py | 8 | +4 | -4 |
Diff
diff --git a/install.py b/install.py
index 2ce1de9..79e1c2f 100644
--- a/install.py
+++ b/install.py
@@ -38,7 +38,7 @@ def install_system_deps():
elif distro in ["centos", "rhel"]:
os.system("sudo yum install -y python3 tk > /dev/null 2>&1")
print("[*]- Dependencies: Done")
- elif distro == "arch":
+ elif distro == "arch" or distro == "artix":
os.system("sudo pacman -S --noconfirm python3 tk > /dev/null 2>&1")
print("[*]- Dependencies: Done")
elif distro == "void":
@@ -51,6 +51,7 @@ def install_system_deps():
"[*]- Unsupported distribution. Please install system dependencies manually.\n [*]- dependencies:\n\t-python\n\t-tk\n\t-python-tkinter "
)
+
def copy_file():
try:
...
Show all
Show less
diff --git a/install.py b/install.py
index 2ce1de9..79e1c2f 100644
--- a/install.py
+++ b/install.py
@@ -38,7 +38,7 @@ def install_system_deps():
elif distro in ["centos", "rhel"]:
os.system("sudo yum install -y python3 tk > /dev/null 2>&1")
print("[*]- Dependencies: Done")
- elif distro == "arch":
+ elif distro == "arch" or distro == "artix":
os.system("sudo pacman -S --noconfirm python3 tk > /dev/null 2>&1")
print("[*]- Dependencies: Done")
elif distro == "void":
@@ -51,6 +51,7 @@ def install_system_deps():
"[*]- Unsupported distribution. Please install system dependencies manually.\n [*]- dependencies:\n\t-python\n\t-tk\n\t-python-tkinter "
)
+
def copy_file():
try:
...
diff --git a/install.py b/install.py
index 2ce1de9..79e1c2f 100644
--- a/install.py
+++ b/install.py
@@ -38,7 +38,7 @@ def install_system_deps():
elif distro in ["centos", "rhel"]:
os.system("sudo yum install -y python3 tk > /dev/null 2>&1")
print("[*]- Dependencies: Done")
- elif distro == "arch":
+ elif distro == "arch" or distro == "artix":
os.system("sudo pacman -S --noconfirm python3 tk > /dev/null 2>&1")
print("[*]- Dependencies: Done")
elif distro == "void":
@@ -51,6 +51,7 @@ def install_system_deps():
"[*]- Unsupported distribution. Please install system dependencies manually.\n [*]- dependencies:\n\t-python\n\t-tk\n\t-python-tkinter "
)
+
def copy_file():
try:
os.system("cp ./src/pino.py pino > /dev/null 2>&1")
@@ -63,7 +64,9 @@ def copy_file():
if not os.path.exists("/etc/pino"):
os.system("sudo mkdir /etc/pino")
- os.system(f"sudo chown -R {os.getlogin()}:{grp.getgrgid(os.getgid()).gr_name} /etc/pino/ > /dev/null 2>&1")
+ os.system(
+ f"sudo chown -R {os.getlogin()}:{grp.getgrgid(os.getgid()).gr_name} /etc/pino/ > /dev/null 2>&1"
+ )
os.system("sudo cp -r lib /etc/pino > /dev/null 2>&1")
except OSError as e:
print("Installing app failed\ncheck app_install_error.txt file for more info")
@@ -73,7 +76,9 @@ def copy_file():
if not os.path.exists("/.config/pino"):
os.makedirs(os.path.expanduser("/.config/pino/plugs/"), exist_ok=True)
os.system("cp ./plugs/* ~/.config/pino/plugs/ > /dev/null 2>&1")
- os.system("sudo cp ./src/config.json ./src/notification.wav /etc/pino/ > /dev/null 2>&1")
+ os.system(
+ "sudo cp ./src/config.json ./src/notification.wav /etc/pino/ > /dev/null 2>&1"
+ )
os.system("cp /etc/pino/* ~/.config/pino/ > /dev/null 2>&1")
print("\n[*]- Done")
except OSError as e:
@@ -81,6 +86,5 @@ def copy_file():
os.system(f"echo {e} > config_error.txt")
-
install_system_deps()
copy_file()
diff --git a/uninstall.py b/uninstall.py
index 61b632f..d875d75 100644
--- a/uninstall.py
+++ b/uninstall.py
@@ -32,16 +32,16 @@ def remove_system_deps():
elif distro in ["centos", "rhel"]:
os.system("sudo yum remove -y tk > /dev/null 2>&1")
print("Remove System Dep: Done")
- elif distro == "arch":
+ elif distro == "arch" or distro == "artix":
os.system("sudo pacman -Rns --noconfirm tk > /dev/null 2>&1")
print("Remove System Dep: Done")
elif distro == "void":
os.system("sudo xbps-remove -R -y python3-tkinter tk > /dev/null 2>&1")
print("Remove System Dep: Done")
else:
- print("Unsupported distribution. Please install system dependencies manually.")
-
-
+ print(
+ "Unsupported distribution. Please uninstall system dependencies manually."
+ )
def remove_files():