예제 #1
0
 def remove(self):
     for path in self.get_plist_paths():
         plist_data = get_plist(path)
         for reopen_dict in plist_data["TALAppsToRelaunchAtLogin"]:
             if reopen_dict["BundleID"] == self.name:
                 plist_data["TALAppsToRelaunchAtLogin"].remove(reopen_dict)
         write_plist(path, plist_data)
예제 #2
0
 def run(self):
     print_status(
         "warning",
         "This technique is finicky and might not work as expected, YMMV.")
     app_path = create_app(self.name, self.command, "Reopen")
     for path in self.get_plist_paths():
         plist_data = get_plist(path)
         plist_data["TALAppsToRelaunchAtLogin"].append({
             "Hide": False,
             "BundleID": self.name,
             "Path": app_path,
             "BackgroundState": 2,
         })
         write_plist(path, plist_data)
예제 #3
0
 def run(self):
     print_status(
         'warning',
         'This technique is finicky and might not work as expected, YMMV.')
     app_path = create_app(self.name, self.command, 'Reopen')
     for path in self.get_plist_paths():
         plist_data = get_plist(path)
         plist_data['TALAppsToRelaunchAtLogin'].append({
             'Hide': False,
             'BundleID': self.name,
             'Path': app_path,
             'BackgroundState': 2
         })
         write_plist(path, plist_data)
예제 #4
0
 def remove(self):
     plist_data = get_plist(self.iterm2_plist)
     plist_data["New Bookmarks"][0].pop("Initial Text")
     write_plist(self.iterm2_plist, plist_data)
예제 #5
0
 def run(self):
     plist_data = get_plist(self.iterm2_plist)
     plist_data["New Bookmarks"][0][
         "Initial Text"] = f"{self.command} && clear"
     write_plist(self.iterm2_plist, plist_data)