├── .DS_Store ├── LICENSE ├── Makefile ├── README.md ├── SS.PNG ├── Tweak.x ├── control ├── iPadSwitcher.plist └── ipadswitcher ├── Makefile ├── NSTask.h ├── Resources ├── Info.plist ├── Root.plist ├── arkromepro.png ├── dapple.png └── icon@2x.png ├── entry.plist ├── ipsRootListController.h └── ipsRootListController.m /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpkg9510/iPadSwitcher/64eb736ee0c5a84d99ccc2beb711456f40d0c695/.DS_Store -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Mohamed Galal 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:7.0 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | ARCHS = arm64 arm64e 4 | export SDKVERSION = 13.4 5 | 6 | include $(THEOS)/makefiles/common.mk 7 | 8 | TWEAK_NAME = iPadSwitcher 9 | 10 | iPadSwitcher_FILES = Tweak.x 11 | iPadSwitcher_CFLAGS = -fobjc-arc 12 | 13 | SUBPROJECTS += ipadswitcher 14 | 15 | include $(THEOS)/makefiles/tweak.mk 16 | include $(THEOS)/makefiles/aggregate.mk 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # iPadSwitcher 2 | Grid Style App Switcher for IOS. 3 | 4 | ![alt text](https://github.com/dpkg9510/iPadSwitcher/blob/main/SS.PNG) 5 | -------------------------------------------------------------------------------- /SS.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpkg9510/iPadSwitcher/64eb736ee0c5a84d99ccc2beb711456f40d0c695/SS.PNG -------------------------------------------------------------------------------- /Tweak.x: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NSString *const domainString = @"com.dpkg.ipadswitcher"; 4 | 5 | static bool isEnabled; 6 | static int vertSpacingPort; 7 | static int cardStyle; 8 | static int horizSpacingPort; 9 | static int vertSpacingLand; 10 | static int horizSpacingLand; 11 | 12 | void ReloadPrefs () { 13 | 14 | NSUserDefaults *prefs = [[NSUserDefaults alloc] initWithSuiteName:domainString]; 15 | 16 | isEnabled = [([prefs objectForKey:@"isEnabled"] ?: @(YES)) boolValue]; 17 | cardStyle = [([prefs objectForKey:@"cardStyle"] ?: @(0.4)) intValue]; 18 | vertSpacingPort = [([prefs objectForKey:@"vertSpacingPort"] ?: @(42)) intValue]; 19 | horizSpacingPort = [([prefs objectForKey:@"horizSpacingPort"] ?: @(25.5)) intValue]; 20 | vertSpacingLand = [([prefs objectForKey:@"vertSpacingLand"] ?: @(38)) intValue]; 21 | horizSpacingLand = [([prefs objectForKey:@"horizSpacingLand"] ?: @(11.6)) intValue]; 22 | 23 | } 24 | 25 | %hook SBAppSwitcherSettings 26 | - (void)setGridSwitcherPageScale:(double)arg1 { 27 | switch(cardStyle){ 28 | case 0: 29 | %orig(0.30); 30 | break; 31 | case 1: 32 | %orig(0.38); 33 | break; 34 | case 2: 35 | %orig(0.4); 36 | break; 37 | case 3: 38 | %orig(0.42); 39 | break; 40 | } 41 | } 42 | 43 | - (void)setGridSwitcherHorizontalInterpageSpacingPortrait:(double)arg1 { 44 | %orig(horizSpacingPort); 45 | } 46 | 47 | - (void)setGridSwitcherVerticalNaturalSpacingPortrait:(double)arg1 { 48 | %orig(vertSpacingPort); 49 | } 50 | 51 | - (void)setGridSwitcherHorizontalInterpageSpacingLandscape:(double)arg1 { 52 | %orig(horizSpacingLand); 53 | } 54 | 55 | - (void)setGridSwitcherVerticalNaturalSpacingLandscape:(double)arg1 { 56 | %orig(vertSpacingLand); 57 | } 58 | 59 | - (void)setSwitcherStyle:(long long)arg1 { 60 | if(isEnabled) 61 | %orig(2); 62 | } 63 | %end 64 | 65 | %ctor { 66 | ReloadPrefs(); 67 | CFNotificationCenterAddObserver( 68 | CFNotificationCenterGetDarwinNotifyCenter(), 69 | NULL, 70 | (CFNotificationCallback)ReloadPrefs, 71 | CFSTR("com.dpkg.ipadswitcher.settingschanged"), 72 | NULL, 73 | CFNotificationSuspensionBehaviorDeliverImmediately 74 | ); 75 | %init; 76 | } 77 | -------------------------------------------------------------------------------- /control: -------------------------------------------------------------------------------- 1 | Package: com.dpkg.ipadswitcher 2 | Name: iPadSwitcher 3 | Version: 1.2 4 | Architecture: iphoneos-arm 5 | Description: Customizable iPad-like Grid Switcher. 6 | Maintainer: dpkg_ 7 | Author: dpkg_ 8 | Section: Tweaks 9 | Depends: mobilesubstrate (>= 0.9.5000) 10 | -------------------------------------------------------------------------------- /iPadSwitcher.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /ipadswitcher/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:7.0 2 | ARCHS = arm64 arm64e 3 | include $(THEOS)/makefiles/common.mk 4 | 5 | BUNDLE_NAME = iPadSwitcher 6 | 7 | iPadSwitcher_FILES = ipsRootListController.m 8 | iPadSwitcher_FRAMEWORKS = UIKit 9 | iPadSwitcher_PRIVATE_FRAMEWORKS = Preferences 10 | iPadSwitcher_INSTALL_PATH = /Library/PreferenceBundles 11 | iPadSwitcher_CFLAGS = -fobjc-arc 12 | 13 | include $(THEOS_MAKE_PATH)/bundle.mk 14 | 15 | internal-stage:: 16 | $(ECHO_NOTHING)mkdir -p $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences$(ECHO_END) 17 | $(ECHO_NOTHING)cp entry.plist $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/iPadSwitcher.plist$(ECHO_END) 18 | -------------------------------------------------------------------------------- /ipadswitcher/NSTask.h: -------------------------------------------------------------------------------- 1 | #import "Foundation/Foundation.h" 2 | #import "UIKit/UIKit.h" 3 | 4 | @interface NSTask : NSObject 5 | @property (copy) NSString *launchPath; 6 | @property (copy) NSString *currentDirectoryPath; 7 | @property (copy) NSDictionary *environment; 8 | @property (copy) NSArray *arguments; 9 | @property (retain) id standardInput; 10 | @property (retain) id standardOutput; 11 | @property (retain) id standardError; 12 | @property (readonly, getter=isRunning) BOOL running; 13 | @property (readonly) int processIdentifier; 14 | @property (readonly) int terminationStatus; 15 | - (instancetype)init; 16 | + (NSTask *)launchedTaskWithLaunchPath:(NSString *)path arguments:(NSArray *)arguments; 17 | - (void)launch; 18 | - (void)waitUntilExit; 19 | - (BOOL)suspend; 20 | - (BOOL)resume; 21 | - (void)interrupt; 22 | - (void)terminate; 23 | @end 24 | -------------------------------------------------------------------------------- /ipadswitcher/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | iPadSwitcher 9 | CFBundleIdentifier 10 | com.dpkg.ipadswitcher 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | NSPrincipalClass 22 | ipsRootListController 23 | 24 | 25 | -------------------------------------------------------------------------------- /ipadswitcher/Resources/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSGroupCell 10 | label 11 | Options 12 | 13 | 14 | cell 15 | PSSwitchCell 16 | default 17 | 18 | defaults 19 | com.dpkg.ipadswitcher 20 | key 21 | isEnabled 22 | label 23 | Enabled 24 | PostNotification 25 | com.dpkg.ipadswitcher.changed 26 | 27 | 28 | cell 29 | PSGroupCell 30 | label 31 | Card Size 32 | 33 | 34 | cell 35 | PSSegmentCell 36 | defaults 37 | com.dpkg.ipadswitcher 38 | key 39 | cardStyle 40 | label 41 | Card Style 42 | default 43 | 0 44 | validTitles 45 | 46 | Extra Small 47 | Small 48 | Medium 49 | Large 50 | 51 | validValues 52 | 53 | 0 54 | 1 55 | 2 56 | 3 57 | 58 | id 59 | ModeCell 60 | PostNotification 61 | com.dpkg.ipadswitcher.changed 62 | 63 | 64 | cell 65 | PSGroupCell 66 | footerText 67 | Portrait Mode 68 | 69 | 70 | cell 71 | PSGroupCell 72 | label 73 | Vertical Spacing 74 | 75 | 76 | cell 77 | PSSliderCell 78 | default 79 | 42 80 | min 81 | 10 82 | max 83 | 120 84 | showValue 85 | 86 | defaults 87 | com.dpkg.ipadswitcher 88 | key 89 | vertSpacingPort 90 | label 91 | Vert Scale 92 | leftImage 93 | slidericon.png 94 | isSegmented 95 | 96 | segmentCount 97 | 10 98 | PostNotification 99 | com.dpkg.ipadswitcher.changed 100 | 101 | 102 | cell 103 | PSGroupCell 104 | label 105 | Horizontal Spacing 106 | 107 | 108 | cell 109 | PSSliderCell 110 | default 111 | 25.5 112 | min 113 | 10 114 | max 115 | 120 116 | showValue 117 | 118 | defaults 119 | com.dpkg.ipadswitcher 120 | key 121 | horizSpacingPort 122 | label 123 | Horz Scale 124 | leftImage 125 | slidericon.png 126 | isSegmented 127 | 128 | segmentCount 129 | 10 130 | PostNotification 131 | com.dpkg.ipadswitcher.changed 132 | 133 | 134 | cell 135 | PSGroupCell 136 | footerText 137 | Landscape Mode 138 | 139 | 140 | cell 141 | PSGroupCell 142 | label 143 | Vertical Spacing 144 | 145 | 146 | cell 147 | PSSliderCell 148 | default 149 | 38 150 | min 151 | 10 152 | max 153 | 120 154 | showValue 155 | 156 | defaults 157 | com.dpkg.ipadswitcher 158 | key 159 | vertSpacingLand 160 | label 161 | Vert Scale 162 | leftImage 163 | slidericon.png 164 | isSegmented 165 | 166 | segmentCount 167 | 10 168 | PostNotification 169 | com.dpkg.ipadswitcher.changed 170 | 171 | 172 | cell 173 | PSGroupCell 174 | label 175 | Horizontal Spacing 176 | 177 | 178 | cell 179 | PSSliderCell 180 | default 181 | 11.6 182 | min 183 | 10 184 | max 185 | 120 186 | showValue 187 | 188 | defaults 189 | com.dpkg.ipadswitcher 190 | key 191 | horizSpacingLand 192 | label 193 | Horz Scale 194 | leftImage 195 | slidericon.png 196 | isSegmented 197 | 198 | segmentCount 199 | 10 200 | PostNotification 201 | com.dpkg.ipadswitcher.changed 202 | 203 | 204 | cell 205 | PSGroupCell 206 | 207 | 208 | action 209 | sbreload 210 | cell 211 | PSButtonCell 212 | label 213 | Apply Changes 214 | 215 | 216 | cell 217 | PSGroupCell 218 | footerText 219 | Check out my other tweaks :3 220 | 221 | 222 | cell 223 | PSGroupCell 224 | 225 | 226 | cell 227 | PSButtonCell 228 | label 229 | ArkromePro 230 | icon 231 | arkromepro.png 232 | action 233 | arkromePro 234 | 235 | 236 | cell 237 | PSGroupCell 238 | 239 | 240 | cell 241 | PSButtonCell 242 | label 243 | Dapple 244 | icon 245 | dapple.png 246 | action 247 | dappleTW 248 | 249 | 250 | title 251 | iPadSwitcher 252 | 253 | 254 | -------------------------------------------------------------------------------- /ipadswitcher/Resources/arkromepro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpkg9510/iPadSwitcher/64eb736ee0c5a84d99ccc2beb711456f40d0c695/ipadswitcher/Resources/arkromepro.png -------------------------------------------------------------------------------- /ipadswitcher/Resources/dapple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpkg9510/iPadSwitcher/64eb736ee0c5a84d99ccc2beb711456f40d0c695/ipadswitcher/Resources/dapple.png -------------------------------------------------------------------------------- /ipadswitcher/Resources/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpkg9510/iPadSwitcher/64eb736ee0c5a84d99ccc2beb711456f40d0c695/ipadswitcher/Resources/icon@2x.png -------------------------------------------------------------------------------- /ipadswitcher/entry.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | entry 6 | 7 | bundle 8 | iPadSwitcher 9 | cell 10 | PSLinkCell 11 | detail 12 | ipsRootListController 13 | icon 14 | icon.png 15 | isController 16 | 17 | label 18 | iPadSwitcher 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /ipadswitcher/ipsRootListController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface ipsRootListController : PSListController 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /ipadswitcher/ipsRootListController.m: -------------------------------------------------------------------------------- 1 | #include "ipsRootListController.h" 2 | #import 3 | #import 4 | #import "NSTask.h" 5 | 6 | @implementation ipsRootListController 7 | 8 | - (NSArray *)specifiers { 9 | if (!_specifiers) { 10 | _specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self]; 11 | } 12 | 13 | return _specifiers; 14 | } 15 | 16 | - (void)arkromePro 17 | { 18 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://repo.packix.com/package/com.dpkg.arkromepro/"] options:@{} completionHandler:nil]; 19 | } 20 | 21 | - (void)dappleTW 22 | { 23 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://repo.packix.com/package/com.dpkg.dapple/"] options:@{} completionHandler:nil]; 24 | } 25 | 26 | -(void)sbreload 27 | { 28 | UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"iPadSwitcher" 29 | message:@"Settings have been saved\n Respring now?" 30 | preferredStyle:UIAlertControllerStyleActionSheet]; 31 | UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel 32 | handler:^(UIAlertAction * action) {}]; 33 | UIAlertAction* yes = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive 34 | handler:^(UIAlertAction * action) { 35 | NSTask *t = [[NSTask alloc] init]; 36 | [t setLaunchPath:@"usr/bin/sbreload"]; 37 | [t launch]; 38 | }]; 39 | [alert addAction:defaultAction]; 40 | [alert addAction:yes]; 41 | [self presentViewController:alert animated:YES completion:nil]; 42 | 43 | } 44 | 45 | @end 46 | --------------------------------------------------------------------------------