          if page_only and lookup not in config.config.sections():
              logger.info("No settings to save for the current page")
              return
  
          for section, items in config.defaults.items():
              logger.debug("Adding section: '%s')", section)
              config.insert_config_section(section, items["helptext"], config=new_config)
              for item, options in items.items():
                  if item == "helptext":
                      continue
                  if page_only and section != lookup:
                      # Keep existing values for pages we are not updating
                      new_opt = config.get(section, item)
                      logger.debug("Retain existing value '%s' for %s",
                                   new_opt, ".".join([section, item]))
                  else:
                      # Get currently selected value
                      key = category
                      if section != "global":
                          key += f"|{section.replace('.', '|')}"
                      new_opt = self._config_cpanel_dict[key]["options"][item].get()
                      logger.debug("Updating value to '%s' for %s",
                                   new_opt, ".".join([section, item]))
                  helptext = config.format_help(options["helptext"], is_section=False)
                  new_config.set(section, helptext)
                  if options["type"] == list:  # Comma separated multi select options
                      new_opt = ", ".join(new_opt if isinstance(new_opt, list) else new_opt.split())
                  new_config.set(section, item, str(new_opt))
          config.config = new_config
          config.save_config()
          logger.info("Saved config: '%s'", config.configfile)
  
          if category == "gui":
              if not get_config().tk_vars.running_task.get():
 
</s> remove                 if ((section is not None and config_section != section)
                        or config_section not in self.tk_vars):
 </s> add                 if ((section is not None and section_name != section)
                        or section_name not in self.tk_vars): </s> remove         for config_section, items in self._config.defaults.items():
            logger.debug("Adding section: '%s')", config_section)
            self._config.insert_config_section(config_section,
                                               items["helptext"],
 </s> add         for section_name, sect in self._config.defaults.items():
            logger.debug("Adding section: '%s')", section_name)
            self._config.insert_config_section(section_name,
                                               sect.helptext, </s> remove             for item, options in items.items():
 </s> add             for item, options in sect.items.items(): </s> remove         for section, items in self.defaults.items():
            self.insert_config_section(section, items["helptext"], new_config)
            for item, opt in items.items():
                if item == "helptext":
                    continue
                if section not in self.config.sections():
                    logger.debug("Adding new config section: '%s'", section)
                    opt_value = opt["default"]
 </s> add         for section_name, section in self.defaults.items():
            self.insert_config_section(section_name, section.helptext, new_config)
            for item, opt in section.items.items():
                if section_name not in self.config.sections():
                    logger.debug("Adding new config section: '%s'", section_name)
                    opt_value = opt.default </s> remove                     new_opt = self._config.get(config_section, item)
 </s> add                     new_opt = self._config.get(section_name, item)
        config.config = self._get_new_config(page_only, config, category, lookup)
          if page_only and lookup not in config.config.sections():
              logger.info("No settings to save for the current page")
              return
  
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
        config.config = self._get_new_config(page_only, config, category, lookup)
          config.save_config()
          logger.info("Saved config: '%s'", config.configfile)
  
          if category == "gui":
              if not get_config().tk_vars.running_task.get():
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Preview - Allow mask color/opacity configuration
  - typing: lib.config
  - docs: lib.config
  - bugfix: popup_configure - keep assets on top 
lib/gui/popup_configure.py