          self.wrapper = ProcessWrapper()
          self.objects = dict()
  
          get_images().delete_preview()
          preview_trigger().clear()
          self.protocol("WM_DELETE_WINDOW", self.close_app)
          self.build_gui()
          self._last_session = LastSession(self._config)
          logger.debug("Initialized %s", self.__class__.__name__)
  
 
</s> remove         preview_trigger().clear()
 </s> add         preview_trigger().clear(trigger_type=None) </s> remove         self._gui_preview_trigger = os.path.join(os.path.realpath(os.path.dirname(sys.argv[0])),
                                                 "lib", "gui", ".cache", ".preview_trigger")
 </s> add         gui_cache = os.path.join(
            os.path.realpath(os.path.dirname(sys.argv[0])), "lib", "gui", ".cache")
        self._gui_triggers = dict(update=os.path.join(gui_cache, ".preview_trigger"),
                                  mask_toggle=os.path.join(gui_cache, ".preview_mask_toggle")) </s> remove         preview_trigger().clear()
 </s> add         preview_trigger().clear(trigger_type=None) </s> remove         self._trigger_file = os.path.join(PATHCACHE, ".preview_trigger")
        logger.debug("Initialized: %s (trigger_file: %s)",
                     self.__class__.__name__, self._trigger_file)

    def set(self):
        """ Place the trigger file into the cache folder """
        if not os.path.isfile(self._trigger_file):
            with open(self._trigger_file, "w"):
 </s> add         self._trigger_files = dict(update=os.path.join(PATHCACHE, ".preview_trigger"),
                                   mask_toggle=os.path.join(PATHCACHE, ".preview_mask_toggle"))
        logger.debug("Initialized: %s (trigger_files: %s)",
                     self.__class__.__name__, self._trigger_files)

    def set(self, trigger_type):
        """ Place the trigger file into the cache folder

        Parameters
        ----------
        trigger_type: ["update", "mask_toggle"]
            The type of action to trigger. 'update': Full preview update. 'mask_toggle': toggle
            mask on and off
         """
        trigger = self._trigger_files[trigger_type]
        if not os.path.isfile(trigger):
            with open(trigger, "w"):
        preview_trigger().clear(trigger_type=None)
          self.wrapper = ProcessWrapper()
          self.objects = dict()
  
          get_images().delete_preview()
        preview_trigger().clear(trigger_type=None)
          self.protocol("WM_DELETE_WINDOW", self.close_app)
          self.build_gui()
          self._last_session = LastSession(self._config)
          logger.debug("Initialized %s", self.__class__.__name__)
  
keep keep keep keep replace keep keep keep keep keep
 Updates
  - Change shortcut key to M
  - Slight optimizations
  - GUI support for mask toggling 
scripts/gui.py