diff --git a/.DS_Store b/.DS_Store index 0f20987..4b6816f 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.theos/_/DEBIAN/control b/.theos/_/DEBIAN/control index 576898d..2d4b27a 100644 --- a/.theos/_/DEBIAN/control +++ b/.theos/_/DEBIAN/control @@ -6,5 +6,5 @@ Description: A very noice tweak to configure the dock a bit more... Maintainer: burrit0z Author: burrit0z Section: Tweaks -Version: 1.1 +Version: 1.2 Installed-Size: 348 diff --git a/.theos/_/Library/MobileSubstrate/DynamicLibraries/testing.dylib b/.theos/_/Library/MobileSubstrate/DynamicLibraries/testing.dylib index 3140fdf..dbffc32 100755 Binary files a/.theos/_/Library/MobileSubstrate/DynamicLibraries/testing.dylib and b/.theos/_/Library/MobileSubstrate/DynamicLibraries/testing.dylib differ diff --git a/.theos/_/Library/PreferenceBundles/dockifyprefs.bundle/Root.plist b/.theos/_/Library/PreferenceBundles/dockifyprefs.bundle/Root.plist index a38b2b8..911784a 100644 Binary files a/.theos/_/Library/PreferenceBundles/dockifyprefs.bundle/Root.plist and b/.theos/_/Library/PreferenceBundles/dockifyprefs.bundle/Root.plist differ diff --git a/.theos/last_package b/.theos/last_package index d611829..c409f53 100644 --- a/.theos/last_package +++ b/.theos/last_package @@ -1 +1 @@ -./packages/com.burritoz.testing_1.1_iphoneos-arm.deb +./packages/com.burritoz.testing_1.2_iphoneos-arm.deb diff --git a/.theos/obj/arm64/Tweak.x.4bcb81e5.Td b/.theos/obj/arm64/Tweak.x.4bcb81e5.Td index 059bbb5..4dc5599 100644 --- a/.theos/obj/arm64/Tweak.x.4bcb81e5.Td +++ b/.theos/obj/arm64/Tweak.x.4bcb81e5.Td @@ -6,6 +6,8 @@ /Users/carsonzielinski/Documents/theos/include/HBLog.h \ /Users/carsonzielinski/Documents/theos/include/CoreFoundation/CFLogUtilities.h \ /Users/carsonzielinski/Documents/theos/include/SpringBoard/SpringBoard.h \ + /Users/carsonzielinski/Documents/theos/include/SpringBoard/SBDockIconListView.h \ + /Users/carsonzielinski/Documents/theos/include/SpringBoard/SBIconListView.h \ /Users/carsonzielinski/Documents/theos/vendor/lib/Cephei.framework/Headers/HBPreferences.h \ /Users/carsonzielinski/Documents/theos/include/substrate.h @@ -21,6 +23,10 @@ /Users/carsonzielinski/Documents/theos/include/SpringBoard/SpringBoard.h: +/Users/carsonzielinski/Documents/theos/include/SpringBoard/SBDockIconListView.h: + +/Users/carsonzielinski/Documents/theos/include/SpringBoard/SBIconListView.h: + /Users/carsonzielinski/Documents/theos/vendor/lib/Cephei.framework/Headers/HBPreferences.h: /Users/carsonzielinski/Documents/theos/include/substrate.h: diff --git a/.theos/obj/arm64/Tweak.x.4bcb81e5.o b/.theos/obj/arm64/Tweak.x.4bcb81e5.o index a29cc4f..474c611 100644 Binary files a/.theos/obj/arm64/Tweak.x.4bcb81e5.o and b/.theos/obj/arm64/Tweak.x.4bcb81e5.o differ diff --git a/.theos/obj/arm64/Tweak.x.m b/.theos/obj/arm64/Tweak.x.m new file mode 100644 index 0000000..44e6a81 --- /dev/null +++ b/.theos/obj/arm64/Tweak.x.m @@ -0,0 +1,90 @@ +#line 1 "Tweak.x" + +#import +#import +#import +#include + + +static BOOL transparent; +static BOOL hidden; +static double setHeight; +static double customOpacity; +static NSInteger setIconNumber; + +HBPreferences *preferences; + + + +#include +#if defined(__clang__) +#if __has_feature(objc_arc) +#define _LOGOS_SELF_TYPE_NORMAL __unsafe_unretained +#define _LOGOS_SELF_TYPE_INIT __attribute__((ns_consumed)) +#define _LOGOS_SELF_CONST const +#define _LOGOS_RETURN_RETAINED __attribute__((ns_returns_retained)) +#else +#define _LOGOS_SELF_TYPE_NORMAL +#define _LOGOS_SELF_TYPE_INIT +#define _LOGOS_SELF_CONST +#define _LOGOS_RETURN_RETAINED +#endif +#else +#define _LOGOS_SELF_TYPE_NORMAL +#define _LOGOS_SELF_TYPE_INIT +#define _LOGOS_SELF_CONST +#define _LOGOS_RETURN_RETAINED +#endif + +@class SBDockIconListView; @class SBDockView; +static void (*_logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$)(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL, double); static void _logos_method$_ungrouped$SBDockView$setBackgroundAlpha$(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL, double); static double (*_logos_orig$_ungrouped$SBDockView$dockHeight)(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL); static double _logos_method$_ungrouped$SBDockView$dockHeight(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL); static NSInteger (*_logos_meta_orig$_ungrouped$SBDockIconListView$maxIcons)(_LOGOS_SELF_TYPE_NORMAL Class _LOGOS_SELF_CONST, SEL); static NSInteger _logos_meta_method$_ungrouped$SBDockIconListView$maxIcons(_LOGOS_SELF_TYPE_NORMAL Class _LOGOS_SELF_CONST, SEL); + +#line 17 "Tweak.x" + + + +static void _logos_method$_ungrouped$SBDockView$setBackgroundAlpha$(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, double arg1) { + if (transparent == NO && hidden == NO) { + _logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$(self, _cmd, customOpacity); + }else if (transparent || hidden) { + _logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$(self, _cmd, 0.0); + } else { + NSLog(@"Dock not Transparent/hidden, no custom opacity\n"); + } +} + +static double _logos_method$_ungrouped$SBDockView$dockHeight(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd) { + return (_logos_orig$_ungrouped$SBDockView$dockHeight(self, _cmd)*setHeight); + } + + + + + +static NSInteger _logos_meta_method$_ungrouped$SBDockIconListView$maxIcons(_LOGOS_SELF_TYPE_NORMAL Class _LOGOS_SELF_CONST __unused self, SEL __unused _cmd) { + if (hidden) { + return (0); + } else { + return (setIconNumber); + } +} + + + +static __attribute__((constructor)) void _logosLocalCtor_44056092(int __unused argc, char __unused **argv, char __unused **envp) { + preferences = [[HBPreferences alloc] initWithIdentifier:@"com.burritoz.dockifyprefs"]; + [preferences registerDefaults:@{ + @"setHeight": @1, + @"customOpacity": @1, + @"hidden": @NO, + @"setIconNumber": @4, + }]; + [preferences registerBool:&transparent default:YES forKey:@"transparent"]; + [preferences registerBool:&hidden default:NO forKey:@"hidden"]; + [preferences registerDouble:(double *)&setHeight default:1 forKey:@"setHeight"]; + [preferences registerDouble:(double *)&customOpacity default:1 forKey:@"customOpacity"]; + [preferences registerInteger:(NSInteger *)&setIconNumber default:4 forKey:@"setIconNumber"]; +} +static __attribute__((constructor)) void _logosLocalInit() { +{Class _logos_class$_ungrouped$SBDockView = objc_getClass("SBDockView"); MSHookMessageEx(_logos_class$_ungrouped$SBDockView, @selector(setBackgroundAlpha:), (IMP)&_logos_method$_ungrouped$SBDockView$setBackgroundAlpha$, (IMP*)&_logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$);MSHookMessageEx(_logos_class$_ungrouped$SBDockView, @selector(dockHeight), (IMP)&_logos_method$_ungrouped$SBDockView$dockHeight, (IMP*)&_logos_orig$_ungrouped$SBDockView$dockHeight);Class _logos_class$_ungrouped$SBDockIconListView = objc_getClass("SBDockIconListView"); Class _logos_metaclass$_ungrouped$SBDockIconListView = object_getClass(_logos_class$_ungrouped$SBDockIconListView); MSHookMessageEx(_logos_metaclass$_ungrouped$SBDockIconListView, @selector(maxIcons), (IMP)&_logos_meta_method$_ungrouped$SBDockIconListView$maxIcons, (IMP*)&_logos_meta_orig$_ungrouped$SBDockIconListView$maxIcons);} } +#line 62 "Tweak.x" diff --git a/.theos/obj/arm64/testing.dylib b/.theos/obj/arm64/testing.dylib index 253f2cb..cae3523 100755 Binary files a/.theos/obj/arm64/testing.dylib and b/.theos/obj/arm64/testing.dylib differ diff --git a/.theos/obj/arm64/testing.dylib.dSYM/Contents/Resources/DWARF/testing.dylib b/.theos/obj/arm64/testing.dylib.dSYM/Contents/Resources/DWARF/testing.dylib index cbda465..0f42ecf 100644 Binary files a/.theos/obj/arm64/testing.dylib.dSYM/Contents/Resources/DWARF/testing.dylib and b/.theos/obj/arm64/testing.dylib.dSYM/Contents/Resources/DWARF/testing.dylib differ diff --git a/.theos/obj/arm64e/Tweak.x.a82baa7e.Td b/.theos/obj/arm64e/Tweak.x.a82baa7e.Td index c2df5d8..761d422 100644 --- a/.theos/obj/arm64e/Tweak.x.a82baa7e.Td +++ b/.theos/obj/arm64e/Tweak.x.a82baa7e.Td @@ -6,6 +6,8 @@ /Users/carsonzielinski/Documents/theos/include/HBLog.h \ /Users/carsonzielinski/Documents/theos/include/CoreFoundation/CFLogUtilities.h \ /Users/carsonzielinski/Documents/theos/include/SpringBoard/SpringBoard.h \ + /Users/carsonzielinski/Documents/theos/include/SpringBoard/SBDockIconListView.h \ + /Users/carsonzielinski/Documents/theos/include/SpringBoard/SBIconListView.h \ /Users/carsonzielinski/Documents/theos/vendor/lib/Cephei.framework/Headers/HBPreferences.h \ /Users/carsonzielinski/Documents/theos/include/substrate.h @@ -21,6 +23,10 @@ /Users/carsonzielinski/Documents/theos/include/SpringBoard/SpringBoard.h: +/Users/carsonzielinski/Documents/theos/include/SpringBoard/SBDockIconListView.h: + +/Users/carsonzielinski/Documents/theos/include/SpringBoard/SBIconListView.h: + /Users/carsonzielinski/Documents/theos/vendor/lib/Cephei.framework/Headers/HBPreferences.h: /Users/carsonzielinski/Documents/theos/include/substrate.h: diff --git a/.theos/obj/arm64e/Tweak.x.a82baa7e.o b/.theos/obj/arm64e/Tweak.x.a82baa7e.o index 984272d..3e11e6e 100644 Binary files a/.theos/obj/arm64e/Tweak.x.a82baa7e.o and b/.theos/obj/arm64e/Tweak.x.a82baa7e.o differ diff --git a/.theos/obj/arm64e/Tweak.x.m b/.theos/obj/arm64e/Tweak.x.m new file mode 100644 index 0000000..a0d6233 --- /dev/null +++ b/.theos/obj/arm64e/Tweak.x.m @@ -0,0 +1,90 @@ +#line 1 "Tweak.x" + +#import +#import +#import +#include + + +static BOOL transparent; +static BOOL hidden; +static double setHeight; +static double customOpacity; +static NSInteger setIconNumber; + +HBPreferences *preferences; + + + +#include +#if defined(__clang__) +#if __has_feature(objc_arc) +#define _LOGOS_SELF_TYPE_NORMAL __unsafe_unretained +#define _LOGOS_SELF_TYPE_INIT __attribute__((ns_consumed)) +#define _LOGOS_SELF_CONST const +#define _LOGOS_RETURN_RETAINED __attribute__((ns_returns_retained)) +#else +#define _LOGOS_SELF_TYPE_NORMAL +#define _LOGOS_SELF_TYPE_INIT +#define _LOGOS_SELF_CONST +#define _LOGOS_RETURN_RETAINED +#endif +#else +#define _LOGOS_SELF_TYPE_NORMAL +#define _LOGOS_SELF_TYPE_INIT +#define _LOGOS_SELF_CONST +#define _LOGOS_RETURN_RETAINED +#endif + +@class SBDockView; @class SBDockIconListView; +static void (*_logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$)(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL, double); static void _logos_method$_ungrouped$SBDockView$setBackgroundAlpha$(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL, double); static double (*_logos_orig$_ungrouped$SBDockView$dockHeight)(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL); static double _logos_method$_ungrouped$SBDockView$dockHeight(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL); static NSInteger (*_logos_meta_orig$_ungrouped$SBDockIconListView$maxIcons)(_LOGOS_SELF_TYPE_NORMAL Class _LOGOS_SELF_CONST, SEL); static NSInteger _logos_meta_method$_ungrouped$SBDockIconListView$maxIcons(_LOGOS_SELF_TYPE_NORMAL Class _LOGOS_SELF_CONST, SEL); + +#line 17 "Tweak.x" + + + +static void _logos_method$_ungrouped$SBDockView$setBackgroundAlpha$(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, double arg1) { + if (transparent == NO && hidden == NO) { + _logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$(self, _cmd, customOpacity); + }else if (transparent || hidden) { + _logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$(self, _cmd, 0.0); + } else { + NSLog(@"Dock not Transparent/hidden, no custom opacity\n"); + } +} + +static double _logos_method$_ungrouped$SBDockView$dockHeight(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd) { + return (_logos_orig$_ungrouped$SBDockView$dockHeight(self, _cmd)*setHeight); + } + + + + + +static NSInteger _logos_meta_method$_ungrouped$SBDockIconListView$maxIcons(_LOGOS_SELF_TYPE_NORMAL Class _LOGOS_SELF_CONST __unused self, SEL __unused _cmd) { + if (hidden) { + return (0); + } else { + return (setIconNumber); + } +} + + + +static __attribute__((constructor)) void _logosLocalCtor_44056092(int __unused argc, char __unused **argv, char __unused **envp) { + preferences = [[HBPreferences alloc] initWithIdentifier:@"com.burritoz.dockifyprefs"]; + [preferences registerDefaults:@{ + @"setHeight": @1, + @"customOpacity": @1, + @"hidden": @NO, + @"setIconNumber": @4, + }]; + [preferences registerBool:&transparent default:YES forKey:@"transparent"]; + [preferences registerBool:&hidden default:NO forKey:@"hidden"]; + [preferences registerDouble:(double *)&setHeight default:1 forKey:@"setHeight"]; + [preferences registerDouble:(double *)&customOpacity default:1 forKey:@"customOpacity"]; + [preferences registerInteger:(NSInteger *)&setIconNumber default:4 forKey:@"setIconNumber"]; +} +static __attribute__((constructor)) void _logosLocalInit() { +{Class _logos_class$_ungrouped$SBDockView = objc_getClass("SBDockView"); MSHookMessageEx(_logos_class$_ungrouped$SBDockView, @selector(setBackgroundAlpha:), (IMP)&_logos_method$_ungrouped$SBDockView$setBackgroundAlpha$, (IMP*)&_logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$);MSHookMessageEx(_logos_class$_ungrouped$SBDockView, @selector(dockHeight), (IMP)&_logos_method$_ungrouped$SBDockView$dockHeight, (IMP*)&_logos_orig$_ungrouped$SBDockView$dockHeight);Class _logos_class$_ungrouped$SBDockIconListView = objc_getClass("SBDockIconListView"); Class _logos_metaclass$_ungrouped$SBDockIconListView = object_getClass(_logos_class$_ungrouped$SBDockIconListView); MSHookMessageEx(_logos_metaclass$_ungrouped$SBDockIconListView, @selector(maxIcons), (IMP)&_logos_meta_method$_ungrouped$SBDockIconListView$maxIcons, (IMP*)&_logos_meta_orig$_ungrouped$SBDockIconListView$maxIcons);} } +#line 62 "Tweak.x" diff --git a/.theos/obj/arm64e/testing.dylib b/.theos/obj/arm64e/testing.dylib index 6c17d4f..c7bd309 100755 Binary files a/.theos/obj/arm64e/testing.dylib and b/.theos/obj/arm64e/testing.dylib differ diff --git a/.theos/obj/arm64e/testing.dylib.dSYM/Contents/Resources/DWARF/testing.dylib b/.theos/obj/arm64e/testing.dylib.dSYM/Contents/Resources/DWARF/testing.dylib index 5d259cc..533a509 100644 Binary files a/.theos/obj/arm64e/testing.dylib.dSYM/Contents/Resources/DWARF/testing.dylib and b/.theos/obj/arm64e/testing.dylib.dSYM/Contents/Resources/DWARF/testing.dylib differ diff --git a/.theos/obj/debug/arm64/Tweak.x.b761c000.Td b/.theos/obj/debug/arm64/Tweak.x.b761c000.Td index 1be3b57..0844eec 100644 --- a/.theos/obj/debug/arm64/Tweak.x.b761c000.Td +++ b/.theos/obj/debug/arm64/Tweak.x.b761c000.Td @@ -6,6 +6,8 @@ /Users/carsonzielinski/Documents/theos/include/HBLog.h \ /Users/carsonzielinski/Documents/theos/include/CoreFoundation/CFLogUtilities.h \ /Users/carsonzielinski/Documents/theos/include/SpringBoard/SpringBoard.h \ + /Users/carsonzielinski/Documents/theos/include/SpringBoard/SBDockIconListView.h \ + /Users/carsonzielinski/Documents/theos/include/SpringBoard/SBIconListView.h \ /Users/carsonzielinski/Documents/theos/vendor/lib/Cephei.framework/Headers/HBPreferences.h \ /Users/carsonzielinski/Documents/theos/include/substrate.h @@ -21,6 +23,10 @@ /Users/carsonzielinski/Documents/theos/include/SpringBoard/SpringBoard.h: +/Users/carsonzielinski/Documents/theos/include/SpringBoard/SBDockIconListView.h: + +/Users/carsonzielinski/Documents/theos/include/SpringBoard/SBIconListView.h: + /Users/carsonzielinski/Documents/theos/vendor/lib/Cephei.framework/Headers/HBPreferences.h: /Users/carsonzielinski/Documents/theos/include/substrate.h: diff --git a/.theos/obj/debug/arm64/Tweak.x.b761c000.o b/.theos/obj/debug/arm64/Tweak.x.b761c000.o index daf1cd2..a718874 100644 Binary files a/.theos/obj/debug/arm64/Tweak.x.b761c000.o and b/.theos/obj/debug/arm64/Tweak.x.b761c000.o differ diff --git a/.theos/obj/debug/arm64/Tweak.x.m b/.theos/obj/debug/arm64/Tweak.x.m index 26bf1ed..44e6a81 100644 --- a/.theos/obj/debug/arm64/Tweak.x.m +++ b/.theos/obj/debug/arm64/Tweak.x.m @@ -1,13 +1,16 @@ #line 1 "Tweak.x" #import +#import #import +#include static BOOL transparent; static BOOL hidden; static double setHeight; static double customOpacity; +static NSInteger setIconNumber; HBPreferences *preferences; @@ -33,10 +36,10 @@ HBPreferences *preferences; #define _LOGOS_RETURN_RETAINED #endif -@class SBDockView; -static void (*_logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$)(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL, double); static void _logos_method$_ungrouped$SBDockView$setBackgroundAlpha$(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL, double); static double (*_logos_orig$_ungrouped$SBDockView$dockHeight)(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL); static double _logos_method$_ungrouped$SBDockView$dockHeight(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL); +@class SBDockIconListView; @class SBDockView; +static void (*_logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$)(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL, double); static void _logos_method$_ungrouped$SBDockView$setBackgroundAlpha$(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL, double); static double (*_logos_orig$_ungrouped$SBDockView$dockHeight)(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL); static double _logos_method$_ungrouped$SBDockView$dockHeight(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL); static NSInteger (*_logos_meta_orig$_ungrouped$SBDockIconListView$maxIcons)(_LOGOS_SELF_TYPE_NORMAL Class _LOGOS_SELF_CONST, SEL); static NSInteger _logos_meta_method$_ungrouped$SBDockIconListView$maxIcons(_LOGOS_SELF_TYPE_NORMAL Class _LOGOS_SELF_CONST, SEL); -#line 14 "Tweak.x" +#line 17 "Tweak.x" @@ -51,27 +54,37 @@ static void _logos_method$_ungrouped$SBDockView$setBackgroundAlpha$(_LOGOS_SELF_ } static double _logos_method$_ungrouped$SBDockView$dockHeight(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd) { - if (hidden) { - return (-50); - } else { return (_logos_orig$_ungrouped$SBDockView$dockHeight(self, _cmd)*setHeight); } + + + + + +static NSInteger _logos_meta_method$_ungrouped$SBDockIconListView$maxIcons(_LOGOS_SELF_TYPE_NORMAL Class _LOGOS_SELF_CONST __unused self, SEL __unused _cmd) { + if (hidden) { + return (0); + } else { + return (setIconNumber); } +} -static __attribute__((constructor)) void _logosLocalCtor_d1a00f3d(int __unused argc, char __unused **argv, char __unused **envp) { +static __attribute__((constructor)) void _logosLocalCtor_44056092(int __unused argc, char __unused **argv, char __unused **envp) { preferences = [[HBPreferences alloc] initWithIdentifier:@"com.burritoz.dockifyprefs"]; [preferences registerDefaults:@{ @"setHeight": @1, @"customOpacity": @1, - @"hidden": @NO + @"hidden": @NO, + @"setIconNumber": @4, }]; [preferences registerBool:&transparent default:YES forKey:@"transparent"]; [preferences registerBool:&hidden default:NO forKey:@"hidden"]; [preferences registerDouble:(double *)&setHeight default:1 forKey:@"setHeight"]; [preferences registerDouble:(double *)&customOpacity default:1 forKey:@"customOpacity"]; + [preferences registerInteger:(NSInteger *)&setIconNumber default:4 forKey:@"setIconNumber"]; } static __attribute__((constructor)) void _logosLocalInit() { -{Class _logos_class$_ungrouped$SBDockView = objc_getClass("SBDockView"); MSHookMessageEx(_logos_class$_ungrouped$SBDockView, @selector(setBackgroundAlpha:), (IMP)&_logos_method$_ungrouped$SBDockView$setBackgroundAlpha$, (IMP*)&_logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$);MSHookMessageEx(_logos_class$_ungrouped$SBDockView, @selector(dockHeight), (IMP)&_logos_method$_ungrouped$SBDockView$dockHeight, (IMP*)&_logos_orig$_ungrouped$SBDockView$dockHeight);} } -#line 49 "Tweak.x" +{Class _logos_class$_ungrouped$SBDockView = objc_getClass("SBDockView"); MSHookMessageEx(_logos_class$_ungrouped$SBDockView, @selector(setBackgroundAlpha:), (IMP)&_logos_method$_ungrouped$SBDockView$setBackgroundAlpha$, (IMP*)&_logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$);MSHookMessageEx(_logos_class$_ungrouped$SBDockView, @selector(dockHeight), (IMP)&_logos_method$_ungrouped$SBDockView$dockHeight, (IMP*)&_logos_orig$_ungrouped$SBDockView$dockHeight);Class _logos_class$_ungrouped$SBDockIconListView = objc_getClass("SBDockIconListView"); Class _logos_metaclass$_ungrouped$SBDockIconListView = object_getClass(_logos_class$_ungrouped$SBDockIconListView); MSHookMessageEx(_logos_metaclass$_ungrouped$SBDockIconListView, @selector(maxIcons), (IMP)&_logos_meta_method$_ungrouped$SBDockIconListView$maxIcons, (IMP*)&_logos_meta_orig$_ungrouped$SBDockIconListView$maxIcons);} } +#line 62 "Tweak.x" diff --git a/.theos/obj/debug/arm64/testing.dylib b/.theos/obj/debug/arm64/testing.dylib index b7c17a2..0eab451 100755 Binary files a/.theos/obj/debug/arm64/testing.dylib and b/.theos/obj/debug/arm64/testing.dylib differ diff --git a/.theos/obj/debug/arm64/testing.dylib.dSYM/Contents/Resources/DWARF/testing.dylib b/.theos/obj/debug/arm64/testing.dylib.dSYM/Contents/Resources/DWARF/testing.dylib index 5f637b8..195d1ce 100644 Binary files a/.theos/obj/debug/arm64/testing.dylib.dSYM/Contents/Resources/DWARF/testing.dylib and b/.theos/obj/debug/arm64/testing.dylib.dSYM/Contents/Resources/DWARF/testing.dylib differ diff --git a/.theos/obj/debug/arm64e/Tweak.x.6e9da55c.Td b/.theos/obj/debug/arm64e/Tweak.x.6e9da55c.Td index 6752ac8..db7a460 100644 --- a/.theos/obj/debug/arm64e/Tweak.x.6e9da55c.Td +++ b/.theos/obj/debug/arm64e/Tweak.x.6e9da55c.Td @@ -6,6 +6,8 @@ /Users/carsonzielinski/Documents/theos/include/HBLog.h \ /Users/carsonzielinski/Documents/theos/include/CoreFoundation/CFLogUtilities.h \ /Users/carsonzielinski/Documents/theos/include/SpringBoard/SpringBoard.h \ + /Users/carsonzielinski/Documents/theos/include/SpringBoard/SBDockIconListView.h \ + /Users/carsonzielinski/Documents/theos/include/SpringBoard/SBIconListView.h \ /Users/carsonzielinski/Documents/theos/vendor/lib/Cephei.framework/Headers/HBPreferences.h \ /Users/carsonzielinski/Documents/theos/include/substrate.h @@ -21,6 +23,10 @@ /Users/carsonzielinski/Documents/theos/include/SpringBoard/SpringBoard.h: +/Users/carsonzielinski/Documents/theos/include/SpringBoard/SBDockIconListView.h: + +/Users/carsonzielinski/Documents/theos/include/SpringBoard/SBIconListView.h: + /Users/carsonzielinski/Documents/theos/vendor/lib/Cephei.framework/Headers/HBPreferences.h: /Users/carsonzielinski/Documents/theos/include/substrate.h: diff --git a/.theos/obj/debug/arm64e/Tweak.x.6e9da55c.o b/.theos/obj/debug/arm64e/Tweak.x.6e9da55c.o index afccea0..e9621fb 100644 Binary files a/.theos/obj/debug/arm64e/Tweak.x.6e9da55c.o and b/.theos/obj/debug/arm64e/Tweak.x.6e9da55c.o differ diff --git a/.theos/obj/debug/arm64e/Tweak.x.m b/.theos/obj/debug/arm64e/Tweak.x.m index 26bf1ed..44e6a81 100644 --- a/.theos/obj/debug/arm64e/Tweak.x.m +++ b/.theos/obj/debug/arm64e/Tweak.x.m @@ -1,13 +1,16 @@ #line 1 "Tweak.x" #import +#import #import +#include static BOOL transparent; static BOOL hidden; static double setHeight; static double customOpacity; +static NSInteger setIconNumber; HBPreferences *preferences; @@ -33,10 +36,10 @@ HBPreferences *preferences; #define _LOGOS_RETURN_RETAINED #endif -@class SBDockView; -static void (*_logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$)(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL, double); static void _logos_method$_ungrouped$SBDockView$setBackgroundAlpha$(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL, double); static double (*_logos_orig$_ungrouped$SBDockView$dockHeight)(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL); static double _logos_method$_ungrouped$SBDockView$dockHeight(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL); +@class SBDockIconListView; @class SBDockView; +static void (*_logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$)(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL, double); static void _logos_method$_ungrouped$SBDockView$setBackgroundAlpha$(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL, double); static double (*_logos_orig$_ungrouped$SBDockView$dockHeight)(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL); static double _logos_method$_ungrouped$SBDockView$dockHeight(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL); static NSInteger (*_logos_meta_orig$_ungrouped$SBDockIconListView$maxIcons)(_LOGOS_SELF_TYPE_NORMAL Class _LOGOS_SELF_CONST, SEL); static NSInteger _logos_meta_method$_ungrouped$SBDockIconListView$maxIcons(_LOGOS_SELF_TYPE_NORMAL Class _LOGOS_SELF_CONST, SEL); -#line 14 "Tweak.x" +#line 17 "Tweak.x" @@ -51,27 +54,37 @@ static void _logos_method$_ungrouped$SBDockView$setBackgroundAlpha$(_LOGOS_SELF_ } static double _logos_method$_ungrouped$SBDockView$dockHeight(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd) { - if (hidden) { - return (-50); - } else { return (_logos_orig$_ungrouped$SBDockView$dockHeight(self, _cmd)*setHeight); } + + + + + +static NSInteger _logos_meta_method$_ungrouped$SBDockIconListView$maxIcons(_LOGOS_SELF_TYPE_NORMAL Class _LOGOS_SELF_CONST __unused self, SEL __unused _cmd) { + if (hidden) { + return (0); + } else { + return (setIconNumber); } +} -static __attribute__((constructor)) void _logosLocalCtor_d1a00f3d(int __unused argc, char __unused **argv, char __unused **envp) { +static __attribute__((constructor)) void _logosLocalCtor_44056092(int __unused argc, char __unused **argv, char __unused **envp) { preferences = [[HBPreferences alloc] initWithIdentifier:@"com.burritoz.dockifyprefs"]; [preferences registerDefaults:@{ @"setHeight": @1, @"customOpacity": @1, - @"hidden": @NO + @"hidden": @NO, + @"setIconNumber": @4, }]; [preferences registerBool:&transparent default:YES forKey:@"transparent"]; [preferences registerBool:&hidden default:NO forKey:@"hidden"]; [preferences registerDouble:(double *)&setHeight default:1 forKey:@"setHeight"]; [preferences registerDouble:(double *)&customOpacity default:1 forKey:@"customOpacity"]; + [preferences registerInteger:(NSInteger *)&setIconNumber default:4 forKey:@"setIconNumber"]; } static __attribute__((constructor)) void _logosLocalInit() { -{Class _logos_class$_ungrouped$SBDockView = objc_getClass("SBDockView"); MSHookMessageEx(_logos_class$_ungrouped$SBDockView, @selector(setBackgroundAlpha:), (IMP)&_logos_method$_ungrouped$SBDockView$setBackgroundAlpha$, (IMP*)&_logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$);MSHookMessageEx(_logos_class$_ungrouped$SBDockView, @selector(dockHeight), (IMP)&_logos_method$_ungrouped$SBDockView$dockHeight, (IMP*)&_logos_orig$_ungrouped$SBDockView$dockHeight);} } -#line 49 "Tweak.x" +{Class _logos_class$_ungrouped$SBDockView = objc_getClass("SBDockView"); MSHookMessageEx(_logos_class$_ungrouped$SBDockView, @selector(setBackgroundAlpha:), (IMP)&_logos_method$_ungrouped$SBDockView$setBackgroundAlpha$, (IMP*)&_logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$);MSHookMessageEx(_logos_class$_ungrouped$SBDockView, @selector(dockHeight), (IMP)&_logos_method$_ungrouped$SBDockView$dockHeight, (IMP*)&_logos_orig$_ungrouped$SBDockView$dockHeight);Class _logos_class$_ungrouped$SBDockIconListView = objc_getClass("SBDockIconListView"); Class _logos_metaclass$_ungrouped$SBDockIconListView = object_getClass(_logos_class$_ungrouped$SBDockIconListView); MSHookMessageEx(_logos_metaclass$_ungrouped$SBDockIconListView, @selector(maxIcons), (IMP)&_logos_meta_method$_ungrouped$SBDockIconListView$maxIcons, (IMP*)&_logos_meta_orig$_ungrouped$SBDockIconListView$maxIcons);} } +#line 62 "Tweak.x" diff --git a/.theos/obj/debug/arm64e/testing.dylib b/.theos/obj/debug/arm64e/testing.dylib index 60f4bbe..ccf3ab5 100755 Binary files a/.theos/obj/debug/arm64e/testing.dylib and b/.theos/obj/debug/arm64e/testing.dylib differ diff --git a/.theos/obj/debug/arm64e/testing.dylib.dSYM/Contents/Resources/DWARF/testing.dylib b/.theos/obj/debug/arm64e/testing.dylib.dSYM/Contents/Resources/DWARF/testing.dylib index 1ec3569..c30dd13 100644 Binary files a/.theos/obj/debug/arm64e/testing.dylib.dSYM/Contents/Resources/DWARF/testing.dylib and b/.theos/obj/debug/arm64e/testing.dylib.dSYM/Contents/Resources/DWARF/testing.dylib differ diff --git a/.theos/obj/debug/dockifyprefs.bundle/Root.plist b/.theos/obj/debug/dockifyprefs.bundle/Root.plist index 1bd0264..f18f128 100644 --- a/.theos/obj/debug/dockifyprefs.bundle/Root.plist +++ b/.theos/obj/debug/dockifyprefs.bundle/Root.plist @@ -15,14 +15,12 @@ icon.png packageIdentifier com.burritoz.testing - packageNameOverride - Dockify by Burrit0z cell PSGroupCell label - Transparent Toggle (overrides custom opcaity): + Overall Dock Settings: cell @@ -36,12 +34,6 @@ label Transparent Dock - - cell - PSGroupCell - label - Hide Dock (overrides custom height): - cell PSSwitchCell @@ -52,7 +44,7 @@ key hidden label - Hide (kinda, not really) + Hide cell @@ -102,6 +94,38 @@ showValue + + cell + PSGroupCell + label + Max Dock Icons (each row): + + + cell + PSSliderCell + default + 4 + defaults + com.burritoz.dockifyprefs + key + setIconNumber + min + 0 + max + 20 + isSegmented + + segmentCount + 20 + showValue + + + + cell + PSGroupCell + label + + cell PSButtonCell @@ -116,18 +140,6 @@ footerText "Try not. Do... or do not. There is no try." - - cellClass - HBLinkTableCell - label - Source Code - subtitle - The source code for Dockify - icon - icon.png - url - https://github.com/Burrit0z/Dockify_Source - title Dockify diff --git a/.theos/obj/debug/testing.dylib b/.theos/obj/debug/testing.dylib index 01ab7ea..f749506 100755 Binary files a/.theos/obj/debug/testing.dylib and b/.theos/obj/debug/testing.dylib differ diff --git a/.theos/obj/dockifyprefs.bundle/Root.plist b/.theos/obj/dockifyprefs.bundle/Root.plist index 68cd490..89e5b60 100644 --- a/.theos/obj/dockifyprefs.bundle/Root.plist +++ b/.theos/obj/dockifyprefs.bundle/Root.plist @@ -15,14 +15,12 @@ icon.png packageIdentifier com.burritoz.testing - packageNameOverride - Dockify by Burrit0z cell PSGroupCell label - Transparent Toggle (overrides custom opcaity): + Overall Dock Settings: cell @@ -36,12 +34,6 @@ label Transparent Dock - - cell - PSGroupCell - label - Hide Dock (overrides custom height): - cell PSSwitchCell @@ -52,7 +44,7 @@ key hidden label - Hide (kinda, not really) + Hide cell @@ -102,6 +94,38 @@ showValue + + cell + PSGroupCell + label + Max Dock Icons: + + + cell + PSSliderCell + default + 4 + defaults + com.burritoz.dockifyprefs + key + setIconNumber + min + 0 + max + 20 + isSegmented + + segmentCount + 20 + showValue + + + + cell + PSGroupCell + label + + cell PSButtonCell diff --git a/.theos/obj/testing.dylib b/.theos/obj/testing.dylib index 3140fdf..dbffc32 100755 Binary files a/.theos/obj/testing.dylib and b/.theos/obj/testing.dylib differ diff --git a/.theos/packages/com.burritoz.testing-1.1 b/.theos/packages/com.burritoz.testing-1.1 new file mode 100644 index 0000000..ca7bf83 --- /dev/null +++ b/.theos/packages/com.burritoz.testing-1.1 @@ -0,0 +1 @@ +13 \ No newline at end of file diff --git a/Tweak.x b/Tweak.x index 5b906ea..27af8d9 100644 --- a/Tweak.x +++ b/Tweak.x @@ -1,12 +1,15 @@ //import needed files/headers #import +#import #import +#include //Set up variables for use with Cephei static BOOL transparent; static BOOL hidden; static double setHeight; static double customOpacity; +static NSInteger setIconNumber; HBPreferences *preferences; @@ -25,12 +28,20 @@ HBPreferences *preferences; } -(double)dockHeight { - if (hidden) { - return (-50); //just puts the dock barely off screen lol - } else { return (%orig*setHeight); //sets custom height if dock is not set to hidden } + +%end + +%hook SBDockIconListView + ++(NSInteger)maxIcons { + if (hidden) { + return (0); + } else { + return (setIconNumber); } +} %end @@ -39,10 +50,12 @@ HBPreferences *preferences; [preferences registerDefaults:@{ //defaults for prefernces @"setHeight": @1, @"customOpacity": @1, - @"hidden": @NO + @"hidden": @NO, + @"setIconNumber": @4, }]; [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 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 registerInteger:(NSInteger *)&setIconNumber default:4 forKey:@"setIconNumber"]; //Integer of how many icons to allow } diff --git a/control b/control index 8544ebd..1ea9fae 100644 --- a/control +++ b/control @@ -1,7 +1,7 @@ Package: com.burritoz.testing Name: Dockify Depends: mobilesubstrate, preferenceloader, com.saurik.substrate.safemode, ws.hbang.common (>=1.13) -Version: 1.1 +Version: 1.2 Architecture: iphoneos-arm Description: A very noice tweak to configure the dock a bit more... Maintainer: burrit0z diff --git a/dockifyprefs/.DS_Store b/dockifyprefs/.DS_Store index 10d9f8f..3f383b9 100644 Binary files a/dockifyprefs/.DS_Store and b/dockifyprefs/.DS_Store differ diff --git a/dockifyprefs/Resources/Root.plist b/dockifyprefs/Resources/Root.plist index 68cd490..89e5b60 100644 --- a/dockifyprefs/Resources/Root.plist +++ b/dockifyprefs/Resources/Root.plist @@ -15,14 +15,12 @@ icon.png packageIdentifier com.burritoz.testing - packageNameOverride - Dockify by Burrit0z cell PSGroupCell label - Transparent Toggle (overrides custom opcaity): + Overall Dock Settings: cell @@ -36,12 +34,6 @@ label Transparent Dock - - cell - PSGroupCell - label - Hide Dock (overrides custom height): - cell PSSwitchCell @@ -52,7 +44,7 @@ key hidden label - Hide (kinda, not really) + Hide cell @@ -102,6 +94,38 @@ showValue + + cell + PSGroupCell + label + Max Dock Icons: + + + cell + PSSliderCell + default + 4 + defaults + com.burritoz.dockifyprefs + key + setIconNumber + min + 0 + max + 20 + isSegmented + + segmentCount + 20 + showValue + + + + cell + PSGroupCell + label + + cell PSButtonCell diff --git a/packages/com.burritoz.testing_1.2_iphoneos-arm.deb b/packages/com.burritoz.testing_1.2_iphoneos-arm.deb new file mode 100644 index 0000000..edbb02a Binary files /dev/null and b/packages/com.burritoz.testing_1.2_iphoneos-arm.deb differ