Browse Source

1.2.1

ios 13 support!
master
Burrit0z 4 years ago
parent
commit
91f58b8f8a
17 changed files with 133 additions and 118 deletions
  1. BIN
      .DS_Store
  2. +3
    -3
      .theos/_/DEBIAN/control
  3. BIN
      .theos/_/Library/PreferenceBundles/dockifyprefs.bundle/Info.plist
  4. BIN
      .theos/_/Library/PreferenceBundles/dockifyprefs.bundle/Root.plist
  5. BIN
      .theos/_/Library/PreferenceBundles/dockifyprefs.bundle/dockifyprefs
  6. BIN
      .theos/_/Library/PreferenceLoader/Preferences/dockifyprefs.plist
  7. +1
    -1
      .theos/last_package
  8. +13
    -1
      .theos/obj/debug/dockifyprefs.bundle/Root.plist
  9. +91
    -52
      Dockify.xm
  10. +7
    -2
      Makefile
  11. +3
    -3
      README.md
  12. +2
    -2
      control
  13. +13
    -1
      dockifyprefs/Resources/Root.plist
  14. +0
    -53
      dockifyprefs/Resources/notimportant(forlater).txt
  15. BIN
      packages/com.burritoz.dockify_1.2-7+debug_iphoneos-arm.deb
  16. BIN
      packages/com.burritoz.dockify_1.2-7+debug_iphoneos-arm.deb.zip
  17. BIN
      packages/com.burritoz.dockify_1.2.1_iphoneos-arm.deb

BIN
.DS_Store View File


+ 3
- 3
.theos/_/DEBIAN/control View File

Depends: mobilesubstrate, preferenceloader, com.saurik.substrate.safemode, ws.hbang.common (>=1.13) Depends: mobilesubstrate, preferenceloader, com.saurik.substrate.safemode, ws.hbang.common (>=1.13)
Conflicts: com.burritoz.testing Conflicts: com.burritoz.testing
Architecture: iphoneos-arm Architecture: iphoneos-arm
Description: A very noice tweak to configure the dock a bit more...
Description: A very noice tweak to configure the dock a bit more... Lightweight and effective!
Maintainer: burrit0z Maintainer: burrit0z
Author: burrit0z Author: burrit0z
Section: Tweaks Section: Tweaks
Version: 1.2-7+debug
Installed-Size: 356
Version: 1.2.1
Installed-Size: 412

BIN
.theos/_/Library/PreferenceBundles/dockifyprefs.bundle/Info.plist View File


BIN
.theos/_/Library/PreferenceBundles/dockifyprefs.bundle/Root.plist View File


BIN
.theos/_/Library/PreferenceBundles/dockifyprefs.bundle/dockifyprefs View File


BIN
.theos/_/Library/PreferenceLoader/Preferences/dockifyprefs.plist View File


+ 1
- 1
.theos/last_package View File

./packages/com.burritoz.dockify_1.2-7+debug_iphoneos-arm.deb
./packages/com.burritoz.dockify_1.2.1_iphoneos-arm.deb

+ 13
- 1
.theos/obj/debug/dockifyprefs.bundle/Root.plist View File

