forked from yaypixxo/SquareSwitcherX
		
	add stuff
This commit is contained in:
		
							
								
								
									
										16
									
								
								squareswitcherxprefs/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								squareswitcherxprefs/Makefile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,16 @@
 | 
			
		||||
ARCHS = arm64
 | 
			
		||||
TARGET = iphone:clang:11.2:11.2
 | 
			
		||||
 | 
			
		||||
include $(THEOS)/makefiles/common.mk
 | 
			
		||||
 | 
			
		||||
BUNDLE_NAME = SquareSwitcherXPrefs
 | 
			
		||||
SquareSwitcherXPrefs_FILES = SSXRootListController.m
 | 
			
		||||
SquareSwitcherXPrefs_INSTALL_PATH = /Library/PreferenceBundles
 | 
			
		||||
SquareSwitcherXPrefs_FRAMEWORKS = UIKit
 | 
			
		||||
SquareSwitcherXPrefs_PRIVATE_FRAMEWORKS = Preferences
 | 
			
		||||
 | 
			
		||||
include $(THEOS_MAKE_PATH)/bundle.mk
 | 
			
		||||
 | 
			
		||||
internal-stage::
 | 
			
		||||
	$(ECHO_NOTHING)mkdir -p $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences$(ECHO_END)
 | 
			
		||||
	$(ECHO_NOTHING)cp entry.plist $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/SquareSwitcherXPrefs.plist$(ECHO_END)
 | 
			
		||||
							
								
								
									
										24
									
								
								squareswitcherxprefs/Resources/Info.plist
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								squareswitcherxprefs/Resources/Info.plist
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,24 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 | 
			
		||||
<plist version="1.0">
 | 
			
		||||
<dict>
 | 
			
		||||
	<key>CFBundleDevelopmentRegion</key>
 | 
			
		||||
	<string>English</string>
 | 
			
		||||
	<key>CFBundleExecutable</key>
 | 
			
		||||
	<string>SquareSwitcherXPrefs</string>
 | 
			
		||||
	<key>CFBundleIdentifier</key>
 | 
			
		||||
	<string>com.yaypixxo.squareswitcherxprefs</string>
 | 
			
		||||
	<key>CFBundleInfoDictionaryVersion</key>
 | 
			
		||||
	<string>6.0</string>
 | 
			
		||||
	<key>CFBundlePackageType</key>
 | 
			
		||||
	<string>BNDL</string>
 | 
			
		||||
	<key>CFBundleShortVersionString</key>
 | 
			
		||||
	<string>1.0.0</string>
 | 
			
		||||
	<key>CFBundleSignature</key>
 | 
			
		||||
	<string>????</string>
 | 
			
		||||
	<key>CFBundleVersion</key>
 | 
			
		||||
	<string>1.0</string>
 | 
			
		||||
	<key>NSPrincipalClass</key>
 | 
			
		||||
	<string>SSXRootListController</string>
 | 
			
		||||
</dict>
 | 
			
		||||
</plist>
 | 
			
		||||
							
								
								
									
										39
									
								
								squareswitcherxprefs/Resources/Root.plist
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								squareswitcherxprefs/Resources/Root.plist
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,39 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 | 
			
		||||
<plist version="1.0">
 | 
			
		||||
<dict>
 | 
			
		||||
	<key>items</key>
 | 
			
		||||
	<array>
 | 
			
		||||
		<dict>
 | 
			
		||||
			<key>cell</key>
 | 
			
		||||
			<string>PSSwitchCell</string>
 | 
			
		||||
			<key>default</key>
 | 
			
		||||
			<true/>
 | 
			
		||||
			<key>defaults</key>
 | 
			
		||||
			<string>com.yaypixxo.squareswitcherxprefs</string>
 | 
			
		||||
			<key>key</key>
 | 
			
		||||
			<string>enabled</string>
 | 
			
		||||
			<key>label</key>
 | 
			
		||||
			<string>Enable</string>
 | 
			
		||||
		</dict>
 | 
			
		||||
		<dict>
 | 
			
		||||
			<key>action</key>
 | 
			
		||||
			<string>respring:</string>
 | 
			
		||||
			<key>cell</key>
 | 
			
		||||
			<string>PSButtonCell</string>
 | 
			
		||||
			<key>label</key>
 | 
			
		||||
			<string>Respring</string>
 | 
			
		||||
		</dict>
 | 
			
		||||
		<dict>
 | 
			
		||||
			<key>cell</key>
 | 
			
		||||
			<string>PSGroupCell</string>
 | 
			
		||||
			<key>footerText</key>
 | 
			
		||||
			<string>SquareSwitcherX by YaYPIXXO</string>
 | 
			
		||||
			<key>isStaticText</key>
 | 
			
		||||
			<true/>
 | 
			
		||||
		</dict>
 | 
			
		||||
	</array>
 | 
			
		||||
	<key>title</key>
 | 
			
		||||
	<string>SquareSwitcherX</string>
 | 
			
		||||
</dict>
 | 
			
		||||
</plist>
 | 
			
		||||
							
								
								
									
										7
									
								
								squareswitcherxprefs/SSXRootListController.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								squareswitcherxprefs/SSXRootListController.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,7 @@
 | 
			
		||||
#import <Preferences/PSListController.h>
 | 
			
		||||
#import <Preferences/PSSpecifier.h>
 | 
			
		||||
#import <spawn.h>
 | 
			
		||||
 | 
			
		||||
@interface SSXRootListController : PSListController
 | 
			
		||||
 | 
			
		||||
@end
 | 
			
		||||
							
								
								
									
										20
									
								
								squareswitcherxprefs/SSXRootListController.m
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								squareswitcherxprefs/SSXRootListController.m
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,20 @@
 | 
			
		||||
#include "SSXRootListController.h"
 | 
			
		||||
 | 
			
		||||
@implementation SSXRootListController
 | 
			
		||||
 | 
			
		||||
- (NSArray *)specifiers {
 | 
			
		||||
	if (!_specifiers) {
 | 
			
		||||
		_specifiers = [[self loadSpecifiersFromPlistName:@"Root" target:self] retain];
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return _specifiers;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Respring function
 | 
			
		||||
- (void)respring:(id)sender {
 | 
			
		||||
	pid_t pid;
 | 
			
		||||
    const char* args[] = {"killall", "backboardd", NULL};
 | 
			
		||||
    posix_spawn(&pid, "/usr/bin/killall", NULL, NULL, (char* const*)args, NULL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@end
 | 
			
		||||
							
								
								
									
										21
									
								
								squareswitcherxprefs/entry.plist
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								squareswitcherxprefs/entry.plist
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,21 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 | 
			
		||||
<plist version="1.0">
 | 
			
		||||
<dict>
 | 
			
		||||
	<key>entry</key>
 | 
			
		||||
	<dict>
 | 
			
		||||
		<key>bundle</key>
 | 
			
		||||
		<string>SquareSwitcherXPrefs</string>
 | 
			
		||||
		<key>cell</key>
 | 
			
		||||
		<string>PSLinkCell</string>
 | 
			
		||||
		<key>detail</key>
 | 
			
		||||
		<string>SSXRootListController</string>
 | 
			
		||||
		<key>icon</key>
 | 
			
		||||
		<string>icon.png</string>
 | 
			
		||||
		<key>isController</key>
 | 
			
		||||
		<true/>
 | 
			
		||||
		<key>label</key>
 | 
			
		||||
		<string>SquareSwitcherX</string>
 | 
			
		||||
	</dict>
 | 
			
		||||
</dict>
 | 
			
		||||
</plist>
 | 
			
		||||
		Reference in New Issue
	
	Block a user