From 701c52b6815dd7d3c4d349c76f6a8f00f9eabcb5 Mon Sep 17 00:00:00 2001 From: Dadmehr <134191240+BDadmehr0@users.noreply.github.com> Date: Sat, 2 Sep 2023 20:06:03 +0330 Subject: [PATCH] fix icon & fixed hide_tirminal & add update command to install.sh Changing the way to hide the terminal in Linux with the vm ctrl method The required prerequisites are available in the install.sh installation file for easier installation on Linux --- fishy/gui/splash.py | 4 ++-- fishy/osservices/linux.py | 5 ++--- install.sh | 17 ++++++++++++++--- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/fishy/gui/splash.py b/fishy/gui/splash.py index c3a8aab..165f5eb 100644 --- a/fishy/gui/splash.py +++ b/fishy/gui/splash.py @@ -36,9 +36,9 @@ class Splash: top.resizable(False, False) if os_name == 'Linux': - top.iconbitmap(helper.manifest_file('icon.ico')) - else: top.iconphoto(True, tk.PhotoImage(helper.manifest_file('icon.png'))) + else: + top.iconbitmap(helper.manifest_file('icon.ico')) canvas = tk.Canvas(top, width=dim[0], height=dim[1], bg='white') canvas.pack() diff --git a/fishy/osservices/linux.py b/fishy/osservices/linux.py index d445f00..4b12f98 100644 --- a/fishy/osservices/linux.py +++ b/fishy/osservices/linux.py @@ -10,9 +10,8 @@ from fishy.osservices.os_services import IOSServices class Linux(IOSServices): def hide_terminal(self): - window_title = "" # عنوان پنجره - command = f'gsettings set org.gnome.shell.extensions.dash-to-dock intellihide-on-maximize false; \ - wmctrl -r "{window_title}" -b add,hidden' + window_title = 'Terminal' + command = f'wmctrl -r "{window_title}" -b add,hidden' subprocess.run(command, shell=True, check=True) def create_shortcut(self, anti_ghosting=False): diff --git a/install.sh b/install.sh index 576cc64..64f9b8b 100755 --- a/install.sh +++ b/install.sh @@ -4,20 +4,31 @@ if [ -e /etc/os-release ]; then distro_info=$(cat /etc/os-release) if [[ $distro_info == *"Manjaro"* ]]; then - echo "OS Manjaro: installing tk, python, python-pip" + echo "OS Manjaro: installing tk, python, python-pip, wmctrl" + sudo pacman -Sy + sudo pacman -S tk sudo pacman -S python sudo pacman -S python-pip + sudo pacman -S wmctrl elif [[ $distro_info == *"Ubuntu"* ]]; then - echo "OS Ubuntu: installing tk, python, python-pip" + echo "OS Ubuntu: installing tk, python, python-pip, wmctrl" + sudo apt update + sudo apt-get install tk sudo apt-get install python sudo apt-get install python-pip + sudo apt install wmctrl + elif [[ $distro_info == *"Fedora"* ]]; then - echo "OS Fedora: installing tk, python, python-pip" + echo "OS Fedora: installing tk, python, python-pip, wmctrl" + sudo dnf update + sudo dnf install tk sudo dnf install python sudo dnf install python-pip + sudo dnf install wmctrl + else echo "Unknow OS: Try other Install Script for Your OS" fi