<key>label</key> <key>label</key>
<string>Overall Dock Settings:</string> <string>Overall Dock Settings:</string>
</dict> </dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<true/>
<key>defaults</key>
<string>com.burritoz.dockifyprefs</string>
<key>key</key>
<string>tweakEnabled</string>
<key>label</key>
<string>Enable Tweak</string>
</dict>
<dict> <dict>
<key>cell</key> <key>cell</key>
<string>PSSwitchCell</string> <string>PSSwitchCell</string>
<key>cell</key> <key>cell</key>
<string>PSGroupCell</string> <string>PSGroupCell</string>
<key>label</key> <key>label</key>
<string>Custom Dock Icons (exact # you want):</string>
<string>Custom Dock Icons (buggy):</string>
</dict> </dict>
<dict> <dict>
<key>cell</key> <key>cell</key>

Dockify.x → Dockify.xm View File

//Please note, in order to use MSHookIvar, this file needs to be .xm
#import <Cephei/HBPreferences.h> #import <Cephei/HBPreferences.h>
#import <Foundation/Foundation.h>


@interface SBCoverSheetPrimarySlidingViewController : UIViewController @interface SBCoverSheetPrimarySlidingViewController : UIViewController
- (void)viewDidDisappear:(BOOL)arg1; - (void)viewDidDisappear:(BOOL)arg1;
- (void)viewDidAppear:(BOOL)arg1; - (void)viewDidAppear:(BOOL)arg1;
@end @end


@interface SBIconListGridLayoutConfiguration
@property (nonatomic, assign) NSString *location;

- (NSString *)findLocation;
- (NSUInteger)numberOfPortraitColumns;
- (NSUInteger)numberOfPortraitRows;
@end

//Set up variables for use with Cephei //Set up variables for use with Cephei
static BOOL tweakEnabled;
static BOOL transparent; static BOOL transparent;
static BOOL hidden; static BOOL hidden;
static double setHeight; static double setHeight;
static NSInteger setIconNumber; static NSInteger setIconNumber;
//nepeta like drm //nepeta like drm
BOOL dpkgInvalid = NO; BOOL dpkgInvalid = NO;
//static NSInteger setDockRowNumber;
//static CGFloat setRowSpacing;


HBPreferences *preferences; HBPreferences *preferences;


%group allVersions
%hook SBCoverSheetPrimarySlidingViewController %hook SBCoverSheetPrimarySlidingViewController
- (void)viewDidDisappear:(BOOL)arg1 { - (void)viewDidDisappear:(BOOL)arg1 {




} }
%end %end
%end


%group version12
//hook the dock //hook the dock
%hook SBDockView %hook SBDockView

//ios 12
-(double)dockHeight {
if (hidden) {
return (0);
} else {
return (%orig*setHeight); //sets custom height if dock is not set to hidden
}
}
//this deals with everything adjusting opacity/transparency //this deals with everything adjusting opacity/transparency
//ios 12 and 13 //ios 12 and 13
-(void)setBackgroundAlpha:(double)arg1 { -(void)setBackgroundAlpha:(double)arg1 {
NSLog(@"Dock not Transparent/hidden, no custom opacity\n"); NSLog(@"Dock not Transparent/hidden, no custom opacity\n");
} }
} }
%end


//ios 13
-(double)defaultHeight {
//NEW HOOK FOR ICON STATE
%hook SBDockIconListView
//ios 12 required piece
+(NSInteger)maxIcons {
if (hidden) { if (hidden) {
return (0); return (0);
} else { } else {
return (%orig*setHeight); //sets custom height if dock is not set to hidden
return (setIconNumber);
} }
} }
%end
%end


//ios 12
//NEW GROUP FOR ios13
%group version13
%hook SBDockView
//ios 13
-(double)dockHeight { -(double)dockHeight {
if (hidden) { if (hidden) {
return (0); return (0);
return (%orig*setHeight); //sets custom height if dock is not set to hidden return (%orig*setHeight); //sets custom height if dock is not set to hidden
} }
} }

//this deals with everything adjusting opacity/transparency
//ios 12 and 13
-(void)setBackgroundAlpha:(double)arg1 {
if (transparent == NO && hidden == NO) { //if not transparent and not hidden
%orig(customOpacity);
}else if (transparent || hidden) { // Note: || means or in objc
%orig(0.0); //hides background of the dock (transparent)
} else {
NSLog(@"Dock not Transparent/hidden, no custom opacity\n");
}
}
%end %end

//NEW HOOK FOR ICON STATE
%hook SBDockIconListView %hook SBDockIconListView
//ios 12 required piece
+(NSInteger)maxIcons {
if (hidden) {
return (0);
} else {
return (setIconNumber);
}
}

- (NSUInteger)iconColumnsForCurrentOrientation { - (NSUInteger)iconColumnsForCurrentOrientation {
if (hidden) { if (hidden) {
return (0); return (0);
} else { } else {
NSInteger reg = %orig;
return reg; //basically just returns the original value
return (setIconNumber);
} }
} }
%end %end
//ios 13
//fix for icons being off the page ios 13
%hook SBIconListGridLayoutConfiguration %hook SBIconListGridLayoutConfiguration


-(void)setNumberOfPortraitColumns:(unsigned long long)arg1 {
if (setIconNumber == 4) {
NSIntegr reg = %orig;
%orig(reg);
} else {
%orig(setIconNumber);
}
%property (nonatomic, assign) NSString *location;

%new //Modeled off of Kritanta's solution with ivars
- (NSString *)findLocation {
if (self.location) return self.location;
else {
NSUInteger rows = MSHookIvar<NSUInteger>(self, "_numberOfPortraitRows");
NSUInteger columns = MSHookIvar<NSUInteger>(self, "_numberOfPortraitColumns");
// dock
if (rows <= 2 && columns == 4) {
self.location = @"Dock";
} else if (rows == 3 && columns == 3) {
self.location = @"Folder";
} else {
self.location = @"Root";
}
}
return self.location;
} }
%end


