use apx for subsystem

main
mirkobrombin 2 years ago
parent 02670fca54
commit 046c318259

2
debian/changelog vendored

@ -1,4 +1,4 @@
vanilla-first-setup (0.1.3) jammy; urgency=low
vanilla-first-setup (0.1.4) jammy; urgency=low
* First release

@ -1,5 +1,5 @@
project('io.github.vanilla-os.FirstSetup',
version: '0.1.3',
version: '0.1.4',
meson_version: '>= 0.59.0',
default_options: [ 'warning_level=2',
'werror=false',

@ -12,22 +12,22 @@ class Config:
flatpak: bool,
appimage: bool,
apport: bool,
distrobox: bool,
apx: bool,
nvidia: bool,
):
self.snap = snap
self.flatpak = flatpak
self.appimage = appimage
self.apport = apport
self.distrobox = distrobox
self.apx = apx
self.nvidia = nvidia
def get_str(self) -> str:
keys = [
"snap", "flatpak", "appimage", "apport", "distrobox", "nvidia"
"snap", "flatpak", "appimage", "apport", "apx", "nvidia"
]
vals = [
self.snap, self.flatpak, self.appimage, self.apport, self.distrobox, self.nvidia
self.snap, self.flatpak, self.appimage, self.apport, self.apx, self.nvidia
]
return "|".join([f"{key}::{val}" for key, val in zip(keys, vals)])
@ -40,8 +40,8 @@ class Config:
self.appimage = val
elif key == "apport":
self.apport = val
elif key == "distrobox":
self.distrobox = val
elif key == "apx":
self.apx = val
elif key == "nvidia":
self.nvidia = val
else:
@ -60,7 +60,7 @@ class Config:
flatpak = items[1].split('::')[1]
appimage = items[2].split('::')[1]
apport = items[3].split('::')[1]
distrobox = items[4].split('::')[1]
apx = items[4].split('::')[1]
nvidia = items[5].split('::')[1]
return cls(
@ -68,6 +68,6 @@ class Config:
flatpak=get_bool(flatpak),
appimage=get_bool(appimage),
apport=get_bool(apport),
distrobox=get_bool(distrobox),
apx=get_bool(apx),
nvidia=get_bool(nvidia),
)

@ -4,5 +4,5 @@ class Preset:
flatpak: bool = True
appimage: bool = False
apport: bool = False
distrobox: bool = True
apx: bool = True
nvidia: bool = False

@ -26,8 +26,8 @@ class Configurator:
self.__enable_flatpak() if self.config.flatpak else self.__disable_flatpak()
self.__enable_appimage() if self.config.appimage else self.__disable_appimage()
self.__enable_apport() if self.config.apport else self.__disable_apport()
if self.config.distrobox:
self.__enable_distrobox()
if self.config.apx:
self.__enable_apx()
if self.config.nvidia:
self.__enable_nvidia()
@ -99,11 +99,11 @@ class Configurator:
subprocess.run(['sudo', 'systemctl', 'stop', 'apport.service'])
Apt.purge(['apport'])
def __enable_distrobox(self):
def __enable_apx(self):
if self.fake:
return self.__fake("Fake: Distrobox enabled")
return self.__fake("Fake: apx enabled")
Apt.install(['curl', 'podman'])
Apt.install(['curl', 'podman', 'apx'])
Apt.update()
proc = subprocess.run(['curl', '-s', 'https://raw.githubusercontent.com/89luca89/distrobox/main/install'], stdout=subprocess.PIPE)

@ -70,7 +70,7 @@ class FirstSetupWindow(Adw.ApplicationWindow):
flatpak=Preset.flatpak,
appimage=Preset.appimage,
apport=Preset.apport,
distrobox=Preset.distrobox,
apx=Preset.apx,
nvidia=Preset.nvidia,
)
self.__has_nvidia = has_nvidia_gpu()
@ -144,14 +144,14 @@ class FirstSetupWindow(Adw.ApplicationWindow):
def __on_switch_apport_state_set(self, widget, state):
self.__config.set_val('apport', state)
def __on_switch_distrobox_state_set(self, widget, state):
self.__config.set_val('distrobox', state)
def __on_switch_apx_state_set(self, widget, state):
self.__config.set_val('apx', state)
def on_btn_reboot_clicked(self, widget):
Configurator.reboot()
def on_btn_subsystem_clicked(self, widget, state):
self.__config.set_val('distrobox', state)
self.__config.set_val('apx', state)
self.__show_page(page=self.page_nvidia_drivers if self.__has_nvidia else self.page_extras)
def __on_btn_info_subsystem_clicked(self, widget):

Loading…
Cancel
Save