Browse Source

Added code :D

master
Burrit0z 5 years ago
parent
commit
7df963ff67
5 changed files with 92 additions and 0 deletions
  1. +1
    -0
      4x3Folders.plist
  2. +71
    -0
      4x3folders.x
  3. +11
    -0
      Makefile
  4. +9
    -0
      control
  5. BIN
      packages/com.burritoz.4x3folders_1.0_iphoneos-arm.deb

+ 1
- 0
4x3Folders.plist View File

@@ -0,0 +1 @@
{ Filter = { Bundles = ( "com.apple.springboard" ); }; }

+ 71
- 0
4x3folders.x View File

@@ -0,0 +1,71 @@
//I needed more room in my folders so here it is...
//piracy protection
@interface SBCoverSheetPrimarySlidingViewController : UIViewController
- (void)viewDidDisappear:(BOOL)arg1;
- (void)viewDidAppear:(BOOL)arg1;
@end
BOOL dpkgInvalid = NO;
%hook SBCoverSheetPrimarySlidingViewController
- (void)viewDidDisappear:(BOOL)arg1 {

%orig; // Thanks to Nepeta for the DRM
if (!dpkgInvalid) return;
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Pirate Detected!"
message:@"Seriously? Pirating a free Tweak is awful!\nPiracy repo's Tweaks could contain Malware if you didn't know that, so go ahead and get 4x3Folders from the official Source https://Burrit0z.github.io/repo/.\nIf you're seeing this but you got it from the official source then make sure to add https://Burrit0z.github.io/repo to Cydia or Sileo."
preferredStyle:UIAlertControllerStyleAlert];

UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * action) {

UIApplication *application = [UIApplication sharedApplication];
[application openURL:[NSURL URLWithString:@"https://Burrit0z.github.io/repo"] options:@{} completionHandler:nil];

}];
[alertController addAction:cancelAction];
[self presentViewController:alertController animated:YES completion:nil];

}
%end
//ios 13
%hook SBIconListFlowLayout
- (NSUInteger)numberOfColumnsForOrientation:(NSInteger)arg1 {
return 4;
}
%end
//ios 12 and lower
%hook SBFolderIconListView
+(unsigned long long)iconColumnsForInterfaceOrientation:(long long)arg1 {
return (4);
}
%end
%ctor {
if (![NSProcessInfo processInfo]) return;
NSString *processName = [NSProcessInfo processInfo].processName;
bool isSpringboard = [@"SpringBoard" isEqualToString:processName];

// Someone smarter than Nepeta invented this.
// https://www.reddit.com/r/jailbreak/comments/4yz5v5/questionremote_messages_not_enabling/d6rlh88/
bool shouldLoad = NO;
NSArray *args = [[NSClassFromString(@"NSProcessInfo") processInfo] arguments];
NSUInteger count = args.count;
if (count != 0) {
NSString *executablePath = args[0];
if (executablePath) {
NSString *processName = [executablePath lastPathComponent];
BOOL isApplication = [executablePath rangeOfString:@"/Application/"].location != NSNotFound || [executablePath rangeOfString:@"/Applications/"].location != NSNotFound;
BOOL isFileProvider = [[processName lowercaseString] rangeOfString:@"fileprovider"].location != NSNotFound;
BOOL skip = [processName isEqualToString:@"AdSheet"]
|| [processName isEqualToString:@"CoreAuthUI"]
|| [processName isEqualToString:@"InCallService"]
|| [processName isEqualToString:@"MessagesNotificationViewService"]
|| [executablePath rangeOfString:@".appex/"].location != NSNotFound;
if ((!isFileProvider && isApplication && !skip) || isSpringboard) {
shouldLoad = YES;
}
}
}

if (!shouldLoad) return;

dpkgInvalid = ![[NSFileManager defaultManager] fileExistsAtPath:@"/var/lib/dpkg/info/com.burritoz.4x3folders.list"];
if (!dpkgInvalid) dpkgInvalid = ![[NSFileManager defaultManager] fileExistsAtPath:@"/var/lib/dpkg/info/com.burritoz.4x3folders.md5sums"];
}

+ 11
- 0
Makefile View File

@@ -0,0 +1,11 @@
INSTALL_TARGET_PROCESSES = SpringBoard
ARCHS = armv7 armv7s arm64 arm64e

include $(THEOS)/makefiles/common.mk

TWEAK_NAME = 4x3Folders

4x3Folders_FILES = 4x3folders.x
4x3Folders_CFLAGS = -fobjc-arc

include $(THEOS_MAKE_PATH)/tweak.mk

+ 9
- 0
control View File

@@ -0,0 +1,9 @@
Package: com.burritoz.4x3folders
Name: 4x3 Folders
Depends: mobilesubstrate
Version: 1.0
Architecture: iphoneos-arm
Description: Sometimes 9 just isn't enough. Give your folders an extra column!
Maintainer: burrit0z
Author: burrit0z
Section: Tweaks

BIN
packages/com.burritoz.4x3folders_1.0_iphoneos-arm.deb View File


Loading…
Cancel
Save