%hook SBIconListView
//fix so it doesnt set all pages to 5 columns ios 13
-(unsigned long long)iconColumnsForCurrentOrientation {
return (4);
}
-(BOOL)automaticallyAdjustsLayoutMetricsToFit {
return YES;
}
%end
//fix for icons being off the page ios 13 and maybe 12
%hook SBIconListFlowLayout
- (NSUInteger)numberOfColumnsForOrientation:(NSInteger)arg1 {
return (4);
- (NSUInteger)numberOfPortraitColumns {
[self findLocation];
if ([self.location isEqualToString:@"Dock"]) {
if (hidden) {
return (0);
} else {
return (setIconNumber);
}
} else {
return (%orig);
}
} }
%end %end
//another fix for the folders ios12
%hook SBFolderIconListView
+(unsigned long long)iconColumnsForInterfaceOrientation:(long long)arg1 {
return (4);
}
%end %end

// Thanks to Nepeta for the DRM, and thanks to Sh0rtflow as well
// Thanks to Nepeta for the DRM, and thanks to Litten as well
%ctor { %ctor {
dpkgInvalid = ![[NSFileManager defaultManager] fileExistsAtPath:@"/var/lib/dpkg/info/com.burritoz.dockify.list"]; dpkgInvalid = ![[NSFileManager defaultManager] fileExistsAtPath:@"/var/lib/dpkg/info/com.burritoz.dockify.list"];
if (!dpkgInvalid) dpkgInvalid = ![[NSFileManager defaultManager] fileExistsAtPath:@"/var/lib/dpkg/info/com.burritoz.dockify.md5sums"]; if (!dpkgInvalid) dpkgInvalid = ![[NSFileManager defaultManager] fileExistsAtPath:@"/var/lib/dpkg/info/com.burritoz.dockify.md5sums"];


preferences = [[HBPreferences alloc] initWithIdentifier:@"com.burritoz.dockifyprefs"]; preferences = [[HBPreferences alloc] initWithIdentifier:@"com.burritoz.dockifyprefs"];
[preferences registerDefaults:@ { //defaults for prefernces [preferences registerDefaults:@ { //defaults for prefernces
@"tweakEnabled": @YES,
@"setHeight": @1, @"setHeight": @1,
@"customOpacity": @1, @"customOpacity": @1,
@"hidden": @NO, @"hidden": @NO,
@"setIconNumber": @4, @"setIconNumber": @4,
// @"setRowSpacing": @0,
}]; }];
[preferences registerBool:&tweakEnabled default:YES forKey:@"tweakEnabled"];
[preferences registerBool:&transparent default:YES forKey:@"transparent"]; //registering transparent as a Boolean [preferences registerBool:&transparent default:YES forKey:@"transparent"]; //registering transparent as a Boolean
[preferences registerBool:&hidden default:NO forKey:@"hidden"]; //registering hidden as a Boolean [preferences registerBool:&hidden default:NO forKey:@"hidden"]; //registering hidden as a Boolean
[preferences registerDouble:(double *)&setHeight default:1 forKey:@"setHeight"]; //registering setHeigt as a double (number) [preferences registerDouble:(double *)&setHeight default:1 forKey:@"setHeight"]; //registering setHeigt as a double (number)
[preferences registerDouble:(double *)&customOpacity default:1 forKey:@"customOpacity"]; //registering customOpacity as a double (number) [preferences registerDouble:(double *)&customOpacity default:1 forKey:@"customOpacity"]; //registering customOpacity as a double (number)
[preferences registerInteger:(NSInteger *)&setIconNumber default:4 forKey:@"setIconNumber"]; //Integer of how many icons to allow [preferences registerInteger:(NSInteger *)&setIconNumber default:4 forKey:@"setIconNumber"]; //Integer of how many icons to allow
// [preferences registerInteger:(NSInteger *)&setDockRowNumber default:1 forKey:@"setDockRowNumber"]; //Integer of how many dock rows to allow
// [preferences registerFloat:(CGFloat *)&setRowSpacing default:0 forKey:@"setRowSpacing"]; //custom dock row spacing?
if (tweakEnabled) {
%init(allVersions);
if (kCFCoreFoundationVersionNumber < 1600) //This means version < 12
{
%init(version12);
}
else
{
%init(version13);
}
}
} }

+ 7
- 2
Makefile View File

ARCHS = arm64 arm64e
ARCHS = armv7s arm64 arm64e
THEOS_DEVICE_IP = 192.168.0.172
INSTALL_TARGET_PROCESSES = SpringBoard INSTALL_TARGET_PROCESSES = SpringBoard


