diff --git a/apx_gui/core/apx.py b/apx_gui/core/apx.py index cd27b57..a34ed57 100644 --- a/apx_gui/core/apx.py +++ b/apx_gui/core/apx.py @@ -27,7 +27,7 @@ class Apx(ApxEntityBase): def subsystems_list(self) -> list[Subsystem]: - command = "apx2 subsystems list --json" + command = "apx subsystems list --json" status, output = self._run_command(command) if not status: return [] @@ -54,7 +54,7 @@ def subsystems_list(self) -> list[Subsystem]: return subsystems def stacks_list(self) -> list[Stack]: - command = "apx2 stacks list --json" + command = "apx stacks list --json" status, output = self._run_command(command) if not status: return [] @@ -75,7 +75,7 @@ def stacks_list(self) -> list[Stack]: return stacks def pkgmanagers_list(self) -> list[PkgManager]: - command = "apx2 pkgmanagers list --json" + command = "apx pkgmanagers list --json" status, output = self._run_command(command) if not status: return [] diff --git a/apx_gui/core/apx_entities.py b/apx_gui/core/apx_entities.py index 2160a67..a46d098 100644 --- a/apx_gui/core/apx_entities.py +++ b/apx_gui/core/apx_entities.py @@ -75,14 +75,14 @@ def __init__( def create(self) -> [bool, "Stack"]: packages: str = " ".join(self.packages) if isinstance(self.packages, list) else self.packages command: str = ( - f"apx2 stacks new --name {self.name} --base {self.base} --packages \"{packages}\" " + f"apx stacks new --name {self.name} --base {self.base} --packages \"{packages}\" " f"--pkg-manager {self.pkg_manager} -y" ) res: [bool, str] = self._run_command(command) if not res[0]: return res[0], self - command: str = f"apx2 stacks list --json" + command: str = f"apx stacks list --json" res: [bool, str] = self._run_command(command) if not res[0]: return res[0], self @@ -100,13 +100,13 @@ def create(self) -> [bool, "Stack"]: def update(self, base: str, packages: str, pkg_manager: str) -> [bool, str]: command: str = ( - f"apx2 stacks update --name {self.name} --base {base} --packages \"{packages}\" --pkg-manager {pkg_manager} -y" + f"apx stacks update --name {self.name} --base {base} --packages \"{packages}\" --pkg-manager {pkg_manager} -y" ) return self._run_command(command) def remove(self, force: bool = False) -> [bool, str]: force_flag: str = "--force" if force else "" - command: str = f"apx2 stacks rm {force_flag} --name {self.name}" + command: str = f"apx stacks rm {force_flag} --name {self.name}" return self._run_command(command) @@ -127,12 +127,12 @@ def __init__( self.exported_programs: Optional[dict] = exported_programs def create(self) -> [bool, "Subsystem"]: - command: str = f"apx2 subsystems new --name {self.name} --stack {self.stack.name}" + command: str = f"apx subsystems new --name {self.name} --stack {self.stack.name}" res: [bool, str] = self._run_command(command) if not res[0]: return re[0], self - command: str = f"apx2 subsystems list --json" + command: str = f"apx subsystems list --json" res: [bool, str] = self._run_command(command) if not res[0]: return res[0], self @@ -148,17 +148,17 @@ def create(self) -> [bool, "Subsystem"]: return False, self def update(self, stack: str) -> [bool, str]: - command: str = f"apx2 subsystems update --name {self.name} --stack {stack} -y" + command: str = f"apx subsystems update --name {self.name} --stack {stack} -y" return self._run_command(command) def remove(self, force: bool = False) -> [bool, str]: force_flag: str = "--force" if force else "" - command: str = f"apx2 subsystems rm {force_flag} --name {self.name}" + command: str = f"apx subsystems rm {force_flag} --name {self.name}" return self._run_command(command) def reset(self, force: bool = False) -> [bool, str]: force_flag: str = "--force" if force else "" - command: str = f"apx2 subsystems reset {force_flag} --name {self.name}" + command: str = f"apx subsystems reset {force_flag} --name {self.name}" return self._run_command(command) @@ -196,7 +196,7 @@ def __init__( def create(self) -> [bool, "PkgManager"]: command: str = ( - f"apx2 pkgmanagers new --name {self.name} --need-sudo {self.need_sudo} " + f"apx pkgmanagers new --name {self.name} --need-sudo {self.need_sudo} " f"--autoremove {self.cmd_auto_remove} --clean {self.cmd_clean} " f"--install {self.cmd_install} --list {self.cmd_list} " f"--purge {self.cmd_purge} --remove {self.cmd_remove} " @@ -207,7 +207,7 @@ def create(self) -> [bool, "PkgManager"]: if not res[0]: return res[0], self - command: str = f"apx2 pkgmanagers list --json" + command: str = f"apx pkgmanagers list --json" res: [bool, str] = self._run_command(command) if not res[0]: return res[0], self @@ -233,5 +233,5 @@ def create(self) -> [bool, "PkgManager"]: def remove(self, force: bool = False) -> [bool, str]: force_flag: str = "--force" if force else "" - command: str = f"apx2 pkgmanagers rm {force_flag} --name {self.name}" - return self._run_command(command) \ No newline at end of file + command: str = f"apx pkgmanagers rm {force_flag} --name {self.name}" + return self._run_command(command) diff --git a/apx_gui/widgets/tab_subsystem.py b/apx_gui/widgets/tab_subsystem.py index d640dbf..352048d 100644 --- a/apx_gui/widgets/tab_subsystem.py +++ b/apx_gui/widgets/tab_subsystem.py @@ -70,7 +70,7 @@ def subsystem(self) -> Subsystem: return self.__subsystem def __on_console_clicked(self, button: Gtk.Button) -> None: - GLib.spawn_command_line_async(f"kgx -e apx2 {self.__subsystem.name} enter") + GLib.spawn_command_line_async(f"kgx -e apx {self.__subsystem.name} enter") def __on_reset_clicked(self, button: Gtk.Button) -> None: def on_callback(result, *args) -> None: @@ -117,4 +117,4 @@ def on_response(dialog: Adw.MessageDialog, response: str) -> None: dialog.add_response("ok", "Delete") dialog.set_response_appearance("ok", Adw.ResponseAppearance.DESTRUCTIVE) dialog.connect("response", on_response) - dialog.present() \ No newline at end of file + dialog.present()