commit a7005799f44daad7bae12bed98cc7987624548f3 Author: Viggo Lekdorf Date: Fri Jan 3 11:53:31 2020 +0100 kage diff --git a/.theos/_/DEBIAN/control b/.theos/_/DEBIAN/control new file mode 100644 index 0000000..492c04e --- /dev/null +++ b/.theos/_/DEBIAN/control @@ -0,0 +1,12 @@ +Package: com.yaypixxo.kage +Name: Kage +Depends: mobilesubstrate, preferenceloader +Architecture: iphoneos-arm +Description: show/hide/change ls and hs stuff! +Depiction: https://yaypixxo.com/depictions?p=com.yaypixxo.kage +SileoDepiction: https://yaypixxo.com/sileo/com.yaypixxo.kage +Maintainer: YaYPIXXO +Author: YaYPIXXO +Section: Tweaks +Version: 1.0.0-1+debug +Installed-Size: 284 diff --git a/.theos/_/Library/MobileSubstrate/DynamicLibraries/Kage.dylib b/.theos/_/Library/MobileSubstrate/DynamicLibraries/Kage.dylib new file mode 100755 index 0000000..956b87a Binary files /dev/null and b/.theos/_/Library/MobileSubstrate/DynamicLibraries/Kage.dylib differ diff --git a/.theos/_/Library/MobileSubstrate/DynamicLibraries/Kage.plist b/.theos/_/Library/MobileSubstrate/DynamicLibraries/Kage.plist new file mode 100644 index 0000000..10dc654 --- /dev/null +++ b/.theos/_/Library/MobileSubstrate/DynamicLibraries/Kage.plist @@ -0,0 +1 @@ +{ Filter = { Bundles = ( "com.apple.springboard" ); }; } diff --git a/.theos/_/Library/PreferenceBundles/kageprefs.bundle/Info.plist b/.theos/_/Library/PreferenceBundles/kageprefs.bundle/Info.plist new file mode 100644 index 0000000..d20fe92 --- /dev/null +++ b/.theos/_/Library/PreferenceBundles/kageprefs.bundle/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + kageprefs + CFBundleIdentifier + com.yaypixxo.kageprefs + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSPrincipalClass + KgeRootListController + + diff --git a/.theos/_/Library/PreferenceBundles/kageprefs.bundle/Root.plist b/.theos/_/Library/PreferenceBundles/kageprefs.bundle/Root.plist new file mode 100644 index 0000000..7b6511c --- /dev/null +++ b/.theos/_/Library/PreferenceBundles/kageprefs.bundle/Root.plist @@ -0,0 +1,87 @@ + + + + + items + + + cell + PSGroupCell + label + Kage - by YaYPIXXO + + + cell + PSSwitchCell + default + + defaults + com.yaypixxo.kage + key + enabled + label + Enable Tweak + PostNotification + com.yaypixxo.kage/preferences.changed + + + cell + PSSwitchCell + default + + defaults + com.yaypixxo.kage + key + hide3dDivs + label + Hide 3D Touch Dividers + PostNotification + com.yaypixxo.kage/preferences.changed + + + cell + PSSwitchCell + default + + defaults + com.yaypixxo.kage + key + gridSwitcher + label + Enable Grid Switcher + PostNotification + com.yaypixxo.kage/preferences.changed + + + cell + PSSwitchCell + default + + defaults + com.yaypixxo.kage + key + hideLSBatt + label + Hide LS Battery + PostNotification + com.yaypixxo.kage/preferences.changed + + + cell + PSSwitchCell + default + + defaults + com.yaypixxo.kage + key + statusBarShowTimeLS + label + Time in LS Status Bar + PostNotification + com.yaypixxo.kage/preferences.changed + + + title + Kage + + diff --git a/.theos/_/Library/PreferenceBundles/kageprefs.bundle/kageprefs b/.theos/_/Library/PreferenceBundles/kageprefs.bundle/kageprefs new file mode 100755 index 0000000..8db2e21 Binary files /dev/null and b/.theos/_/Library/PreferenceBundles/kageprefs.bundle/kageprefs differ diff --git a/.theos/_/Library/PreferenceLoader/Preferences/kageprefs.plist b/.theos/_/Library/PreferenceLoader/Preferences/kageprefs.plist new file mode 100644 index 0000000..8699bf8 --- /dev/null +++ b/.theos/_/Library/PreferenceLoader/Preferences/kageprefs.plist @@ -0,0 +1,21 @@ + + + + + entry + + bundle + kageprefs + cell + PSLinkCell + detail + KgeRootListController + icon + icon.png + isController + + label + Kage + + + diff --git a/.theos/build_session b/.theos/build_session new file mode 100644 index 0000000..e69de29 diff --git a/.theos/fakeroot b/.theos/fakeroot new file mode 100644 index 0000000..e69de29 diff --git a/.theos/last_package b/.theos/last_package new file mode 100644 index 0000000..9c3f576 --- /dev/null +++ b/.theos/last_package @@ -0,0 +1 @@ +./packages/com.yaypixxo.kage_1.0.0-1+debug_iphoneos-arm.deb diff --git a/.theos/obj/debug/.stamp b/.theos/obj/debug/.stamp new file mode 100644 index 0000000..e69de29 diff --git a/.theos/obj/debug/Kage.dylib b/.theos/obj/debug/Kage.dylib new file mode 100755 index 0000000..956b87a Binary files /dev/null and b/.theos/obj/debug/Kage.dylib differ diff --git a/.theos/obj/debug/arm64/Kage.dylib b/.theos/obj/debug/arm64/Kage.dylib new file mode 100755 index 0000000..8f49344 Binary files /dev/null and b/.theos/obj/debug/arm64/Kage.dylib differ diff --git a/.theos/obj/debug/arm64/Kage.dylib.dSYM/Contents/Info.plist b/.theos/obj/debug/arm64/Kage.dylib.dSYM/Contents/Info.plist new file mode 100644 index 0000000..c33278a --- /dev/null +++ b/.theos/obj/debug/arm64/Kage.dylib.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.Kage.dylib + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/.theos/obj/debug/arm64/Kage.dylib.dSYM/Contents/Resources/DWARF/Kage.dylib b/.theos/obj/debug/arm64/Kage.dylib.dSYM/Contents/Resources/DWARF/Kage.dylib new file mode 100644 index 0000000..f1215ec Binary files /dev/null and b/.theos/obj/debug/arm64/Kage.dylib.dSYM/Contents/Resources/DWARF/Kage.dylib differ diff --git a/.theos/obj/debug/arm64/KgeRootListController.m.6665583a.Td b/.theos/obj/debug/arm64/KgeRootListController.m.6665583a.Td new file mode 100644 index 0000000..3c24a3e --- /dev/null +++ b/.theos/obj/debug/arm64/KgeRootListController.m.6665583a.Td @@ -0,0 +1,21 @@ +/Users/yaypixxo/Documents/git/kage/.theos/obj/debug/arm64/KgeRootListController.m.6665583a.o: \ + KgeRootListController.m /Users/yaypixxo/theos/Prefix.pch \ + /Users/yaypixxo/theos/vendor/include/_Prefix/BackwardsCompat.h \ + /Users/yaypixxo/theos/vendor/include/_Prefix/IOSMacros.h \ + /Users/yaypixxo/theos/vendor/include/HBLog.h KgeRootListController.h \ + /Users/yaypixxo/theos/vendor/include/Preferences/PSListController.h \ + /Users/yaypixxo/theos/vendor/include/Preferences/PSViewController.h + +/Users/yaypixxo/theos/Prefix.pch: + +/Users/yaypixxo/theos/vendor/include/_Prefix/BackwardsCompat.h: + +/Users/yaypixxo/theos/vendor/include/_Prefix/IOSMacros.h: + +/Users/yaypixxo/theos/vendor/include/HBLog.h: + +KgeRootListController.h: + +/Users/yaypixxo/theos/vendor/include/Preferences/PSListController.h: + +/Users/yaypixxo/theos/vendor/include/Preferences/PSViewController.h: diff --git a/.theos/obj/debug/arm64/KgeRootListController.m.6665583a.o b/.theos/obj/debug/arm64/KgeRootListController.m.6665583a.o new file mode 100644 index 0000000..0b15405 Binary files /dev/null and b/.theos/obj/debug/arm64/KgeRootListController.m.6665583a.o differ diff --git a/.theos/obj/debug/arm64/Tweak.x.cb862df1.Td b/.theos/obj/debug/arm64/Tweak.x.cb862df1.Td new file mode 100644 index 0000000..62473a5 --- /dev/null +++ b/.theos/obj/debug/arm64/Tweak.x.cb862df1.Td @@ -0,0 +1,17 @@ +/Users/yaypixxo/Documents/git/kage/.theos/obj/debug/arm64/Tweak.x.cb862df1.o: \ + /Users/yaypixxo/Documents/git/kage/.theos/obj/debug/arm64/Tweak.x.m \ + /Users/yaypixxo/theos/Prefix.pch \ + /Users/yaypixxo/theos/vendor/include/_Prefix/BackwardsCompat.h \ + /Users/yaypixxo/theos/vendor/include/_Prefix/IOSMacros.h \ + /Users/yaypixxo/theos/vendor/include/HBLog.h \ + /Users/yaypixxo/theos/vendor/include/substrate.h + +/Users/yaypixxo/theos/Prefix.pch: + +/Users/yaypixxo/theos/vendor/include/_Prefix/BackwardsCompat.h: + +/Users/yaypixxo/theos/vendor/include/_Prefix/IOSMacros.h: + +/Users/yaypixxo/theos/vendor/include/HBLog.h: + +/Users/yaypixxo/theos/vendor/include/substrate.h: diff --git a/.theos/obj/debug/arm64/Tweak.x.cb862df1.o b/.theos/obj/debug/arm64/Tweak.x.cb862df1.o new file mode 100644 index 0000000..f7a1947 Binary files /dev/null and b/.theos/obj/debug/arm64/Tweak.x.cb862df1.o differ diff --git a/.theos/obj/debug/arm64/kageprefs.bundle/kageprefs b/.theos/obj/debug/arm64/kageprefs.bundle/kageprefs new file mode 100755 index 0000000..f709722 Binary files /dev/null and b/.theos/obj/debug/arm64/kageprefs.bundle/kageprefs differ diff --git a/.theos/obj/debug/arm64/kageprefs.bundle/kageprefs.dSYM/Contents/Info.plist b/.theos/obj/debug/arm64/kageprefs.bundle/kageprefs.dSYM/Contents/Info.plist new file mode 100644 index 0000000..0d2a64d --- /dev/null +++ b/.theos/obj/debug/arm64/kageprefs.bundle/kageprefs.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.kageprefs + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/.theos/obj/debug/arm64/kageprefs.bundle/kageprefs.dSYM/Contents/Resources/DWARF/kageprefs b/.theos/obj/debug/arm64/kageprefs.bundle/kageprefs.dSYM/Contents/Resources/DWARF/kageprefs new file mode 100644 index 0000000..8a26682 Binary files /dev/null and b/.theos/obj/debug/arm64/kageprefs.bundle/kageprefs.dSYM/Contents/Resources/DWARF/kageprefs differ diff --git a/.theos/obj/debug/arm64e/Kage.dylib b/.theos/obj/debug/arm64e/Kage.dylib new file mode 100755 index 0000000..0dec6c7 Binary files /dev/null and b/.theos/obj/debug/arm64e/Kage.dylib differ diff --git a/.theos/obj/debug/arm64e/Kage.dylib.dSYM/Contents/Info.plist b/.theos/obj/debug/arm64e/Kage.dylib.dSYM/Contents/Info.plist new file mode 100644 index 0000000..c33278a --- /dev/null +++ b/.theos/obj/debug/arm64e/Kage.dylib.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.Kage.dylib + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/.theos/obj/debug/arm64e/Kage.dylib.dSYM/Contents/Resources/DWARF/Kage.dylib b/.theos/obj/debug/arm64e/Kage.dylib.dSYM/Contents/Resources/DWARF/Kage.dylib new file mode 100644 index 0000000..d6b7ef3 Binary files /dev/null and b/.theos/obj/debug/arm64e/Kage.dylib.dSYM/Contents/Resources/DWARF/Kage.dylib differ diff --git a/.theos/obj/debug/arm64e/KgeRootListController.m.7e6d29a3.Td b/.theos/obj/debug/arm64e/KgeRootListController.m.7e6d29a3.Td new file mode 100644 index 0000000..77411dd --- /dev/null +++ b/.theos/obj/debug/arm64e/KgeRootListController.m.7e6d29a3.Td @@ -0,0 +1,21 @@ +/Users/yaypixxo/Documents/git/kage/.theos/obj/debug/arm64e/KgeRootListController.m.7e6d29a3.o: \ + KgeRootListController.m /Users/yaypixxo/theos/Prefix.pch \ + /Users/yaypixxo/theos/vendor/include/_Prefix/BackwardsCompat.h \ + /Users/yaypixxo/theos/vendor/include/_Prefix/IOSMacros.h \ + /Users/yaypixxo/theos/vendor/include/HBLog.h KgeRootListController.h \ + /Users/yaypixxo/theos/vendor/include/Preferences/PSListController.h \ + /Users/yaypixxo/theos/vendor/include/Preferences/PSViewController.h + +/Users/yaypixxo/theos/Prefix.pch: + +/Users/yaypixxo/theos/vendor/include/_Prefix/BackwardsCompat.h: + +/Users/yaypixxo/theos/vendor/include/_Prefix/IOSMacros.h: + +/Users/yaypixxo/theos/vendor/include/HBLog.h: + +KgeRootListController.h: + +/Users/yaypixxo/theos/vendor/include/Preferences/PSListController.h: + +/Users/yaypixxo/theos/vendor/include/Preferences/PSViewController.h: diff --git a/.theos/obj/debug/arm64e/KgeRootListController.m.7e6d29a3.o b/.theos/obj/debug/arm64e/KgeRootListController.m.7e6d29a3.o new file mode 100644 index 0000000..f1a4654 Binary files /dev/null and b/.theos/obj/debug/arm64e/KgeRootListController.m.7e6d29a3.o differ diff --git a/.theos/obj/debug/arm64e/Tweak.x.fc246e88.Td b/.theos/obj/debug/arm64e/Tweak.x.fc246e88.Td new file mode 100644 index 0000000..c70c23b --- /dev/null +++ b/.theos/obj/debug/arm64e/Tweak.x.fc246e88.Td @@ -0,0 +1,17 @@ +/Users/yaypixxo/Documents/git/kage/.theos/obj/debug/arm64e/Tweak.x.fc246e88.o: \ + /Users/yaypixxo/Documents/git/kage/.theos/obj/debug/arm64e/Tweak.x.m \ + /Users/yaypixxo/theos/Prefix.pch \ + /Users/yaypixxo/theos/vendor/include/_Prefix/BackwardsCompat.h \ + /Users/yaypixxo/theos/vendor/include/_Prefix/IOSMacros.h \ + /Users/yaypixxo/theos/vendor/include/HBLog.h \ + /Users/yaypixxo/theos/vendor/include/substrate.h + +/Users/yaypixxo/theos/Prefix.pch: + +/Users/yaypixxo/theos/vendor/include/_Prefix/BackwardsCompat.h: + +/Users/yaypixxo/theos/vendor/include/_Prefix/IOSMacros.h: + +/Users/yaypixxo/theos/vendor/include/HBLog.h: + +/Users/yaypixxo/theos/vendor/include/substrate.h: diff --git a/.theos/obj/debug/arm64e/Tweak.x.fc246e88.o b/.theos/obj/debug/arm64e/Tweak.x.fc246e88.o new file mode 100644 index 0000000..854e3a5 Binary files /dev/null and b/.theos/obj/debug/arm64e/Tweak.x.fc246e88.o differ diff --git a/.theos/obj/debug/arm64e/kageprefs.bundle/kageprefs b/.theos/obj/debug/arm64e/kageprefs.bundle/kageprefs new file mode 100755 index 0000000..9eceb87 Binary files /dev/null and b/.theos/obj/debug/arm64e/kageprefs.bundle/kageprefs differ diff --git a/.theos/obj/debug/arm64e/kageprefs.bundle/kageprefs.dSYM/Contents/Info.plist b/.theos/obj/debug/arm64e/kageprefs.bundle/kageprefs.dSYM/Contents/Info.plist new file mode 100644 index 0000000..0d2a64d --- /dev/null +++ b/.theos/obj/debug/arm64e/kageprefs.bundle/kageprefs.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.kageprefs + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/.theos/obj/debug/arm64e/kageprefs.bundle/kageprefs.dSYM/Contents/Resources/DWARF/kageprefs b/.theos/obj/debug/arm64e/kageprefs.bundle/kageprefs.dSYM/Contents/Resources/DWARF/kageprefs new file mode 100644 index 0000000..313cffb Binary files /dev/null and b/.theos/obj/debug/arm64e/kageprefs.bundle/kageprefs.dSYM/Contents/Resources/DWARF/kageprefs differ diff --git a/.theos/obj/debug/kageprefs.bundle/Info.plist b/.theos/obj/debug/kageprefs.bundle/Info.plist new file mode 100644 index 0000000..d20fe92 --- /dev/null +++ b/.theos/obj/debug/kageprefs.bundle/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + kageprefs + CFBundleIdentifier + com.yaypixxo.kageprefs + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSPrincipalClass + KgeRootListController + + diff --git a/.theos/obj/debug/kageprefs.bundle/Root.plist b/.theos/obj/debug/kageprefs.bundle/Root.plist new file mode 100644 index 0000000..7b6511c --- /dev/null +++ b/.theos/obj/debug/kageprefs.bundle/Root.plist @@ -0,0 +1,87 @@ + + + + + items + + + cell + PSGroupCell + label + Kage - by YaYPIXXO + + + cell + PSSwitchCell + default + + defaults + com.yaypixxo.kage + key + enabled + label + Enable Tweak + PostNotification + com.yaypixxo.kage/preferences.changed + + + cell + PSSwitchCell + default + + defaults + com.yaypixxo.kage + key + hide3dDivs + label + Hide 3D Touch Dividers + PostNotification + com.yaypixxo.kage/preferences.changed + + + cell + PSSwitchCell + default + + defaults + com.yaypixxo.kage + key + gridSwitcher + label + Enable Grid Switcher + PostNotification + com.yaypixxo.kage/preferences.changed + + + cell + PSSwitchCell + default + + defaults + com.yaypixxo.kage + key + hideLSBatt + label + Hide LS Battery + PostNotification + com.yaypixxo.kage/preferences.changed + + + cell + PSSwitchCell + default + + defaults + com.yaypixxo.kage + key + statusBarShowTimeLS + label + Time in LS Status Bar + PostNotification + com.yaypixxo.kage/preferences.changed + + + title + Kage + + diff --git a/.theos/obj/debug/kageprefs.bundle/kageprefs b/.theos/obj/debug/kageprefs.bundle/kageprefs new file mode 100755 index 0000000..8db2e21 Binary files /dev/null and b/.theos/obj/debug/kageprefs.bundle/kageprefs differ diff --git a/.theos/packages/com.yaypixxo.kage-1.0.0 b/.theos/packages/com.yaypixxo.kage-1.0.0 new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/.theos/packages/com.yaypixxo.kage-1.0.0 @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/Kage.plist b/Kage.plist new file mode 100644 index 0000000..10dc654 --- /dev/null +++ b/Kage.plist @@ -0,0 +1 @@ +{ Filter = { Bundles = ( "com.apple.springboard" ); }; } diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..572cc8d --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +ARCHS = arm64 arm64e +TARGET = iphone:clang:11.2:11.2 + +INSTALL_TARGET_PROCESSES = SpringBoard + +include $(THEOS)/makefiles/common.mk + +TWEAK_NAME = Kage + +Kage_FILES = Tweak.x +Kage_CFLAGS = -fobjc-arc + +include $(THEOS_MAKE_PATH)/tweak.mk +SUBPROJECTS += kageprefs +include $(THEOS_MAKE_PATH)/aggregate.mk diff --git a/README.md b/README.md new file mode 100644 index 0000000..4674c0b --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Kage + +Kage means cake in Danish +I really like cake +anyway, this tweak has a bunch of settings for hiding and showing stuff on the LS and HS. \ No newline at end of file diff --git a/Tweak.x b/Tweak.x new file mode 100644 index 0000000..48dfccb --- /dev/null +++ b/Tweak.x @@ -0,0 +1,144 @@ +// respring function +@interface FBSystemService : NSObject ++(id)sharedInstance; +-(void)exitAndRelaunch:(bool)arg1; +@end + +static void RespringDevice() { + [[%c(FBSystemService) sharedInstance] exitAndRelaunch:YES]; +} + +// prefs +@interface NSUserDefaults (KagePrefs) +-(id)objectForKey:(NSString *)key inDomain:(NSString *)domain; +-(void)setObject:(id)value forKey:(NSString *)key inDomain:(NSString *)domain; +@end + +static NSString *nsDomainString = @"com.yaypixxo.kage"; +static NSString *nsNotificationString = @"com.yaypixxo.kage/preferences.changed"; + +static BOOL enabled; +static BOOL hide3dDivs; +static BOOL gridSwitcher; +static BOOL hideLSBatt; +static BOOL statusBarShowTimeLS; + +static void notificationCallback(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) { + NSNumber *eEnabled = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"enabled" inDomain:nsDomainString]; + NSNumber *eHide3dDivs = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hide3dDivs" inDomain:nsDomainString]; + NSNumber *eGridSwitcher = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"gridSwitcher" inDomain:nsDomainString]; + NSNumber *eHideLSBatt = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"hideLSBatt" inDomain:nsDomainString]; + NSNumber *eStatusBarShowTimeLS = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"statusBarShowTimeLS" inDomain:nsDomainString]; + + enabled = (eEnabled) ? [eEnabled boolValue]:NO; + hide3dDivs = (eHide3dDivs) ? [eHide3dDivs boolValue]:NO; + gridSwitcher = (eGridSwitcher) ? [eGridSwitcher boolValue]:NO; + hideLSBatt = (eHideLSBatt) ? [eHideLSBatt boolValue]:NO; + statusBarShowTimeLS = (eStatusBarShowTimeLS) ? [eStatusBarShowTimeLS boolValue]:NO; +} + +// hooks and stuff +#import + +// 3D TOUCH DIVS START // +%hook SBUIActionKeylineView +- (void)didMoveToSuperview { + if (enabled && hide3dDivs) { + + } + else { + %orig; + } +} +%end + +%hook _UIInterfaceActionBlankSeparatorView +- (void)setConstantAxisDimension:(double)arg1 { + if (enabled && hide3dDivs) { + + } + else { + %orig; + } +} +%end +// 3D TOUCH DIVS END // + +// GRID SWITCHER START // +%hook SBAppSwitcherSettings +- (void)setGridSwitcherPageScale:(double)arg1 { + if (enabled && gridSwitcher) { + arg1 = 0.4; + } + %orig; +} + +- (void)setGridSwitcherHorizontalInterpageSpacingPortrait:(double)arg1 { + if (enabled && gridSwitcher) { + arg1 = 25.5; + } + %orig; +} + +- (void)setGridSwitcherHorizontalInterpageSpacingLandscape:(double)arg1 { + if (enabled && gridSwitcher) { + arg1 = 11.6; + } + %orig; +} + +- (void)setGridSwitcherVerticalNaturalSpacingPortrait:(double)arg1 { + if (enabled && gridSwitcher) { + arg1 = 42; + } + %orig; +} + +- (void)setGridSwitcherVerticalNaturalSpacingLandscape:(double)arg1 { + if (enabled && gridSwitcher) { + arg1 = 38; + } + %orig; +} + +- (void)setSwitcherStyle:(long long)arg1 { + if (enabled && gridSwitcher) { + arg1 = 2; + } + %orig; +} +%end +// GRID SWITCHER END // + +// NO LS BATTERY START // +%hook CSCoverSheetViewController +- (void)_transitionChargingViewToVisible:(bool)arg1 showBattery:(bool)arg2 animated:(bool)arg3 { + if (enabled && hideLSBatt) { + arg1 = 0; + } + %orig; +} +%end +// NO LS BATTERY END // + +// SHOW TIME IN LS STATUSBAR START // +%hook CSCoverSheetViewController +- (bool)shouldShowLockStatusBarTime { + if (enabled && statusBarShowTimeLS) { + return 1; + } + else { + return %orig; + } +} +%end +// SHOW TIME IN LS STATUSBAR END // + +%ctor { + // prefs changed listener + notificationCallback(NULL, NULL, NULL, NULL, NULL); + CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, notificationCallback, (CFStringRef)nsNotificationString, NULL, CFNotificationSuspensionBehaviorCoalesce); + + // respring listener + CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)RespringDevice, CFSTR("com.yaypixxo.kage/respring"), NULL, CFNotificationSuspensionBehaviorDeliverImmediately); +} \ No newline at end of file diff --git a/control b/control new file mode 100644 index 0000000..869013d --- /dev/null +++ b/control @@ -0,0 +1,11 @@ +Package: com.yaypixxo.kage +Name: Kage +Depends: mobilesubstrate, preferenceloader +Version: 1.0.0 +Architecture: iphoneos-arm +Description: show/hide/change ls and hs stuff! +Depiction: https://yaypixxo.com/depictions?p=com.yaypixxo.kage +SileoDepiction: https://yaypixxo.com/sileo/com.yaypixxo.kage +Maintainer: YaYPIXXO +Author: YaYPIXXO +Section: Tweaks diff --git a/kageprefs/KgeRootListController.h b/kageprefs/KgeRootListController.h new file mode 100644 index 0000000..ddb377b --- /dev/null +++ b/kageprefs/KgeRootListController.h @@ -0,0 +1,5 @@ +#import + +@interface KgeRootListController : PSListController + +@end diff --git a/kageprefs/KgeRootListController.m b/kageprefs/KgeRootListController.m new file mode 100644 index 0000000..125380c --- /dev/null +++ b/kageprefs/KgeRootListController.m @@ -0,0 +1,22 @@ +#include "KgeRootListController.h" + +@implementation KgeRootListController + +- (NSArray *)specifiers { + if (!_specifiers) { + _specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self]; + } + + return _specifiers; +} + +-(void)voidView { + [super loadView]; + self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Respring" style:UIBarButtonItemStylePlain target:self action:@selector(saveTapped)]; +} + +-(void)saveTapped { + CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.yaypixxo.kage/respring"), NULL, NULL, YES); +} + +@end diff --git a/kageprefs/Makefile b/kageprefs/Makefile new file mode 100644 index 0000000..2bed7cd --- /dev/null +++ b/kageprefs/Makefile @@ -0,0 +1,18 @@ +ARCHS = arm64 arm64e +TARGET = iphone:clang:11.2:11.2 + +include $(THEOS)/makefiles/common.mk + +BUNDLE_NAME = kageprefs + +kageprefs_FILES = KgeRootListController.m +kageprefs_INSTALL_PATH = /Library/PreferenceBundles +kageprefs_FRAMEWORKS = UIKit +kageprefs_PRIVATE_FRAMEWORKS = Preferences +kageprefs_CFLAGS = -fobjc-arc + +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/kageprefs.plist$(ECHO_END) diff --git a/kageprefs/Resources/Info.plist b/kageprefs/Resources/Info.plist new file mode 100644 index 0000000..d20fe92 --- /dev/null +++ b/kageprefs/Resources/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + kageprefs + CFBundleIdentifier + com.yaypixxo.kageprefs + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSPrincipalClass + KgeRootListController + + diff --git a/kageprefs/Resources/Root.plist b/kageprefs/Resources/Root.plist new file mode 100644 index 0000000..7b6511c --- /dev/null +++ b/kageprefs/Resources/Root.plist @@ -0,0 +1,87 @@ + + + + + items + + + cell + PSGroupCell + label + Kage - by YaYPIXXO + + + cell + PSSwitchCell + default + + defaults + com.yaypixxo.kage + key + enabled + label + Enable Tweak + PostNotification + com.yaypixxo.kage/preferences.changed + + + cell + PSSwitchCell + default + + defaults + com.yaypixxo.kage + key + hide3dDivs + label + Hide 3D Touch Dividers + PostNotification + com.yaypixxo.kage/preferences.changed + + + cell + PSSwitchCell + default + + defaults + com.yaypixxo.kage + key + gridSwitcher + label + Enable Grid Switcher + PostNotification + com.yaypixxo.kage/preferences.changed + + + cell + PSSwitchCell + default + + defaults + com.yaypixxo.kage + key + hideLSBatt + label + Hide LS Battery + PostNotification + com.yaypixxo.kage/preferences.changed + + + cell + PSSwitchCell + default + + defaults + com.yaypixxo.kage + key + statusBarShowTimeLS + label + Time in LS Status Bar + PostNotification + com.yaypixxo.kage/preferences.changed + + + title + Kage + + diff --git a/kageprefs/entry.plist b/kageprefs/entry.plist new file mode 100644 index 0000000..8699bf8 --- /dev/null +++ b/kageprefs/entry.plist @@ -0,0 +1,21 @@ + + + + + entry + + bundle + kageprefs + cell + PSLinkCell + detail + KgeRootListController + icon + icon.png + isController + + label + Kage + + + diff --git a/packages/com.yaypixxo.kage_1.0.0-1+debug_iphoneos-arm.deb b/packages/com.yaypixxo.kage_1.0.0-1+debug_iphoneos-arm.deb new file mode 100644 index 0000000..4a605f4 Binary files /dev/null and b/packages/com.yaypixxo.kage_1.0.0-1+debug_iphoneos-arm.deb differ