include $(THEOS)/makefiles/common.mk include $(THEOS)/makefiles/common.mk


TWEAK_NAME = Dockify TWEAK_NAME = Dockify


Dockify_FILES = Dockify.x
Dockify_FILES = Dockify.xm
Dockify_CFLAGS = -fobjc-arc Dockify_CFLAGS = -fobjc-arc
Dockify_EXTRA_FRAMEWORKS += Cephei Dockify_EXTRA_FRAMEWORKS += Cephei


include $(THEOS_MAKE_PATH)/tweak.mk include $(THEOS_MAKE_PATH)/tweak.mk
SUBPROJECTS += dockifyprefs SUBPROJECTS += dockifyprefs
include $(THEOS_MAKE_PATH)/aggregate.mk include $(THEOS_MAKE_PATH)/aggregate.mk

after-install::
echo "Made by Burrit0z"
echo "Try not. Do or do not. There is no try."

+ 3
- 3
README.md View File

# Dockify_Source # Dockify_Source
SOURCE CODE FOR DOCKIFY SOURCE CODE FOR DOCKIFY


**Get it here:** https://burrit0z.github.io/repo
**Compatability:** iOS 8 and up, a12 included
**Source code:** You are looking at it.
## Get it here: https://burrit0z.github.io/repo
## Compatibility: iOS 8 and up, a12 included
## Source code: You are looking at it.

+ 2
- 2
control View File

Name: Dockify Name: Dockify
Depends: mobilesubstrate, preferenceloader, com.saurik.substrate.safemode, ws.hbang.common (>=1.13) Depends: mobilesubstrate, preferenceloader, com.saurik.substrate.safemode, ws.hbang.common (>=1.13)
Conflicts: com.burritoz.testing Conflicts: com.burritoz.testing
Version: 1.2
Version: 1.2.1
Architecture: iphoneos-arm Architecture: iphoneos-arm
Description: A very noice tweak to configure the dock a bit more...
Description: A very noice tweak to configure the dock a bit more... Lightweight and effective!
Maintainer: burrit0z Maintainer: burrit0z
Author: burrit0z Author: burrit0z
Section: Tweaks Section: Tweaks

+ 13
- 1
dockifyprefs/Resources/Root.plist View File

<key>label</key> <key>label</key>
<string>Overall Dock Settings:</string> <string>Overall Dock Settings:</string>
</dict> </dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<true/>
<key>defaults</key>
<string>com.burritoz.dockifyprefs</string>
<key>key</key>
<string>tweakEnabled</string>
<key>label</key>
<string>Enable Tweak</string>
</dict>
<dict> <dict>
<key>cell</key> <key>cell</key>
<string>PSSwitchCell</string> <string>PSSwitchCell</string>
<key>cell</key> <key>cell</key>
<string>PSGroupCell</string> <string>PSGroupCell</string>
<key>label</key> <key>label</key>
<string>Custom Dock Icons (exact # you want):</string>
<string>Custom Dock Icons (buggy):</string>
</dict> </dict>
<dict> <dict>
<key>cell</key> <key>cell</key>

+ 0
- 53
dockifyprefs/Resources/notimportant(forlater).txt View File

BACKUP cause im lazy. this is for a future feature
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Max Dock Rows:</string>
</dict>
<dict>
<key>cell</key>
<string>PSSliderCell</string>
<key>default</key>
<string>1</string>
<key>defaults</key>
<string>com.burritoz.dockifyprefs</string>
<key>key</key>
<string>setDockRowNumber</string>
<key>min</key>
<integer>0</integer>
<key>max</key>
<integer>7</integer>
<key>isSegmented</key>
<true/>
<key>segmentCount</key>
<integer>7</integer>
<key>showValue</key>
<true/>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Dock Row Spacing</string>
</dict>
<dict>
<key>cell</key>
<string>PSSliderCell</string>
<key>default</key>
<string>0</string>
<key>defaults</key>
<string>com.burritoz.dockifyprefs</string>
<key>key</key>
<string>setRowSpacing</string>
<key>min</key>
<integer>0</integer>
<key>max</key>
<integer>200</integer>
<key>isSegmented</key>
<true/>
<key>segmentCount</key>
<integer>200</integer>
<key>showValue</key>
<true/>
</dict>

BIN
packages/com.burritoz.dockify_1.2-7+debug_iphoneos-arm.deb View File


BIN
packages/com.burritoz.dockify_1.2-7+debug_iphoneos-arm.deb.zip View File


BIN
packages/com.burritoz.dockify_1.2.1_iphoneos-arm.deb View File


Loading…
Cancel
Save