diff --git a/recipe.json b/recipe.json index 041cc63..d559577 100644 --- a/recipe.json +++ b/recipe.json @@ -220,92 +220,97 @@ { "if" : "Calculator", "type" : "command", - "commands" : "flatpak install org.gnome.Calculator || snap install gnome-calculator" + "commands" : ["flatpak --user install org.gnome.Calculator || snap install gnome-calculator"] }, { "if" : "Calendar", "type" : "command", - "commands" : "flatpak install org.gnome.Calendar" + "commands" : ["flatpak --user install org.gnome.Calendar"] }, { "if" : "Characters", "type" : "command", - "commands" : "flatpak install org.gnome.Characters || snap install gnome-characters" + "commands" : ["flatpak --user install org.gnome.Characters || snap install gnome-characters"] }, { "if" : "Cheese", "type" : "command", - "commands" : "flatpak install org.gnome.Cheese || snap install cheese" + "commands" : ["flatpak --user install org.gnome.Cheese || snap install cheese"] }, { "if" : "Clocks", "type" : "command", - "commands" : "flatpak install org.gnome.clocks || snap install gnome-clocks" + "commands" : ["flatpak --user install org.gnome.clocks || snap install gnome-clocks"] }, { "if" : "Contacts", "type" : "command", - "commands" : "flatpak install org.gnome.Contacts || snap install gnome-contacts" + "commands" : ["flatpak --user install org.gnome.Contacts || snap install gnome-contacts"] }, { - "if" : "Disk Usage Alanyzer", + "if" : "Disk Usage Analyzer", "type" : "command", - "commands" : "flatpak install org.gnome.baobab" + "commands" : ["flatpak --user install org.gnome.baobab"] }, { - "if" : "Evince", + "if" : "Document Viewer", "type" : "command", - "commands" : "flatpak install org.gnome.Evince || snap install evince" + "commands" : ["flatpak --user install org.gnome.Evince || snap install evince"] }, { "if" : "Extensions", "type" : "command", - "commands" : "flatpak install org.gnome.Extensions" + "commands" : ["flatpak --user install org.gnome.Extensions"] }, { "if" : "Fonts", "type" : "command", - "commands" : "flatpak install org.gnome.Fonts" + "commands" : ["flatpak --user install org.gnome.Fonts"] }, { "if" : "Image Viewer", "type" : "command", - "commands" : "flatpak install org.gnome.eog || snap install eog" + "commands" : ["flatpak --user install org.gnome.eog || snap install eog"] }, { "if" : "Logs", "type" : "command", - "commands" : "flatpak install org.gnome.Logs || snap install gnome-logs" + "commands" : ["flatpak --user install org.gnome.Logs || snap install gnome-logs"] }, { "if" : "Maps", "type" : "command", - "commands" : "flatpak install org.gnome.Maps" + "commands" : ["flatpak --user install org.gnome.Maps"] }, { "if" : "Music", "type" : "command", - "commands" : "flatpak install org.gnome.Music" + "commands" : ["flatpak --user install org.gnome.Music"] }, { - "name" : "Photos", - "icon" : "org.gnome.Photos", - "flatpak" : "org.gnome.Photos" + "if" : "Photos", + "type" : "command", + "commands" : ["flatpak --user install org.gnome.Photos"] }, { "if" : "Text Editor", "type" : "command", - "commands" : "flatpak install org.gnome.TextEditor" + "commands" : ["flatpak --user install org.gnome.TextEditor"] }, { "if" : "Videos", "type" : "command", - "commands" : "flatpak install org.gnome.Totem" + "commands" : ["flatpak --user install org.gnome.Totem"] }, { "if" : "Weather", "type" : "command", - "commands" : "flatpak install org.gnome.Weather || snap install gnome-weather" + "commands" : ["flatpak --user install org.gnome.Weather || snap install gnome-weather"] + }, + { + "if" : "Bottles", + "type" : "command", + "commands" : ["flatpak --user install com.usebottles.bottles"] } ] }, diff --git a/vanilla_first_setup/layouts/applications.py b/vanilla_first_setup/layouts/applications.py index 1e2c70b..443882c 100644 --- a/vanilla_first_setup/layouts/applications.py +++ b/vanilla_first_setup/layouts/applications.py @@ -48,6 +48,7 @@ class VanillaLayoutApplications(Adw.Bin): self.status_page.set_title(self.__step["title"]) self.status_page.set_description(self.__step["description"]) selection_dialogs = [] + _index = 0 def present_customize(widget, dialog, apps_list, item): for app in item["applications"]: @@ -146,8 +147,8 @@ class VanillaLayoutApplications(Adw.Bin): self.bundles_list.add(_action_row) - self.__register_widgets.append((item["id"], _switcher)) - + self.__register_widgets.append((item["id"], _switcher, _index)) + _index += 1 def __next_step(self, widget): self.__window.next() @@ -155,12 +156,12 @@ class VanillaLayoutApplications(Adw.Bin): def get_finals(self): finals = {"vars": {}, "funcs": [x for x in self.__step["final"]]} - for _id, switcher in self.__register_widgets: + for _id, switcher, index in self.__register_widgets: if switcher.get_active() == True: - for app in _id["applications"]: - finals["vars"][app] = app["active"] + for app in self.__step["bundles"][index]["applications"]: + finals["vars"][app["name"]] = app["active"] else: - for app in _id["applications"]: - finals["vars"][app] = False + for app in self.__step["bundles"][index]["applications"]: + finals["vars"][app["name"]] = False return finals \ No newline at end of file