├── .github └── workflows │ └── build.yml ├── .gitignore ├── Apps ├── ByeByeAdvisoryLabel │ ├── ByeByeAdvisoryLabel.plist │ ├── Makefile │ ├── Tweak.m │ └── control ├── Elixir │ ├── Common │ │ └── Common.h │ ├── Elixir.m │ ├── Elixir.plist │ ├── Factory │ │ ├── ElixirLabelFactory.h │ │ └── ElixirLabelFactory.m │ ├── Makefile │ ├── View │ │ ├── ElixirLabel.h │ │ └── ElixirLabel.m │ └── control ├── FixStar+ │ ├── FixStar+.plist │ ├── Makefile │ ├── Tweak.m │ └── control ├── FuckSignalExpiry │ ├── FuckSignalExpiry.plist │ ├── Makefile │ ├── Tweak.m │ └── control ├── IGConfirm │ ├── IGConfirm.m │ ├── IGConfirm.plist │ ├── Makefile │ └── control ├── Kaia │ ├── Headers │ │ └── Common.h │ ├── KaiaToggle │ │ ├── KaiaToggle.h │ │ ├── KaiaToggle.m │ │ ├── Makefile │ │ ├── Resources │ │ │ └── Info.plist │ │ └── control │ ├── Makefile │ ├── Tweak │ │ ├── Kaia.plist │ │ ├── Makefile │ │ └── Tweak.m │ └── control ├── Zaire │ ├── Makefile │ ├── Zaire.mm │ ├── Zaire.plist │ └── control └── ZohoPopToRoot │ ├── Makefile │ ├── Tweak.m │ ├── ZohoPopToRoot.plist │ └── control ├── LICENSE ├── README.md └── SpringBoard ├── Arizona ├── Arizona.m ├── Arizona.plist ├── ArizonaPrefs │ ├── ArizonaVC.h │ ├── ArizonaVC.m │ ├── Makefile │ ├── Resources │ │ ├── AriContributors.plist │ │ ├── AriLinks.plist │ │ ├── Assets │ │ │ ├── April@2x.png │ │ │ ├── Arizona.png │ │ │ ├── Arizona@2x.png │ │ │ ├── Arizona@3x.png │ │ │ ├── ArizonaBanner.png │ │ │ ├── ArizonaHotIcon.png │ │ │ └── Meredith@2x.png │ │ ├── Info.plist │ │ └── Root.plist │ └── layout │ │ └── Library │ │ └── PreferenceLoader │ │ └── Preferences │ │ └── ArizonaPrefs.plist ├── Common │ └── Common.h ├── Makefile └── control ├── Arres ├── Arres.plist ├── ArresPrefs │ ├── ArresVC.h │ ├── ArresVC.m │ ├── Makefile │ ├── Resources │ │ ├── Info.plist │ │ └── Root.plist │ └── layout │ │ └── Library │ │ └── PreferenceLoader │ │ └── Preferences │ │ └── ArresPrefs.plist ├── Common │ └── Common.h ├── Makefile ├── Tweak.m └── control ├── AutoRespring ├── AutoRespring.plist ├── Headers │ └── Common.h ├── Makefile ├── Prefs │ ├── AutoRespringVC.h │ ├── AutoRespringVC.m │ ├── Makefile │ ├── Resources │ │ ├── Info.plist │ │ └── Root.plist │ └── layout │ │ └── Library │ │ └── PreferenceLoader │ │ └── Preferences │ │ └── AutoRespringPrefs.plist ├── Tweak.m └── control ├── Canna ├── Canna.plist ├── Makefile ├── Tweak.m ├── control └── layout │ └── Library │ └── Tweak Support │ └── Canna │ ├── connect_power.caf │ └── lock.caf ├── DNDTimer ├── DNDTimer.m ├── DNDTimer.plist ├── Makefile ├── Utilities │ ├── RootWindow.h │ ├── RootWindow.m │ └── Utilities.h └── control ├── FuckThatAnimation ├── FuckThatAnimation.plist ├── Makefile ├── Tweak.m └── control ├── Hello ├── Hello.plist ├── Makefile ├── Tweak.m ├── control └── layout │ └── Library │ └── Tweak Support │ └── Hello │ └── IntroScript-Bold.ttf ├── Hislerim ├── Hislerim.plist ├── Makefile ├── Tweak.m └── control ├── IWantTranslucent ├── IWantTranslucent.plist ├── Makefile ├── Tweak.m └── control ├── Isla ├── Isla.plist ├── Makefile ├── Tweak.m ├── View │ ├── IslaView.h │ └── IslaView.m └── control ├── LegacyRings ├── LegacyRings.plist ├── Makefile ├── Tweak.m └── control ├── NetflixToggle ├── Common │ └── Constants.h ├── Makefile ├── NetflixToggle │ ├── Makefile │ ├── NetflixToggle.h │ ├── NetflixToggle.m │ ├── Resources │ │ ├── Info.plist │ │ ├── LICENSE │ │ └── NetflixToggle@2x.png │ └── control ├── PrysmHook │ ├── Makefile │ ├── PrysmHook.m │ └── PrysmHook.plist └── control ├── ReachSpring ├── Makefile ├── ReachSpring.plist ├── Tweak.m └── control ├── Ren ├── Headers │ ├── Common.h │ ├── Prefs.h │ └── Ren.h ├── Makefile ├── Ren.m ├── Ren.plist ├── RenPrefs │ ├── Makefile │ ├── RenRootVC.h │ ├── RenRootVC.m │ ├── Resources │ │ ├── Info.plist │ │ └── Root.plist │ └── layout │ │ └── Library │ │ └── PreferenceLoader │ │ └── Preferences │ │ └── RenPrefs.plist └── control ├── Selene ├── Common │ └── Common.h ├── Makefile ├── Selene.m ├── Selene.plist ├── SelenePrefs │ ├── Makefile │ ├── Resources │ │ ├── Assets │ │ │ ├── Marie@2x.png │ │ │ └── Meredith@2x.png │ │ ├── Info.plist │ │ ├── Root.plist │ │ └── SeleneLinks.plist │ ├── SeleneVC.h │ ├── SeleneVC.m │ └── layout │ │ └── Library │ │ └── PreferenceLoader │ │ └── Preferences │ │ └── SelenePrefs.plist └── control ├── ShakeSpring ├── Makefile ├── ShakeSpring.plist ├── Tweak.m └── control ├── StealthCC ├── Common │ └── Common.h ├── Makefile ├── StealthCC.plist ├── StealthCCPrefs │ ├── Makefile │ ├── Resources │ │ ├── Info.plist │ │ ├── Root.plist │ │ ├── StealthCC.png │ │ ├── StealthCC@2x.png │ │ └── StealthCC@3x.png │ ├── STLRootVC.h │ ├── STLRootVC.m │ └── layout │ │ └── Library │ │ └── PreferenceLoader │ │ └── Preferences │ │ └── StealthCCPrefs.plist ├── Tweak.m └── control ├── Wisteria ├── Makefile ├── Tweak.mm ├── Wisteria.plist └── control └── Zira ├── Common └── Common.h ├── Makefile ├── Resources ├── Info.plist └── ZiraPrefs.plist ├── ZiraModule ├── ZiraContentModuleVC.h ├── ZiraContentModuleVC.m ├── ZiraModule.h └── ZiraModule.m ├── ZiraPrefs ├── ZiraVC.h └── ZiraVC.m └── control /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Makefile CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths: 8 | - Apps/** 9 | - SpringBoard/** 10 | 11 | jobs: 12 | build: 13 | runs-on: macos-14 14 | steps: 15 | - uses: actions/checkout@main 16 | 17 | - name: Fetch Theos' latest commit 18 | env: 19 | GH_TOKEN: ${{ github.token }} 20 | run: | 21 | latest_commit=$(gh api -H 'Accept: application/vnd.github.sha' \ 22 | /repos/theos/theos/commits/master); echo "latest_commit=$latest_commit" >> $GITHUB_OUTPUT 23 | id: commit 24 | 25 | - uses: actions/cache@v4 26 | id: cache-theos 27 | with: 28 | path: ${{ github.workspace }}/theos 29 | key: steps.commit.outputs.latest_commit 30 | 31 | - name: Checkout theos/theos 32 | if: steps.cache-theos.outputs.cache-hit != 'true' 33 | uses: actions/checkout@main 34 | with: 35 | repository: theos/theos 36 | ref: master 37 | submodules: recursive 38 | path: theos 39 | 40 | - name: Checkout theos/sdks 41 | if: steps.cache-theos.outputs.cache-hit != 'true' 42 | uses: actions/checkout@main 43 | with: 44 | repository: theos/sdks 45 | ref: master 46 | sparse-checkout: iPhoneOS16.5.sdk 47 | path: theos/sdks 48 | 49 | - name: Checkout LibGcUniversalDocumentation/master 50 | uses: actions/checkout@main 51 | with: 52 | repository: MrGcGamer/LibGcUniversalDocumentation 53 | path: LibGcUniversalDocumentation 54 | 55 | - name: Checkout libKitten/main 56 | uses: actions/checkout@main 57 | with: 58 | repository: Luki120/libKitten 59 | path: libKitten 60 | 61 | - name: Setup libs & build package 62 | run: | 63 | cd LibGcUniversalDocumentation 64 | THEOS=../theos ./install.sh 65 | cd .. 66 | cd libKitten 67 | THEOS=../theos ./install.sh 68 | cd .. 69 | brew install make ldid 70 | export THEOS="$(pwd)/theos" 71 | for PROJECT in Apps/Elixir/ Apps/Kaia/ Apps/Zaire/ SpringBoard/* ; do 72 | gmake -C "${PROJECT}" clean package TARGET="iphone:clang:16.5:14.0" FINALPACKAGE=1 THEOS_PACKAGE_DIR_NAME="../../packages" THEOS_PACKAGE_SCHEME=rootless 73 | done 74 | 75 | - name: Upload a Build Artifact 76 | uses: actions/upload-artifact@v4 77 | with: 78 | path: "**/packages/*.deb" 79 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .cache/ 2 | .theos/ 3 | packages/ 4 | compile_commands.json 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /Apps/ByeByeAdvisoryLabel/ByeByeAdvisoryLabel.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.netflix.Netflix" ); }; } 2 | -------------------------------------------------------------------------------- /Apps/ByeByeAdvisoryLabel/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:latest 2 | INSTALL_TARGET_PROCESSES = Argo 3 | 4 | TWEAK_NAME = ByeByeAdvisoryLabel 5 | 6 | ByeByeAdvisoryLabel_FILES = Tweak.m 7 | ByeByeAdvisoryLabel_CFLAGS = -fobjc-arc 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/tweak.mk 11 | -------------------------------------------------------------------------------- /Apps/ByeByeAdvisoryLabel/Tweak.m: -------------------------------------------------------------------------------- 1 | /* --- Removes the annoying parental advisory 2 | label in Netflix which pops everytime you watch 3 | your tv show or movie, annoying af ---*/ 4 | 5 | @import Foundation; 6 | @import CydiaSubstrate; 7 | 8 | 9 | @class NFUIPlaybackAdvisoryController; 10 | 11 | static void fuckOffTimer(NFUIPlaybackAdvisoryController *self, SEL _cmd) {} 12 | 13 | __attribute__((constructor)) static void init() { 14 | 15 | MSHookMessageEx(NSClassFromString(@"NFUIPlaybackAdvisoryController"), @selector(setupTimer), (IMP) &fuckOffTimer, (IMP *) NULL); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Apps/ByeByeAdvisoryLabel/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.byebyeadvisorylabel 2 | Name: ByeByeAdvisoryLabel 3 | Author: Luki 4 | Description: Removes the annoying parental advisory pop-up in Netflix. 5 | Depends: mobilesubstrate 6 | Maintainer: Luki 7 | Architecture: iphoneos-arm 8 | Section: Tweaks 9 | Version: 0.9.0 10 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.byebyeadvisorylabel 11 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.byebyeadvisorylabel/depiction.json 12 | -------------------------------------------------------------------------------- /Apps/Elixir/Common/Common.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #define jbRootPathC(cPath) ROOT_PATH(cPath) 4 | #define jbRootPath(path) ROOT_PATH_NS(path) 5 | -------------------------------------------------------------------------------- /Apps/Elixir/Elixir.m: -------------------------------------------------------------------------------- 1 | /*--- Tweak count right on your settings app ---*/ 2 | 3 | @import CydiaSubstrate; 4 | @import Preferences.PSSpecifier; 5 | @import Preferences.PSListController; 6 | #import 7 | #import "Common/Common.h" 8 | #import "Factory/ElixirLabelFactory.h" 9 | 10 | 11 | #define kClass(class) NSClassFromString(class) 12 | #define kIsCurrentApp(string) [[[NSBundle mainBundle] bundleIdentifier] isEqualToString: string] 13 | #define kOneSettings dlopen(jbRootPathC("/Library/MobileSubstrate/DynamicLibraries/OneSettings.dylib"), RTLD_LAZY) 14 | #define kOrion dlopen(jbRootPathC("/Library/MobileSubstrate/DynamicLibraries/OrionSettings.dylib"), RTLD_LAZY) 15 | #define kShuffle dlopen(jbRootPathC("/Library/MobileSubstrate/DynamicLibraries/shuffle.dylib"), RTLD_LAZY) 16 | 17 | 18 | @interface PSUIPrefsListController : PSListController 19 | @end 20 | 21 | 22 | @interface OrionTweakSpecifiersController : PSListController 23 | @end 24 | 25 | 26 | @interface TSRootListController : UIViewController 27 | @property (copy, nonatomic) NSString *title; 28 | @end 29 | 30 | // Orion 31 | 32 | static void (*origOrionVDL)(OrionTweakSpecifiersController *, SEL); 33 | static void overrideOrionVDL(OrionTweakSpecifiersController *self, SEL _cmd) { 34 | 35 | origOrionVDL(self, _cmd); 36 | 37 | [self.table addSubview: [ElixirLabelFactory makeElixirLabel]]; 38 | [ElixirLabelFactory pinElixirLabelToTheTopCenteredOnTheXAxisOfView: self.table]; 39 | 40 | } 41 | 42 | // OneSettings & Shuffle 43 | 44 | static void (*origVDL)(PSListController *, SEL); 45 | static void overrideVDL(PSListController *self, SEL _cmd) { 46 | 47 | origVDL(self, _cmd); 48 | 49 | // OneSettings & Shuffle have a search bar so no space at the top :smh: 50 | UIView *footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 40)]; 51 | [footerView addSubview: [ElixirLabelFactory makeElixirLabel]]; 52 | [ElixirLabelFactory centerElixirLabelOnBothAxesOfView: footerView]; 53 | 54 | self.table.tableFooterView = footerView; 55 | 56 | } 57 | 58 | // TweakSettings 59 | 60 | static void (*origTSVDL)(TSRootListController *, SEL); 61 | static void overrideTSVDL(TSRootListController *self, SEL _cmd) { 62 | 63 | origTSVDL(self, _cmd); 64 | 65 | [ElixirLabelFactory makeElixirLabel]; 66 | self.title = [ElixirLabelFactory tweakCountString]; 67 | 68 | } 69 | 70 | // Stock 71 | 72 | static void (*origPSUIPrefsListControllerVDL)(PSUIPrefsListController *, SEL); 73 | static void overridePSUIPrefsListControllerVDL(PSUIPrefsListController *self, SEL _cmd) { 74 | 75 | origPSUIPrefsListControllerVDL(self, _cmd); 76 | 77 | PSSpecifier *emptySpecifier = [PSSpecifier emptyGroupSpecifier]; 78 | 79 | [ElixirLabelFactory makeElixirLabel]; 80 | 81 | NSString *elixirTweakCountLabel = [ElixirLabelFactory tweakCountString]; 82 | PSSpecifier *elixirSpecifier = [PSSpecifier preferenceSpecifierNamed:elixirTweakCountLabel target:self set:nil get:nil detail:nil cell:PSStaticTextCell edit:nil]; 83 | [elixirSpecifier setProperty:@YES forKey:@"enabled"]; 84 | [self insertContiguousSpecifiers:@[emptySpecifier, elixirSpecifier] afterSpecifier:[self specifierForID:@"APPLE_ACCOUNT"]]; 85 | 86 | } 87 | 88 | __attribute__((constructor)) static void init(void) { 89 | 90 | if(kOneSettings != nil) 91 | MSHookMessageEx(kClass(@"OSTweaksListController"), @selector(viewDidLoad), (IMP) &overrideVDL, (IMP *) &origVDL); 92 | 93 | else if(kOrion != nil) 94 | MSHookMessageEx(kClass(@"OrionTweakSpecifiersController"), @selector(viewDidLoad), (IMP) &overrideOrionVDL, (IMP *) &origOrionVDL); 95 | 96 | else if(kShuffle != nil) 97 | MSHookMessageEx(kClass(@"TweakPreferencesListController"), @selector(viewDidLoad), (IMP) &overrideVDL, (IMP *) &origVDL); 98 | 99 | else MSHookMessageEx(kClass(@"PSUIPrefsListController"), @selector(viewDidLoad), (IMP) &overridePSUIPrefsListControllerVDL, (IMP *) &origPSUIPrefsListControllerVDL); 100 | 101 | if(!kIsCurrentApp(@"com.creaturecoding.tweaksettings")) return; 102 | MSHookMessageEx(kClass(@"TSRootListController"), @selector(viewDidLoad), (IMP) &overrideTSVDL, (IMP *) &origTSVDL); 103 | 104 | } 105 | -------------------------------------------------------------------------------- /Apps/Elixir/Elixir.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.Preferences", "com.creaturecoding.tweaksettings" ); }; } 2 | -------------------------------------------------------------------------------- /Apps/Elixir/Factory/ElixirLabelFactory.h: -------------------------------------------------------------------------------- 1 | #import "View/ElixirLabel.h" 2 | 3 | 4 | @interface ElixirLabelFactory : NSObject 5 | + (ElixirLabel *)makeElixirLabel; 6 | + (NSString *)tweakCountString; 7 | + (void)centerElixirLabelOnBothAxesOfView:(UIView *)view; 8 | + (void)pinElixirLabelToTheTopCenteredOnTheXAxisOfView:(UIView *)view; 9 | @end 10 | -------------------------------------------------------------------------------- /Apps/Elixir/Factory/ElixirLabelFactory.m: -------------------------------------------------------------------------------- 1 | #import "ElixirLabelFactory.h" 2 | 3 | 4 | @implementation ElixirLabelFactory 5 | 6 | static ElixirLabel *elixirLabel; 7 | 8 | + (ElixirLabel *)makeElixirLabel { 9 | 10 | if(!elixirLabel) elixirLabel = [ElixirLabel new]; 11 | return elixirLabel; 12 | 13 | } 14 | 15 | 16 | + (NSString *)tweakCountString { return elixirLabel.tweakCountString; } 17 | + (void)centerElixirLabelOnBothAxesOfView:(UIView *)view { 18 | 19 | // Hi, if you've reached here, please do yourself a favor if this is your case. 20 | // Stop doing cursed, weird af UIScreen calculations with frames for UI layout stuff, 21 | // learn and embrace constraints instead, they are natural and beautiful, 22 | // also known as AutoLayout, AUTO (it does the thing for you!!!) 23 | [elixirLabel.centerXAnchor constraintEqualToAnchor: view.centerXAnchor].active = YES; 24 | [elixirLabel.centerYAnchor constraintEqualToAnchor: view.centerYAnchor].active = YES; 25 | 26 | } 27 | 28 | 29 | + (void)pinElixirLabelToTheTopCenteredOnTheXAxisOfView:(UIView *)view { 30 | 31 | [elixirLabel.topAnchor constraintEqualToAnchor: view.topAnchor constant: 8].active = YES; 32 | [elixirLabel.centerXAnchor constraintEqualToAnchor: view.centerXAnchor].active = YES; 33 | 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Apps/Elixir/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:latest 2 | INSTALL_TARGET_PROCESSES = Preferences 3 | 4 | TWEAK_NAME = Elixir 5 | 6 | Elixir_FILES = $(wildcard **/*.m) $(wildcard *.m) 7 | Elixir_CFLAGS = -fobjc-arc 8 | Elixir_PRIVATE_FRAMEWORKS = Preferences 9 | 10 | include $(THEOS)/makefiles/common.mk 11 | include $(THEOS_MAKE_PATH)/tweak.mk 12 | -------------------------------------------------------------------------------- /Apps/Elixir/View/ElixirLabel.h: -------------------------------------------------------------------------------- 1 | @import UIKit; 2 | #import "Common/Common.h" 3 | 4 | 5 | @interface ElixirLabel : UILabel 6 | @property (assign, nonatomic) NSInteger elixirTweakCount; 7 | @property (copy, nonatomic) NSString *tweakCountString; 8 | @end 9 | -------------------------------------------------------------------------------- /Apps/Elixir/View/ElixirLabel.m: -------------------------------------------------------------------------------- 1 | #import "ElixirLabel.h" 2 | 3 | 4 | @implementation ElixirLabel 5 | 6 | - (id)init { 7 | 8 | self = [super init]; 9 | if(!self) return nil; 10 | 11 | [self setupTweakCount]; 12 | [self setupElixirLabel]; 13 | 14 | return self; 15 | 16 | } 17 | 18 | 19 | - (void)setupTweakCount { 20 | 21 | NSString *bundlePath = jbRootPath(@"/Library/PreferenceLoader/Preferences/"); 22 | NSArray *directoryContent = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:bundlePath error:nil]; 23 | self.elixirTweakCount = [directoryContent count]; 24 | 25 | NSString *tweaksString = directoryContent.count > 1 ? @"Tweaks" : @"Tweak"; 26 | self.tweakCountString = [NSString stringWithFormat:@"%ld %@", self.elixirTweakCount, tweaksString]; 27 | 28 | } 29 | 30 | 31 | - (void)setupElixirLabel { 32 | 33 | self.font = [UIFont boldSystemFontOfSize: 18]; 34 | self.text = self.tweakCountString; 35 | self.textColor = UIColor.labelColor; 36 | self.translatesAutoresizingMaskIntoConstraints = NO; 37 | 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Apps/Elixir/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.elixir 2 | Name: Elixir 3 | Version: 0.9.8 4 | Architecture: iphoneos-arm 5 | Description: Tweak count at a glimpse 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | Icon: https://raw.githubusercontent.com/Luki120/luki120.github.io/master/assets/Tweaks/Apps/Elixir/ElixirIcon.png 11 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.elixir 12 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.elixir/depiction.json 13 | -------------------------------------------------------------------------------- /Apps/FixStar+/FixStar+.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.disney.starplus" ); }; } 2 | -------------------------------------------------------------------------------- /Apps/FixStar+/Makefile: -------------------------------------------------------------------------------- 1 | ARCHS = arm64 2 | TARGET := iphone:clang:latest:latest 3 | INSTALL_TARGET_PROCESSES = StarPlus 4 | 5 | TWEAK_NAME = FixStar+ 6 | 7 | FixStar+_FILES = Tweak.m 8 | FixStar+_CFLAGS = -fobjc-arc 9 | 10 | include $(THEOS)/makefiles/common.mk 11 | include $(THEOS_MAKE_PATH)/tweak.mk 12 | -------------------------------------------------------------------------------- /Apps/FixStar+/Tweak.m: -------------------------------------------------------------------------------- 1 | /*--- fix Star+ requiring you to update to 15.3 in order to use the app ---*/ 2 | 3 | @import Foundation; 4 | @import CydiaSubstrate; 5 | 6 | static NSDictionary *(*origInfoDict)(NSBundle *, SEL); 7 | static NSDictionary *overrideInfoDict(NSBundle *self, SEL _cmd) { 8 | 9 | NSMutableDictionary *mutablePlist = [origInfoDict(self, _cmd) mutableCopy] ?: [NSMutableDictionary dictionary]; 10 | [mutablePlist setObject:@"2.13" forKey: @"CFBundleShortVersionString"]; 11 | return mutablePlist; 12 | 13 | } 14 | 15 | __attribute__((constructor)) static void init(void) { 16 | 17 | MSHookMessageEx([NSBundle class], @selector(infoDictionary), (IMP) &overrideInfoDict, (IMP *) &origInfoDict); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /Apps/FixStar+/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.fixstarplus 2 | Name: Fix Star+ 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: An awesome MobileSubstrate tweak! 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | -------------------------------------------------------------------------------- /Apps/FuckSignalExpiry/FuckSignalExpiry.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "org.whispersystems.signal" ); }; } 2 | -------------------------------------------------------------------------------- /Apps/FuckSignalExpiry/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:14.0 2 | INSTALL_TARGET_PROCESSES = Signal 3 | 4 | TWEAK_NAME = FuckSignalExpiry 5 | 6 | FuckSignalExpiry_FILES = Tweak.m 7 | FuckSignalExpiry_CFLAGS = -fobjc-arc 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/tweak.mk 11 | -------------------------------------------------------------------------------- /Apps/FuckSignalExpiry/Tweak.m: -------------------------------------------------------------------------------- 1 | /*--- Make Signal believe that we're on an iOS version above their minimum 2 | requirement, in order to prevent the app from eventually "expiring". Made as a bounty ---*/ 3 | 4 | @import CydiaSubstrate; 5 | @import Foundation; 6 | 7 | 8 | @class AppExpiryImpl; 9 | 10 | static NSUInteger overrideAppExpiredStatusCode(AppExpiryImpl *self, SEL _cmd) { 11 | 12 | return 0; 13 | 14 | } 15 | 16 | static NSOperatingSystemVersion (*origSystemVersion)(NSProcessInfo *, SEL); 17 | static NSOperatingSystemVersion overrideSystemVersion(NSProcessInfo *self, SEL _cmd) { 18 | 19 | NSOperatingSystemVersion version = origSystemVersion(self, _cmd); 20 | version.majorVersion = 10000; 21 | return version; 22 | 23 | } 24 | 25 | __attribute__((constructor)) static void init(void) { 26 | 27 | Class AppExpiryImpl = objc_getMetaClass("SignalServiceKit.AppExpiryImpl"); 28 | 29 | MSHookMessageEx(AppExpiryImpl, @selector(appExpiredStatusCode), (IMP) &overrideAppExpiredStatusCode, NULL); 30 | MSHookMessageEx([NSProcessInfo class], @selector(operatingSystemVersion), (IMP) &overrideSystemVersion, (IMP *) &origSystemVersion); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /Apps/FuckSignalExpiry/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.fucksignalexpiry 2 | Name: FuckSignalExpiry 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: Definitely an awesome MobileSubstrate tweak 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | -------------------------------------------------------------------------------- /Apps/IGConfirm/IGConfirm.m: -------------------------------------------------------------------------------- 1 | /*--- Get an alert confirmation before liking an Instagram post or following a user ---*/ 2 | 3 | @import UIKit; 4 | @import CydiaSubstrate; 5 | 6 | 7 | @interface IGUFIButtonBarView : UIView 8 | @end 9 | 10 | 11 | @interface IGFeedPhotoView : UIView 12 | @end 13 | 14 | 15 | @interface IGFollowButton : UIButton 16 | @end 17 | 18 | 19 | @interface IGFollowController : UIViewController 20 | @end 21 | 22 | 23 | @interface IGMedia : NSObject 24 | @end 25 | 26 | 27 | #define kClass(string) NSClassFromString(string) 28 | 29 | static BOOL hasLiked; 30 | static NSInteger followState; 31 | 32 | static UIViewController *getRootVC() { 33 | 34 | UIViewController *rootVC = nil; 35 | NSSet *connectedScenes = [UIApplication sharedApplication].connectedScenes; 36 | 37 | for(UIScene *scene in connectedScenes) { 38 | if(scene.activationState != UISceneActivationStateForegroundActive 39 | || ![scene isKindOfClass:[UIWindowScene class]]) return nil; 40 | 41 | UIWindowScene *windowScene = (UIWindowScene *)scene; 42 | for(UIWindow *window in windowScene.windows) { 43 | rootVC = window.rootViewController; 44 | break; 45 | } 46 | 47 | } 48 | 49 | return rootVC; 50 | 51 | } 52 | 53 | static void presentIGConfirmAlertController(NSString *message, void(^handler)(UIAlertAction *confirmAction)) { 54 | 55 | UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"IGConfirm" message:message preferredStyle:UIAlertControllerStyleActionSheet]; 56 | 57 | UIAlertAction *confirmAction = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler: handler]; 58 | UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Oops" style:UIAlertActionStyleCancel handler:nil]; 59 | 60 | [alertController addAction: confirmAction]; 61 | [alertController addAction: cancelAction]; 62 | 63 | [getRootVC() presentViewController:alertController animated:YES completion:nil]; 64 | 65 | } 66 | 67 | static BOOL (*origHasLiked)(IGMedia *, SEL); 68 | static BOOL overrideHasLiked(IGMedia *self, SEL _cmd) { 69 | 70 | hasLiked = origHasLiked(self, _cmd); 71 | return hasLiked; 72 | 73 | } 74 | 75 | static NSInteger (*origButtonState)(IGFollowButton *, SEL); 76 | static NSInteger overrideButtonState(IGFollowButton *self, SEL _cmd) { 77 | 78 | followState = origButtonState(self, _cmd); 79 | return followState; 80 | 81 | } 82 | 83 | static void (*origDidPressFollowButton)(IGFollowController *, SEL); 84 | static void overrideDidPressFollowButton(IGFollowController *self, SEL _cmd) { 85 | 86 | /*--- 87 | 88 | 2 == not following, 89 | 3 == following and not in your close friends, 90 | 4 == requested, 91 | 6 == not following back lol, 92 | 8 == following and in your close friends 93 | 94 | ---*/ 95 | 96 | if(followState == 2 || followState == 6) 97 | 98 | presentIGConfirmAlertController(@"Are you sure you want to follow this user?", ^(UIAlertAction *_) { 99 | origDidPressFollowButton(self, _cmd); 100 | }); 101 | 102 | else origDidPressFollowButton(self, _cmd); 103 | 104 | 105 | } 106 | 107 | static void (*origOnLikeButtonPressed)(IGUFIButtonBarView *, SEL, id); 108 | static void overrideOnLikeButtonPressed(IGUFIButtonBarView *self, SEL _cmd, id pressed) { 109 | 110 | if(hasLiked) return origOnLikeButtonPressed(self, _cmd, pressed); 111 | 112 | presentIGConfirmAlertController(@"Are you sure you want to like this post?", ^(UIAlertAction *_) { 113 | origOnLikeButtonPressed(self, _cmd, pressed); 114 | }); 115 | 116 | } 117 | 118 | static void (*origOnDoubleTap)(IGFeedPhotoView *, SEL, id); 119 | static void overrideOnDoubleTap(IGFeedPhotoView *self, SEL _cmd, id tapped) { 120 | 121 | if(hasLiked) return origOnDoubleTap(self, _cmd, tapped); 122 | 123 | presentIGConfirmAlertController(@"Are you sure you want to like this post?", ^(UIAlertAction *_) { 124 | origOnDoubleTap(self, _cmd, tapped); 125 | }); 126 | 127 | } 128 | 129 | __attribute__((constructor)) static void init() { 130 | 131 | MSHookMessageEx(kClass(@"IGMedia"), @selector(hasLiked), (IMP) &overrideHasLiked, (IMP *) &origHasLiked); 132 | MSHookMessageEx(kClass(@"IGFollowButton"), @selector(buttonState), (IMP) &overrideButtonState, (IMP *) &origButtonState); 133 | MSHookMessageEx(kClass(@"IGFollowController"), @selector(_didPressFollowButton), (IMP) &overrideDidPressFollowButton, (IMP *) &origDidPressFollowButton); 134 | MSHookMessageEx(kClass(@"IGUFIButtonBarView"), @selector(_onLikeButtonPressed:), (IMP) &overrideOnLikeButtonPressed, (IMP *) &origOnLikeButtonPressed); 135 | MSHookMessageEx(kClass(@"IGFeedPhotoView"), @selector(_onDoubleTap:), (IMP) &overrideOnDoubleTap, (IMP *) &origOnDoubleTap); 136 | 137 | } 138 | -------------------------------------------------------------------------------- /Apps/IGConfirm/IGConfirm.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.burbn.instagram" ); }; } 2 | -------------------------------------------------------------------------------- /Apps/IGConfirm/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:latest 2 | INSTALL_TARGET_PROCESSES = Instagram 3 | 4 | TWEAK_NAME = IGConfirm 5 | 6 | IGConfirm_FILES = IGConfirm.m 7 | IGConfirm_CFLAGS = -fobjc-arc 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/tweak.mk 11 | -------------------------------------------------------------------------------- /Apps/IGConfirm/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.igconfirm 2 | Name: IGConfirm 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: Prevent accidental likes or follows on Instagram 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.igconfirm 11 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.igconfirm/depiction.json 12 | -------------------------------------------------------------------------------- /Apps/Kaia/Headers/Common.h: -------------------------------------------------------------------------------- 1 | static NSNotificationName const KaiaDidSelectToggleNotification = @"KaiaDidSelectToggleNotification"; 2 | static NSNotificationName const KaiaDidRetrieveToggleStateNotification = @"KaiaDidRetrieveToggleStateNotification"; 3 | 4 | @interface NSDistributedNotificationCenter : NSNotificationCenter 5 | @end 6 | -------------------------------------------------------------------------------- /Apps/Kaia/KaiaToggle/KaiaToggle.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Headers/Common.h" 3 | 4 | 5 | @interface KaiaToggle : CCUIToggleModule 6 | @end 7 | -------------------------------------------------------------------------------- /Apps/Kaia/KaiaToggle/KaiaToggle.m: -------------------------------------------------------------------------------- 1 | #import "KaiaToggle.h" 2 | 3 | 4 | @implementation KaiaToggle { 5 | 6 | NSUserDefaults *defaults; 7 | 8 | } 9 | 10 | 11 | - (id)init { 12 | 13 | self = [super init]; 14 | if(!self) return nil; 15 | 16 | defaults = [NSUserDefaults standardUserDefaults]; 17 | 18 | [NSDistributedNotificationCenter.defaultCenter addObserver:self selector:@selector(setToggleState) name:KaiaDidRetrieveToggleStateNotification object:nil]; 19 | 20 | return self; 21 | 22 | } 23 | 24 | 25 | - (BOOL)isSelected { return [defaults boolForKey: @"kaiaToggleSelected"]; } 26 | - (void)setSelected:(BOOL)selected { 27 | 28 | [defaults setBool:selected forKey: @"kaiaToggleSelected"]; 29 | 30 | [self setToggleState]; 31 | [super setSelected: selected]; 32 | 33 | } 34 | 35 | 36 | - (void)setToggleState { 37 | 38 | NSDictionary *userInfo = @{ @"kaiaToggleSelected": [NSNumber numberWithBool: [defaults boolForKey: @"kaiaToggleSelected"]] }; 39 | [NSDistributedNotificationCenter.defaultCenter postNotificationName:KaiaDidSelectToggleNotification object:nil userInfo:userInfo]; 40 | 41 | } 42 | 43 | 44 | - (UIImage *)iconGlyph { return [UIImage systemImageNamed: @"eye"]; } 45 | - (UIImage *)selectedIconGlyph { return [UIImage systemImageNamed: @"eye.slash"]; } 46 | - (UIColor *)selectedColor { return UIColor.systemPurpleColor; } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Apps/Kaia/KaiaToggle/Makefile: -------------------------------------------------------------------------------- 1 | BUNDLE_NAME = KaiaToggle 2 | 3 | KaiaToggle_FILES = KaiaToggle.m 4 | KaiaToggle_CFLAGS = -fobjc-arc 5 | KaiaToggle_FRAMEWORKS = UIKit 6 | KaiaToggle_PRIVATE_FRAMEWORKS = ControlCenterUIKit 7 | KaiaToggle_INSTALL_PATH = /Library/ControlCenter/Bundles/ 8 | KaiaToggle_BUNDLE_EXTENSION = bundle 9 | 10 | include $(THEOS)/makefiles/common.mk 11 | include $(THEOS_MAKE_PATH)/bundle.mk 12 | -------------------------------------------------------------------------------- /Apps/Kaia/KaiaToggle/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleName 6 | KaiaToggle 7 | CFBundleExecutable 8 | KaiaToggle 9 | CFBundleIdentifier 10 | me.luki.kaiatoggle 11 | CFBundleDevelopmentRegion 12 | English 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | MinimumOSVersion 22 | 11.0 23 | UIDeviceFamily 24 | 25 | 1 26 | 2 27 | 28 | NSPrincipalClass 29 | KaiaToggle 30 | CFBundleSupportedPlatforms 31 | 32 | iPhoneOS 33 | 34 | CCSGetModuleSizeAtRuntime 35 | 36 | CCSModuleSize 37 | 38 | Portrait 39 | 40 | Height 41 | 1 42 | Width 43 | 1 44 | 45 | Landscape 46 | 47 | Height 48 | 1 49 | Width 50 | 1 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Apps/Kaia/KaiaToggle/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.kaiatoggle 2 | Name: KaiaToggle 3 | Depends: com.opa334.ccsupport 4 | Version: 0.9.0 5 | Architecture: iphoneos-arm 6 | Description: An awesome Control Center module! 7 | Maintainer: Luki 8 | Author: Luki 9 | Section: Control Center (Modules) 10 | -------------------------------------------------------------------------------- /Apps/Kaia/Makefile: -------------------------------------------------------------------------------- 1 | export TARGET := iphone:clang:14.5:latest 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | SUBPROJECTS += KaiaToggle Tweak 5 | 6 | include $(THEOS)/makefiles/common.mk 7 | include $(THEOS_MAKE_PATH)/bundle.mk 8 | include $(THEOS_MAKE_PATH)/aggregate.mk 9 | -------------------------------------------------------------------------------- /Apps/Kaia/Tweak/Kaia.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.mobileslideshow" ); }; } 2 | -------------------------------------------------------------------------------- /Apps/Kaia/Tweak/Makefile: -------------------------------------------------------------------------------- 1 | TWEAK_NAME = Kaia 2 | 3 | Kaia_FILES = Tweak.m 4 | Kaia_CFLAGS = -fobjc-arc 5 | 6 | include $(THEOS)/makefiles/common.mk 7 | include $(THEOS_MAKE_PATH)/tweak.mk 8 | -------------------------------------------------------------------------------- /Apps/Kaia/Tweak/Tweak.m: -------------------------------------------------------------------------------- 1 | /*--- Lock your hidden album with TouchID or password, includes a CC module to toggle it on-off on the fly ---*/ 2 | 3 | @import UIKit; 4 | @import CydiaSubstrate; 5 | @import LocalAuthentication; 6 | #import "Headers/Common.h" 7 | 8 | 9 | @interface PXGadgetUIViewController : UIViewController 10 | @end 11 | 12 | 13 | @interface PXNavigationListGadget : UIViewController 14 | @end 15 | 16 | static BOOL isKaiaToggleSelected; 17 | 18 | static void (*origAppDidEnterBackground)(PXNavigationListGadget *, SEL, id); 19 | static void overrideAppDidEnterBackground(PXNavigationListGadget *self, SEL _cmd, id background) { 20 | 21 | [self.navigationController popToRootViewControllerAnimated: YES]; 22 | origAppDidEnterBackground(self, _cmd, background); 23 | 24 | } 25 | 26 | static void (*origVDL)(PXNavigationListGadget *, SEL); 27 | static void overrideVDL(PXNavigationListGadget *self, SEL _cmd) { 28 | 29 | origVDL(self, _cmd); 30 | 31 | [NSDistributedNotificationCenter.defaultCenter addObserver:self selector:@selector(didSelectKaiaToggle:) name:KaiaDidSelectToggleNotification object:nil]; 32 | [NSDistributedNotificationCenter.defaultCenter postNotificationName:KaiaDidRetrieveToggleStateNotification object:nil]; 33 | 34 | } 35 | 36 | static void (*origDidSelectRowAtIndexPath)(PXNavigationListGadget *, SEL, UITableView *, NSIndexPath *); 37 | static void overrideDidSelectRowAtIndexPath(PXNavigationListGadget *self, SEL _cmd, UITableView *tableView, NSIndexPath *indexPath) { 38 | 39 | if(!isKaiaToggleSelected) return origDidSelectRowAtIndexPath(self, _cmd, tableView, indexPath); 40 | 41 | UITableViewCell *cell = [tableView cellForRowAtIndexPath: indexPath]; 42 | if(![cell isKindOfClass:NSClassFromString(@"PXNavigationListCell")] || indexPath.row != 1) 43 | return origDidSelectRowAtIndexPath(self, _cmd, tableView, indexPath); 44 | 45 | [[LAContext new] evaluatePolicy:LAPolicyDeviceOwnerAuthentication localizedReason:@"Show yourself bozo, authenticate" reply:^(BOOL success, NSError *error) { 46 | if(!success || error) { 47 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 48 | return; 49 | } 50 | else 51 | dispatch_async(dispatch_get_main_queue(), ^{ origDidSelectRowAtIndexPath(self, _cmd, tableView, indexPath); }); 52 | }]; 53 | 54 | } 55 | 56 | static void new_didSelectKaiaToggle(PXNavigationListGadget *self, SEL _cmd, NSNotification *notification) { 57 | 58 | NSNumber *kaiaToggleSelected = notification.userInfo[@"kaiaToggleSelected"]; 59 | isKaiaToggleSelected = kaiaToggleSelected.boolValue; 60 | 61 | } 62 | 63 | 64 | __attribute__((constructor)) static void init() { 65 | 66 | MSHookMessageEx(NSClassFromString(@"PXNavigationListGadget"), @selector(viewDidLoad), (IMP) &overrideVDL, (IMP *) &origVDL); 67 | MSHookMessageEx(NSClassFromString(@"PXNavigationListGadget"), @selector(tableView:didSelectRowAtIndexPath:), (IMP) &overrideDidSelectRowAtIndexPath, (IMP *) &origDidSelectRowAtIndexPath); 68 | MSHookMessageEx(NSClassFromString(@"PXGadgetUIViewController"), @selector(_applicationDidEnterBackground:), (IMP) &overrideAppDidEnterBackground, (IMP *) &origAppDidEnterBackground); 69 | 70 | class_addMethod( 71 | NSClassFromString(@"PXNavigationListGadget"), 72 | @selector(didSelectKaiaToggle:), 73 | (IMP) &new_didSelectKaiaToggle, 74 | "v@:@" 75 | ); 76 | 77 | } 78 | -------------------------------------------------------------------------------- /Apps/Kaia/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.kaia 2 | Name: Kaia 3 | Version: 0.9.2 4 | Architecture: iphoneos-arm 5 | Description: Lock your hidden album with TouchID or password 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.kaia 11 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.kaia/depiction.json 12 | -------------------------------------------------------------------------------- /Apps/Zaire/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:14.0 2 | INSTALL_TARGET_PROCESSES = Preferences 3 | 4 | TWEAK_NAME = Zaire 5 | 6 | Zaire_FILES = Zaire.mm 7 | Zaire_CFLAGS = -fobjc-arc 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/tweak.mk 11 | -------------------------------------------------------------------------------- /Apps/Zaire/Zaire.mm: -------------------------------------------------------------------------------- 1 | /*--- Displays the number of installed apps in the storage settings' page ---*/ 2 | 3 | @import CydiaSubstrate; 4 | @import Preferences.PSListController; 5 | 6 | 7 | @interface STStorageController: PSListController 8 | @property (nonatomic, strong) NSArray *appSpecs; 9 | @end 10 | 11 | @class PSCapacityBarCell; 12 | 13 | static NSArray *_actualApps; 14 | 15 | static UITableViewCell *(*origCFRAI)(STStorageController *, SEL, UITableView *, NSIndexPath *); 16 | static UITableViewCell *overrideCFRAI(STStorageController *self, SEL _cmd, UITableView *tableView, NSIndexPath *indexPath) { 17 | 18 | NSPredicate *_predicateOne = [NSPredicate predicateWithFormat: @"SELF.identifier != %@", @"com.apple.FileProvider.LocalStorage"]; 19 | NSPredicate *_predicateTwo = [NSPredicate predicateWithFormat: @"SELF.identifier != %@", @"com.apple.ToneSettingsUsage"]; 20 | NSPredicate *_predicateThree = [NSPredicate predicateWithFormat: @"SELF.detailControllerClass != %@", NSClassFromString(@"STStorageCloudDiskDetailController")]; 21 | 22 | if(!_actualApps) _actualApps = [NSArray new]; 23 | _actualApps = [self.appSpecs filteredArrayUsingPredicate: [NSCompoundPredicate andPredicateWithSubpredicates: @[_predicateOne, _predicateTwo, _predicateThree]]]; 24 | 25 | return origCFRAI(self, _cmd, tableView, indexPath); 26 | 27 | } 28 | 29 | static void (*origCL)(PSCapacityBarCell *, SEL, NSArray *); 30 | static void overrideCL(PSCapacityBarCell *self, SEL _cmd, NSArray *legends) { 31 | 32 | origCL(self, _cmd, legends); 33 | 34 | UILabel *_sizeLabel = MSHookIvar(self, "_sizeLabel"); 35 | if([MSHookIvar(self, "_titleLabel").text isEqualToString: @"iPod touch"]) _sizeLabel.font = [UIFont systemFontOfSize: 13]; 36 | _sizeLabel.text = [_sizeLabel.text stringByAppendingString:[NSString stringWithFormat: @", %ld Apps", [_actualApps count]]]; 37 | 38 | } 39 | 40 | __attribute__((constructor)) static void init(void) { 41 | 42 | [[NSBundle bundleWithPath: @"/System/Library/PreferenceBundles/StorageSettings.bundle"] load]; 43 | 44 | MSHookMessageEx(NSClassFromString(@"PSCapacityBarCell"), @selector(createLegends:), (IMP) &overrideCL, (IMP *) &origCL); 45 | MSHookMessageEx(NSClassFromString(@"STStorageController"), @selector(tableView:cellForRowAtIndexPath:), (IMP) &overrideCFRAI, (IMP *) &origCFRAI); 46 | 47 | } 48 | -------------------------------------------------------------------------------- /Apps/Zaire/Zaire.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.Preferences" ); }; } 2 | -------------------------------------------------------------------------------- /Apps/Zaire/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.zaire 2 | Name: Zaire 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: Displays the number of installed apps in the storage page 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.zaire 11 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.zaire/depiction.json 12 | -------------------------------------------------------------------------------- /Apps/ZohoPopToRoot/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:latest 2 | INSTALL_TARGET_PROCESSES = Zoho\ Mail 3 | 4 | TWEAK_NAME = ZohoPopToRoot 5 | 6 | ZohoPopToRoot_FILES = Tweak.m 7 | ZohoPopToRoot_CFLAGS = -fobjc-arc 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/tweak.mk 11 | -------------------------------------------------------------------------------- /Apps/ZohoPopToRoot/Tweak.m: -------------------------------------------------------------------------------- 1 | /*--- Pop to root in the Zoho Mail app when tapping a tab bar item ---*/ 2 | 3 | @import libhooker.libblackjack; 4 | @import UIKit; 5 | 6 | 7 | @interface MailListViewController : UIViewController 8 | @end 9 | 10 | 11 | static void (*origVDL)(MailListViewController *, SEL); 12 | static void overrideVDL(MailListViewController *self, SEL _cmd) { 13 | 14 | /*--- lmao so it seems just assigning the delegate makes 15 | pop to root work, didn't have to override any delegate methods 16 | :KanyeWtf: :bThisIsHowItIs: ---*/ 17 | origVDL(self, _cmd); 18 | self.tabBarController.delegate = self; 19 | 20 | } 21 | 22 | __attribute__((constructor)) static void init() { 23 | 24 | LBHookMessage(NSClassFromString(@"MailListViewController"), @selector(viewDidLoad), &overrideVDL, &origVDL); 25 | 26 | } -------------------------------------------------------------------------------- /Apps/ZohoPopToRoot/ZohoPopToRoot.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.zoho.zmail" ); }; } 2 | -------------------------------------------------------------------------------- /Apps/ZohoPopToRoot/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.zohopoptoroot 2 | Name: ZohoPopToRoot 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: An awesome Libhooker tweak! 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | * Contributions are more than welcomed, but should follow this etiquette: 4 | 5 | * If you're a contributor with write access to this repository, you **should NOT** push to main branch, preferably push to a new one and *then* create the PR. 6 | * Keep commit titles short and then explain them in comments or preferably in the commit's description. 7 | * Push small commits (e.g if you changed 2 directories, commit one directory, then commit the other one and only THEN push) 8 | 9 | ## LICENSE 10 | 11 | * [Mozilla Public License 2.0](https://www.mozilla.org/en-US/MPL/2.0/) 12 | 13 | ## Assets LICENSE 14 | 15 | * Under no means shall the visual assets of this repository – i.e., all photo-, picto-, icono-, and videographic material – (if any) be altered and/or redistributed for any independent commercial or non-commercial intent beyond its original function in this project. Permissible usage of such content is restricted solely to its express application in this repository and any forks that retain the material in its original, unaltered form only. 16 | -------------------------------------------------------------------------------- /SpringBoard/Arizona/Arizona.m: -------------------------------------------------------------------------------- 1 | /*--- Move the stock clock, date & lock glyph on the fly ---*/ 2 | 3 | @import UIKit; 4 | @import CydiaSubstrate; 5 | #import "Common/Common.h" 6 | 7 | 8 | @interface SBFLockScreenDateView : UIView 9 | @end 10 | 11 | 12 | @interface SBUIProudLockIconView : UIView 13 | - (void)updateLockGlyphPosition; 14 | @end 15 | 16 | 17 | static BOOL yes; 18 | static NSInteger position; 19 | 20 | static BOOL alternatePosition; 21 | static BOOL lockGlyphPosition; 22 | 23 | static float coordinatesForX; 24 | static float coordinatesForY; 25 | static float lockCoordinatesForX; 26 | static float lockCoordinatesForY; 27 | 28 | #define kLatchKey jbRootPath(@"/Library/MobileSubstrate/DynamicLibraries/LatchKey.dylib") 29 | 30 | static void loadWithoutAFuckingRespring() { 31 | 32 | NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile: kPath]; 33 | NSMutableDictionary *prefs = dict ? [dict mutableCopy] : [NSMutableDictionary dictionary]; 34 | 35 | yes = prefs[@"yes"] ? [prefs[@"yes"] boolValue] : NO; 36 | position = prefs[@"position"] ? [prefs[@"position"] integerValue] : 2; 37 | alternatePosition = prefs[@"alternatePosition"] ? [prefs[@"alternatePosition"] boolValue] : NO; 38 | lockGlyphPosition = prefs[@"lockGlyphPosition"] ? [prefs[@"lockGlyphPosition"] boolValue] : NO; 39 | coordinatesForX = prefs[@"coordinatesForX"] ? [prefs[@"coordinatesForX"] floatValue] : 0; 40 | coordinatesForY = prefs[@"coordinatesForY"] ? [prefs[@"coordinatesForY"] floatValue] : 0; 41 | lockCoordinatesForX = prefs[@"lockXValue"] ? [prefs[@"lockXValue"] floatValue] : 0; 42 | lockCoordinatesForY = prefs[@"lockYValue"] ? [prefs[@"lockYValue"] floatValue] : 0; 43 | 44 | } 45 | 46 | static void (*origSetAlignmentPercent)(SBFLockScreenDateView *, SEL, CGFloat); 47 | static void overrideSetAlignmentPercent(SBFLockScreenDateView *self, SEL _cmd, CGFloat percent) { 48 | 49 | origSetAlignmentPercent(self, _cmd, percent); 50 | 51 | loadWithoutAFuckingRespring(); 52 | 53 | if(!yes) return; 54 | 55 | switch(position) { 56 | case 0: origSetAlignmentPercent(self, _cmd, -1); break; // left 57 | case 1: origSetAlignmentPercent(self, _cmd, 0); break; // center 58 | case 2: origSetAlignmentPercent(self, _cmd, 1); break; // right 59 | } 60 | 61 | } 62 | 63 | static void (*origSetFrame)(SBFLockScreenDateView *, SEL, CGRect); 64 | static void overrideSetFrame(SBFLockScreenDateView *self, SEL _cmd, CGRect frame) { 65 | 66 | origSetFrame(self, _cmd, frame); 67 | 68 | loadWithoutAFuckingRespring(); 69 | 70 | if(!alternatePosition) return; 71 | 72 | CGRect newFrame = CGRectMake(coordinatesForX, coordinatesForY, frame.size.width, frame.size.height); 73 | origSetFrame(self, _cmd, newFrame); 74 | 75 | } 76 | 77 | static void new_updateLockGlyphPosition(SBUIProudLockIconView *self, SEL _cmd) { 78 | 79 | loadWithoutAFuckingRespring(); 80 | 81 | if(lockGlyphPosition) self.frame = CGRectMake(lockCoordinatesForX, lockCoordinatesForY, self.frame.size.width, self.frame.size.height); 82 | else self.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height); 83 | 84 | } 85 | 86 | static void (*origDMTS)(SBUIProudLockIconView *, SEL); 87 | static void overrideDMTS(SBUIProudLockIconView *self, SEL _cmd) { 88 | 89 | origDMTS(self, _cmd); 90 | [self updateLockGlyphPosition]; 91 | 92 | [NSDistributedNotificationCenter.defaultCenter addObserver:self selector:@selector(updateLockGlyphPosition) name:ArizonaDidUpdateGlyphOriginNotification object:nil]; 93 | 94 | } 95 | 96 | static void (*origLayoutSubviews)(SBUIProudLockIconView *, SEL); 97 | static void overrideLayoutSubviews(SBUIProudLockIconView *self, SEL _cmd) { 98 | 99 | origLayoutSubviews(self, _cmd); 100 | [self updateLockGlyphPosition]; 101 | 102 | } 103 | 104 | 105 | __attribute__((constructor)) static void init(void) { 106 | 107 | loadWithoutAFuckingRespring(); 108 | 109 | MSHookMessageEx(NSClassFromString(@"SBFLockScreenDateView"), @selector(setAlignmentPercent:), (IMP) &overrideSetAlignmentPercent, (IMP *) &origSetAlignmentPercent); 110 | MSHookMessageEx(NSClassFromString(@"SBFLockScreenDateView"), @selector(setFrame:), (IMP) &overrideSetFrame, (IMP *) &origSetFrame); 111 | 112 | if([[NSFileManager defaultManager] fileExistsAtPath: kLatchKey]) return; 113 | 114 | MSHookMessageEx(NSClassFromString(@"SBUIProudLockIconView"), @selector(didMoveToSuperview), (IMP) &overrideDMTS, (IMP *) &origDMTS); 115 | MSHookMessageEx(NSClassFromString(@"SBUIProudLockIconView"), @selector(layoutSubviews), (IMP) &overrideLayoutSubviews, (IMP *) &origLayoutSubviews); 116 | 117 | class_addMethod( 118 | NSClassFromString(@"SBUIProudLockIconView"), 119 | @selector(updateLockGlyphPosition), 120 | (IMP) &new_updateLockGlyphPosition, 121 | "v@:" 122 | ); 123 | 124 | } 125 | -------------------------------------------------------------------------------- /SpringBoard/Arizona/Arizona.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /SpringBoard/Arizona/ArizonaPrefs/ArizonaVC.h: -------------------------------------------------------------------------------- 1 | @import AudioToolbox.AudioServices; 2 | @import ObjectiveC.message; 3 | @import Preferences.PSSpecifier; 4 | @import Preferences.PSTableCell; 5 | @import Preferences.PSListController; 6 | #import 7 | #import 8 | #import "Common/Common.h" 9 | 10 | 11 | @interface OBWelcomeController : UIViewController 12 | - (id)initWithTitle:(id)arg1 detailText:(id)arg2 icon:(id)arg3; 13 | - (void)addBulletedListItemWithTitle:(id)arg1 description:(id)arg2 image:(id)arg3; 14 | @end 15 | 16 | 17 | @interface _UIBackdropViewSettings : NSObject 18 | + (id)settingsForStyle:(NSInteger)arg1; 19 | @end 20 | 21 | 22 | @interface _UIBackdropView : UIView 23 | - (id)initWithFrame:(CGRect)arg1 autosizesToFitSuperview:(BOOL)arg2 settings:(id)arg3; 24 | @end 25 | 26 | 27 | @interface PSListController (Private) 28 | - (BOOL)containsSpecifier:(PSSpecifier *)arg1; 29 | @end 30 | 31 | 32 | @interface ArizonaVC : PSListController 33 | @end 34 | 35 | 36 | @interface ArizonaContributorsVC : PSListController 37 | @end 38 | 39 | 40 | @interface ArizonaLinksVC : PSListController 41 | @end 42 | -------------------------------------------------------------------------------- /SpringBoard/Arizona/ArizonaPrefs/ArizonaVC.m: -------------------------------------------------------------------------------- 1 | #import "ArizonaVC.h" 2 | 3 | #define kAriTintColor [UIColor colorWithRed:0.02 green:0.79 blue:0.95 alpha: 1.0] 4 | 5 | @implementation ArizonaVC { 6 | 7 | UILabel *versionLabel; 8 | UIImageView *iconView; 9 | UIView *headerView; 10 | UIImageView *headerImageView; 11 | NSMutableDictionary *savedSpecifiers; 12 | OBWelcomeController *changelogController; 13 | 14 | } 15 | 16 | // ! Lifecycle 17 | 18 | - (NSArray *)specifiers { 19 | 20 | if(_specifiers) return nil; 21 | _specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self]; 22 | 23 | NSArray *specifiersIDs = @[ 24 | @"GroupCell-1", 25 | @"SegmentCell", 26 | @"GroupCell-2", 27 | @"XAxisLabel", 28 | @"XAxisSlider", 29 | @"YAxisLabel", 30 | @"YAxisSlider", 31 | @"GroupCell-3", 32 | @"LockXAxisLabel", 33 | @"LockXAxisSlider", 34 | @"LockYAxisLabel", 35 | @"LockYAxisSlider" 36 | ]; 37 | 38 | savedSpecifiers = savedSpecifiers ?: [NSMutableDictionary new]; 39 | 40 | for(PSSpecifier *specifier in _specifiers) 41 | 42 | if([specifiersIDs containsObject:[specifier propertyForKey:@"id"]]) 43 | 44 | [savedSpecifiers setObject:specifier forKey:[specifier propertyForKey:@"id"]]; 45 | 46 | return _specifiers; 47 | 48 | } 49 | 50 | 51 | - (id)init { 52 | 53 | self = [super init]; 54 | if(!self) return nil; 55 | 56 | static dispatch_once_t onceToken; 57 | dispatch_once(&onceToken, ^{ registerArizonaTintCellClass(); }); 58 | 59 | [self setupUI]; 60 | 61 | return self; 62 | 63 | } 64 | 65 | 66 | - (void)viewDidLoad { 67 | 68 | [super viewDidLoad]; 69 | [self reloadSpecifiers]; 70 | 71 | } 72 | 73 | 74 | - (void)setupUI { 75 | 76 | UIImage *changelogButtonImage = [UIImage systemImageNamed:@"atom"]; 77 | UIImage *iconImage = [UIImage imageWithContentsOfFile:jbRootPath(@"/Library/PreferenceBundles/ArizonaPrefs.bundle/Assets/Arizona@2x.png")]; 78 | UIImage *bannerImage = [UIImage imageWithContentsOfFile:jbRootPath(@"/Library/PreferenceBundles/ArizonaPrefs.bundle/Assets/ArizonaBanner.png")]; 79 | 80 | self.navigationItem.titleView = [UIView new]; 81 | 82 | if(!versionLabel) { 83 | versionLabel = [UILabel new]; 84 | versionLabel.font = [UIFont boldSystemFontOfSize: 17]; 85 | versionLabel.text = @"0.9.2"; 86 | versionLabel.textAlignment = NSTextAlignmentCenter; 87 | versionLabel.translatesAutoresizingMaskIntoConstraints = NO; 88 | [self.navigationItem.titleView addSubview: versionLabel]; 89 | } 90 | 91 | if(!iconView) { 92 | iconView = [self createImageViewWithImage:iconImage contentMode: UIViewContentModeScaleAspectFit]; 93 | iconView.alpha = 0; 94 | [self.navigationItem.titleView addSubview: iconView]; 95 | } 96 | 97 | if(!headerView) headerView = [[UIView alloc] initWithFrame: CGRectMake(0,0,200,200)]; 98 | 99 | if(!headerImageView) { 100 | headerImageView = [self createImageViewWithImage:bannerImage contentMode: UIViewContentModeScaleAspectFill]; 101 | [headerView addSubview: headerImageView]; 102 | } 103 | 104 | UIButton *changelogButton = [UIButton new]; 105 | changelogButton.tintColor = kAriTintColor; 106 | [changelogButton setImage:changelogButtonImage forState: UIControlStateNormal]; 107 | [changelogButton addTarget:self action:@selector(showWtfChangedInThisVersion) forControlEvents: UIControlEventTouchUpInside]; 108 | 109 | UIBarButtonItem *changelogButtonItem = [[UIBarButtonItem alloc] initWithCustomView: changelogButton]; 110 | self.navigationItem.rightBarButtonItem = changelogButtonItem; 111 | 112 | [self layoutUI]; 113 | 114 | } 115 | 116 | 117 | - (void)layoutUI { 118 | 119 | [iconView anchorEqualsToView:self.navigationItem.titleView padding: UIEdgeInsetsZero]; 120 | [versionLabel anchorEqualsToView:self.navigationItem.titleView padding: UIEdgeInsetsZero]; 121 | [headerImageView anchorEqualsToView:headerView padding: UIEdgeInsetsZero]; 122 | 123 | } 124 | 125 | 126 | - (void)reloadSpecifiers { 127 | 128 | [super reloadSpecifiers]; 129 | 130 | if(![[self readPreferenceValue:[self specifierForID:@"FixedPositionSwitch"]] boolValue]) { 131 | 132 | [self removeSpecifier:savedSpecifiers[@"GroupCell-1"] animated:NO]; 133 | [self removeSpecifier:savedSpecifiers[@"SegmentCell"] animated:NO]; 134 | 135 | } 136 | 137 | else if(![self containsSpecifier:savedSpecifiers[@"GroupCell-1"]]) { 138 | 139 | [self insertSpecifier:savedSpecifiers[@"GroupCell-1"] afterSpecifierID:@"FixedPositionSwitch" animated:NO]; 140 | [self insertSpecifier:savedSpecifiers[@"SegmentCell"] afterSpecifierID:@"GroupCell-1" animated:NO]; 141 | 142 | } 143 | 144 | if(![[self readPreferenceValue:[self specifierForID:@"CustomPositionSwitch"]] boolValue]) 145 | 146 | [self removeContiguousSpecifiers:@[savedSpecifiers[@"GroupCell-2"], savedSpecifiers[@"XAxisLabel"], savedSpecifiers[@"XAxisSlider"], savedSpecifiers[@"YAxisLabel"], savedSpecifiers[@"YAxisSlider"]] animated:NO]; 147 | 148 | else if(![self containsSpecifier:savedSpecifiers[@"GroupCell-2"]]) 149 | 150 | [self insertContiguousSpecifiers:@[savedSpecifiers[@"GroupCell-2"], savedSpecifiers[@"XAxisLabel"], savedSpecifiers[@"XAxisSlider"], savedSpecifiers[@"YAxisLabel"], savedSpecifiers[@"YAxisSlider"]] afterSpecifierID:@"CustomPositionSwitch" animated:NO]; 151 | 152 | if(![[self readPreferenceValue:[self specifierForID:@"LockGlyphPositionSwitch"]] boolValue]) 153 | 154 | [self removeContiguousSpecifiers:@[savedSpecifiers[@"GroupCell-3"], savedSpecifiers[@"LockXAxisLabel"], savedSpecifiers[@"LockXAxisSlider"], savedSpecifiers[@"LockYAxisLabel"], savedSpecifiers[@"LockYAxisSlider"]] animated:NO]; 155 | 156 | else if(![self containsSpecifier:savedSpecifiers[@"GroupCell-3"]]) 157 | 158 | [self insertContiguousSpecifiers:@[savedSpecifiers[@"GroupCell-3"], savedSpecifiers[@"LockXAxisLabel"], savedSpecifiers[@"LockXAxisSlider"], savedSpecifiers[@"LockYAxisLabel"], savedSpecifiers[@"LockYAxisSlider"]] afterSpecifierID:@"LockGlyphPositionSwitch" animated:NO]; 159 | 160 | } 161 | 162 | // ! Selectors 163 | 164 | - (void)showWtfChangedInThisVersion { 165 | 166 | AudioServicesPlaySystemSound(1521); 167 | 168 | UIImage *tweakIconImage = [UIImage imageWithContentsOfFile:jbRootPath(@"/Library/PreferenceBundles/ArizonaPrefs.bundle/Assets/ArizonaHotIcon.png")]; 169 | UIImage *checkmarkImage = [UIImage systemImageNamed:@"checkmark.circle.fill"]; 170 | 171 | if(changelogController) { [self presentViewController:changelogController animated:YES completion:nil]; return; } 172 | changelogController = [[OBWelcomeController alloc] initWithTitle:@"Arizona" detailText:@"0.9.2" icon: tweakIconImage]; 173 | [changelogController addBulletedListItemWithTitle:@"Code" description:@"Refactoring ⇝ everything works the same, but better." image: checkmarkImage]; 174 | 175 | _UIBackdropViewSettings *settings = [_UIBackdropViewSettings settingsForStyle: 2]; 176 | 177 | _UIBackdropView *backdropView = [[_UIBackdropView alloc] initWithFrame:CGRectZero autosizesToFitSuperview:YES settings:settings]; 178 | backdropView.clipsToBounds = YES; 179 | [changelogController.viewIfLoaded insertSubview:backdropView atIndex: 0]; 180 | 181 | changelogController.view.tintColor = kAriTintColor; 182 | changelogController.modalInPresentation = NO; 183 | changelogController.modalPresentationStyle = UIModalPresentationPageSheet; 184 | changelogController.viewIfLoaded.backgroundColor = UIColor.clearColor; 185 | [self presentViewController:changelogController animated:YES completion:nil]; 186 | 187 | } 188 | 189 | 190 | - (void)shatterThePrefsToPieces { 191 | 192 | AudioServicesPlaySystemSound(1521); 193 | 194 | UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Arizona" message:@"Do you want to start fresh?" preferredStyle:UIAlertControllerStyleAlert]; 195 | UIAlertAction *confirmAction = [UIAlertAction actionWithTitle:@"Shoot" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { 196 | 197 | [[NSFileManager defaultManager] removeItemAtPath:kPath error:nil]; 198 | [self crossDissolveBlur]; 199 | 200 | }]; 201 | UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Meh" style:UIAlertActionStyleDefault handler:nil]; 202 | 203 | [alertController addAction: confirmAction]; 204 | [alertController addAction: cancelAction]; 205 | [self presentViewController:alertController animated:YES completion:nil]; 206 | 207 | } 208 | 209 | 210 | - (void)crossDissolveBlur { 211 | 212 | _UIBackdropViewSettings *settings = [_UIBackdropViewSettings settingsForStyle:2]; 213 | 214 | _UIBackdropView *backdropView = [[_UIBackdropView alloc] initWithFrame:CGRectZero autosizesToFitSuperview:YES settings:settings]; 215 | backdropView.alpha = 0; 216 | backdropView.clipsToBounds = YES; 217 | [self.view addSubview: backdropView]; 218 | 219 | [UIView animateWithDuration:1 delay:0 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{ 220 | 221 | backdropView.alpha = 1; 222 | 223 | } completion:^(BOOL finished) { [self launchRespring]; }]; 224 | 225 | } 226 | 227 | 228 | - (void)launchRespring { 229 | 230 | pid_t pid; 231 | const char* args[] = {"killall", "backboardd", NULL}; 232 | posix_spawn(&pid, jbRootPathC("/usr/bin/killall"), NULL, NULL, (char* const*)args, NULL); 233 | 234 | } 235 | 236 | 237 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView { 238 | 239 | CGFloat offsetY = scrollView.contentOffset.y; 240 | 241 | if(offsetY > 150) { 242 | 243 | [UIView animateWithDuration:0.2 animations:^{ 244 | 245 | iconView.alpha = 1; 246 | versionLabel.alpha = 0; 247 | 248 | }]; 249 | 250 | } 251 | 252 | else { 253 | 254 | [UIView animateWithDuration:0.2 animations:^{ 255 | 256 | iconView.alpha = 0; 257 | versionLabel.alpha = 1; 258 | 259 | }]; 260 | 261 | } 262 | 263 | } 264 | 265 | // ! Reusable 266 | 267 | - (UIImageView *)createImageViewWithImage:(UIImage *)image contentMode:(UIViewContentMode)contentMode { 268 | 269 | UIImageView *imageView = [UIImageView new]; 270 | imageView.image = image; 271 | imageView.contentMode = contentMode; 272 | imageView.clipsToBounds = YES; 273 | imageView.translatesAutoresizingMaskIntoConstraints = NO; 274 | return imageView; 275 | 276 | } 277 | 278 | // ! UITableViewDataSource 279 | 280 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 281 | 282 | tableView.tableHeaderView = headerView; 283 | return [super tableView:tableView cellForRowAtIndexPath: indexPath]; 284 | 285 | } 286 | 287 | // ! Preferences 288 | 289 | - (id)readPreferenceValue:(PSSpecifier *)specifier { 290 | 291 | NSMutableDictionary *settings = [NSMutableDictionary dictionary]; 292 | [settings addEntriesFromDictionary:[NSDictionary dictionaryWithContentsOfFile: kPath]]; 293 | return settings[specifier.properties[@"key"]] ?: specifier.properties[@"default"]; 294 | 295 | } 296 | 297 | 298 | - (void)setPreferenceValue:(id)value specifier:(PSSpecifier *)specifier { 299 | 300 | NSMutableDictionary *settings = [NSMutableDictionary dictionary]; 301 | [settings addEntriesFromDictionary:[NSDictionary dictionaryWithContentsOfFile: kPath]]; 302 | [settings setObject:value forKey:specifier.properties[@"key"]]; 303 | [settings writeToFile:kPath atomically:YES]; 304 | 305 | [super setPreferenceValue:value specifier: specifier]; 306 | 307 | [NSDistributedNotificationCenter.defaultCenter postNotificationName:ArizonaDidUpdateGlyphOriginNotification object:nil]; 308 | 309 | NSString *key = [specifier propertyForKey:@"key"]; 310 | 311 | if([key isEqualToString:@"yes"]) { 312 | 313 | if(![value boolValue]) { 314 | 315 | [self removeSpecifier:savedSpecifiers[@"GroupCell-1"] animated:YES]; 316 | [self removeSpecifier:savedSpecifiers[@"SegmentCell"] animated:YES]; 317 | 318 | } 319 | 320 | else if(![self containsSpecifier:savedSpecifiers[@"SegmentCell"]]) { 321 | 322 | [self insertSpecifier:savedSpecifiers[@"GroupCell-1"] afterSpecifierID:@"FixedPositionSwitch" animated:YES]; 323 | [self insertSpecifier:savedSpecifiers[@"SegmentCell"] afterSpecifierID:@"GroupCell-1" animated:YES]; 324 | 325 | } 326 | 327 | } 328 | 329 | if([key isEqualToString:@"alternatePosition"]) { 330 | 331 | if(![value boolValue]) 332 | 333 | [self removeContiguousSpecifiers:@[savedSpecifiers[@"GroupCell-2"], savedSpecifiers[@"XAxisLabel"], savedSpecifiers[@"XAxisSlider"], savedSpecifiers[@"YAxisLabel"], savedSpecifiers[@"YAxisSlider"]] animated:YES]; 334 | 335 | else if(![self containsSpecifier:savedSpecifiers[@"GroupCell-2"]]) 336 | 337 | [self insertContiguousSpecifiers:@[savedSpecifiers[@"GroupCell-2"], savedSpecifiers[@"XAxisLabel"], savedSpecifiers[@"XAxisSlider"], savedSpecifiers[@"YAxisLabel"], savedSpecifiers[@"YAxisSlider"]] afterSpecifierID:@"CustomPositionSwitch" animated:YES]; 338 | 339 | } 340 | 341 | if([key isEqualToString:@"lockGlyphPosition"]) { 342 | 343 | if(![value boolValue]) 344 | 345 | [self removeContiguousSpecifiers:@[savedSpecifiers[@"GroupCell-3"], savedSpecifiers[@"LockXAxisLabel"], savedSpecifiers[@"LockXAxisSlider"], savedSpecifiers[@"LockYAxisLabel"], savedSpecifiers[@"LockYAxisSlider"]] animated:YES]; 346 | 347 | else if(![self containsSpecifier:savedSpecifiers[@"GroupCell-3"]]) 348 | 349 | [self insertContiguousSpecifiers:@[savedSpecifiers[@"GroupCell-3"], savedSpecifiers[@"LockXAxisLabel"], savedSpecifiers[@"LockXAxisSlider"], savedSpecifiers[@"LockYAxisLabel"], savedSpecifiers[@"LockYAxisSlider"]] afterSpecifierID:@"LockGlyphPositionSwitch" animated:YES]; 350 | 351 | } 352 | 353 | } 354 | 355 | // ! Dark juju 356 | 357 | static void arizona_setTitle(PSTableCell *self, SEL _cmd, NSString *title) { 358 | 359 | struct objc_super superSetTitle = { 360 | self, 361 | [self superclass] 362 | }; 363 | 364 | id (*superCall)(struct objc_super *, SEL, NSString *) = (void *)objc_msgSendSuper; 365 | superCall(&superSetTitle, _cmd, title); 366 | 367 | self.titleLabel.textColor = kAriTintColor; 368 | self.titleLabel.highlightedTextColor = kAriTintColor; 369 | 370 | } 371 | 372 | static void registerArizonaTintCellClass(void) { 373 | 374 | Class ArizonaTintCellClass = objc_allocateClassPair([PSTableCell class], "ArizonaTintCell", 0); 375 | Method method = class_getInstanceMethod([PSTableCell class], @selector(setTitle:)); 376 | const char *typeEncoding = method_getTypeEncoding(method); 377 | class_addMethod(ArizonaTintCellClass, @selector(setTitle:), (IMP) arizona_setTitle, typeEncoding); 378 | 379 | objc_registerClassPair(ArizonaTintCellClass); 380 | 381 | } 382 | 383 | @end 384 | 385 | 386 | @implementation ArizonaContributorsVC 387 | 388 | - (NSArray *)specifiers { 389 | 390 | if(!_specifiers) _specifiers = [self loadSpecifiersFromPlistName:@"AriContributors" target:self]; 391 | return _specifiers; 392 | 393 | } 394 | 395 | @end 396 | 397 | 398 | @implementation ArizonaLinksVC 399 | 400 | - (NSArray *)specifiers { 401 | 402 | if(!_specifiers) _specifiers = [self loadSpecifiersFromPlistName:@"AriLinks" target:self]; 403 | return _specifiers; 404 | 405 | } 406 | 407 | 408 | - (void)launchDiscord { [self launchURL: [NSURL URLWithString: @"https://discord.gg/jbE3avwSHs"]]; } 409 | - (void)launchPayPal { [self launchURL: [NSURL URLWithString: @"https://paypal.me/Luki120"]]; } 410 | - (void)launchGitHub { [self launchURL: [NSURL URLWithString: @"https://github.com/Luki120/SmallTweaks/tree/main/SpringBoard/Arizona"]]; } 411 | - (void)launchApril { [self launchURL: [NSURL URLWithString:@"https://repo.twickd.com/get/com.twickd.luki120.april"]]; } 412 | - (void)launchMeredith { [self launchURL: [NSURL URLWithString:@"https://repo.twickd.com/get/com.twickd.luki120.meredith"]]; } 413 | 414 | - (void)launchURL:(NSURL *)url { [UIApplication.sharedApplication openURL:url options:@{} completionHandler:nil]; } 415 | 416 | @end 417 | -------------------------------------------------------------------------------- /SpringBoard/Arizona/ArizonaPrefs/Makefile: -------------------------------------------------------------------------------- 1 | BUNDLE_NAME = ArizonaPrefs 2 | 3 | ArizonaPrefs_FILES = ArizonaVC.m 4 | ArizonaPrefs_CFLAGS = -fobjc-arc 5 | ArizonaPrefs_LIBRARIES = gcuniversal 6 | ArizonaPrefs_FRAMEWORKS = UIKit 7 | ArizonaPrefs_PRIVATE_FRAMEWORKS = Preferences OnBoardingKit 8 | ArizonaPrefs_INSTALL_PATH = /Library/PreferenceBundles 9 | 10 | include $(THEOS)/makefiles/common.mk 11 | include $(THEOS_MAKE_PATH)/bundle.mk 12 | -------------------------------------------------------------------------------- /SpringBoard/Arizona/ArizonaPrefs/Resources/AriContributors.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSGroupCell 10 | label 11 | Lead Developer 12 | 13 | 14 | cell 15 | PSButtonCell 16 | cellClass 17 | GcTwitterCell 18 | accountLabel 19 | Luki120 20 | account 21 | Lukii120 22 | URL 23 | https://avatars.githubusercontent.com/u/74214115?v=4 24 | 25 | 26 | cell 27 | PSGroupCell 28 | label 29 | Wizard 30 | 31 | 32 | cell 33 | PSButtonCell 34 | cellClass 35 | GcTwitterCell 36 | accountLabel 37 | RuntimeOverflow 38 | account 39 | RuntimeOverflow 40 | URL 41 | https://avatars.githubusercontent.com/u/38386956?v=4 42 | 43 | 44 | cell 45 | PSGroupCell 46 | label 47 | Help With Specifiers 48 | 49 | 50 | cell 51 | PSButtonCell 52 | cellClass 53 | GcTwitterCell 54 | accountLabel 55 | Miguelaka 56 | account 57 | Miguelaka95 58 | URL 59 | https://pbs.twimg.com/profile_images/1352713271435014148/_N-NLFJv_400x400.jpg 60 | 61 | 62 | cell 63 | PSGroupCell 64 | label 65 | Pretty Changelog View 66 | 67 | 68 | cell 69 | PSButtonCell 70 | cellClass 71 | GcTwitterCell 72 | accountLabel 73 | ETHN 74 | account 75 | EthanWhited 76 | URL 77 | https://avatars.githubusercontent.com/u/41249541?v=4 78 | 79 | 80 | cell 81 | PSGroupCell 82 | label 83 | Pretty Icon And Banner 84 | 85 | 86 | cell 87 | PSButtonCell 88 | cellClass 89 | GcTwitterCell 90 | accountLabel 91 | Ben 92 | account 93 | Ben216k 94 | URL 95 | https://avatars.githubusercontent.com/u/91443760?v=4 96 | 97 | 98 | cell 99 | PSGroupCell 100 | label 101 | Pretty Twitter Cells 102 | 103 | 104 | cell 105 | PSButtonCell 106 | cellClass 107 | GcTwitterCell 108 | accountLabel 109 | MrGcGamer 110 | account 111 | MrGcGamer 112 | URL 113 | https://avatars.githubusercontent.com/u/32813275?v=4 114 | 115 | 116 | title 117 | Arizona 118 | 119 | 120 | -------------------------------------------------------------------------------- /SpringBoard/Arizona/ArizonaPrefs/Resources/AriLinks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSGroupCell 10 | label 11 | Maybe 12 | 13 | 14 | cell 15 | PSButtonCell 16 | cellClass 17 | ArizonaTintCell 18 | action 19 | launchDiscord 20 | label 21 | Chat With Us On Discord 22 | 23 | 24 | cell 25 | PSButtonCell 26 | cellClass 27 | ArizonaTintCell 28 | action 29 | launchPayPal 30 | label 31 | Support Development 32 | 33 | 34 | cell 35 | PSButtonCell 36 | cellClass 37 | ArizonaTintCell 38 | action 39 | launchGitHub 40 | label 41 | Source Code 🔥 42 | 43 | 44 | cell 45 | PSGroupCell 46 | label 47 | You Might Like 48 | 49 | 50 | cell 51 | PSButtonCell 52 | cellClass 53 | ArizonaTintCell 54 | action 55 | launchApril 56 | label 57 | April 58 | icon 59 | Assets/April@2x.png 60 | 61 | 62 | cell 63 | PSButtonCell 64 | cellClass 65 | ArizonaTintCell 66 | action 67 | launchMeredith 68 | label 69 | Meredith 70 | icon 71 | Assets/Meredith@2x.png 72 | 73 | 74 | title 75 | Arizona 76 | 77 | 78 | -------------------------------------------------------------------------------- /SpringBoard/Arizona/ArizonaPrefs/Resources/Assets/April@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Luki120/SmallTweaks/112b385f22f937c41bd275695784d5b7008a6cb0/SpringBoard/Arizona/ArizonaPrefs/Resources/Assets/April@2x.png -------------------------------------------------------------------------------- /SpringBoard/Arizona/ArizonaPrefs/Resources/Assets/Arizona.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Luki120/SmallTweaks/112b385f22f937c41bd275695784d5b7008a6cb0/SpringBoard/Arizona/ArizonaPrefs/Resources/Assets/Arizona.png -------------------------------------------------------------------------------- /SpringBoard/Arizona/ArizonaPrefs/Resources/Assets/Arizona@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Luki120/SmallTweaks/112b385f22f937c41bd275695784d5b7008a6cb0/SpringBoard/Arizona/ArizonaPrefs/Resources/Assets/Arizona@2x.png -------------------------------------------------------------------------------- /SpringBoard/Arizona/ArizonaPrefs/Resources/Assets/Arizona@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Luki120/SmallTweaks/112b385f22f937c41bd275695784d5b7008a6cb0/SpringBoard/Arizona/ArizonaPrefs/Resources/Assets/Arizona@3x.png -------------------------------------------------------------------------------- /SpringBoard/Arizona/ArizonaPrefs/Resources/Assets/ArizonaBanner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Luki120/SmallTweaks/112b385f22f937c41bd275695784d5b7008a6cb0/SpringBoard/Arizona/ArizonaPrefs/Resources/Assets/ArizonaBanner.png -------------------------------------------------------------------------------- /SpringBoard/Arizona/ArizonaPrefs/Resources/Assets/ArizonaHotIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Luki120/SmallTweaks/112b385f22f937c41bd275695784d5b7008a6cb0/SpringBoard/Arizona/ArizonaPrefs/Resources/Assets/ArizonaHotIcon.png -------------------------------------------------------------------------------- /SpringBoard/Arizona/ArizonaPrefs/Resources/Assets/Meredith@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Luki120/SmallTweaks/112b385f22f937c41bd275695784d5b7008a6cb0/SpringBoard/Arizona/ArizonaPrefs/Resources/Assets/Meredith@2x.png -------------------------------------------------------------------------------- /SpringBoard/Arizona/ArizonaPrefs/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ArizonaPrefs 9 | CFBundleIdentifier 10 | me.luki.arizonaprefs 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 | ArizonaVC 23 | 24 | 25 | -------------------------------------------------------------------------------- /SpringBoard/Arizona/ArizonaPrefs/Resources/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cellClass 9 | GcDuoTwitterCell 10 | firstLabel 11 | Luki120 12 | firstAccount 13 | Lukii120 14 | firstURL 15 | https://avatars.githubusercontent.com/u/74214115?v=4 16 | secondLabel 17 | Ben 18 | secondAccount 19 | Ben216k 20 | secondURL 21 | https://avatars.githubusercontent.com/u/91443760?v=4 22 | 23 | 24 | cell 25 | PSGroupCell 26 | 27 | 28 | cell 29 | PSSwitchCell 30 | default 31 | 32 | defaults 33 | me.luki.arizonaprefs 34 | key 35 | yes 36 | label 37 | Fixed Position 38 | id 39 | FixedPositionSwitch 40 | 41 | 42 | cell 43 | PSGroupCell 44 | id 45 | GroupCell-1 46 | 47 | 48 | cell 49 | PSSegmentCell 50 | height 51 | 50 52 | defaults 53 | me.luki.arizonaprefs 54 | default 55 | 2 56 | key 57 | position 58 | validValues 59 | 60 | 0 61 | 1 62 | 2 63 | 64 | validTitles 65 | 66 | Left 67 | Center 68 | Right 69 | 70 | id 71 | SegmentCell 72 | 73 | 74 | cell 75 | PSGroupCell 76 | 77 | 78 | cell 79 | PSSwitchCell 80 | default 81 | 82 | defaults 83 | me.luki.arizonaprefs 84 | key 85 | alternatePosition 86 | label 87 | Custom Position 88 | id 89 | CustomPositionSwitch 90 | 91 | 92 | cell 93 | PSGroupCell 94 | id 95 | GroupCell-2 96 | 97 | 98 | cell 99 | PSStaticTextCell 100 | label 101 | X Axis 102 | id 103 | XAxisLabel 104 | 105 | 106 | cell 107 | PSSliderCell 108 | default 109 | 0 110 | defaults 111 | me.luki.arizonaprefs 112 | key 113 | coordinatesForX 114 | min 115 | -500.0 116 | max 117 | 500.0 118 | showValue 119 | 120 | id 121 | XAxisSlider 122 | 123 | 124 | cell 125 | PSStaticTextCell 126 | label 127 | Y Axis 128 | id 129 | YAxisLabel 130 | 131 | 132 | cell 133 | PSSliderCell 134 | default 135 | 0 136 | defaults 137 | me.luki.arizonaprefs 138 | key 139 | coordinatesForY 140 | min 141 | -100 142 | max 143 | 800 144 | showValue 145 | 146 | id 147 | YAxisSlider 148 | 149 | 150 | cell 151 | PSGroupCell 152 | 153 | 154 | cell 155 | PSSwitchCell 156 | default 157 | 158 | defaults 159 | me.luki.arizonaprefs 160 | key 161 | lockGlyphPosition 162 | label 163 | Lock Glyph Position 164 | id 165 | LockGlyphPositionSwitch 166 | 167 | 168 | cell 169 | PSGroupCell 170 | id 171 | GroupCell-3 172 | 173 | 174 | cell 175 | PSStaticTextCell 176 | label 177 | X Axis 178 | id 179 | LockXAxisLabel 180 | 181 | 182 | cell 183 | PSSliderCell 184 | default 185 | 0 186 | defaults 187 | me.luki.arizonaprefs 188 | key 189 | lockCoordinatesForX 190 | min 191 | -200.0 192 | max 193 | 200.0 194 | showValue 195 | 196 | id 197 | LockXAxisSlider 198 | 199 | 200 | cell 201 | PSStaticTextCell 202 | label 203 | Y Axis 204 | id 205 | LockYAxisLabel 206 | 207 | 208 | cell 209 | PSSliderCell 210 | default 211 | 0 212 | defaults 213 | me.luki.arizonaprefs 214 | key 215 | lockCoordinatesForY 216 | min 217 | 0.0 218 | max 219 | 800 220 | showValue 221 | 222 | id 223 | LockYAxisSlider 224 | 225 | 226 | cell 227 | PSGroupCell 228 | 229 | 230 | cell 231 | PSButtonCell 232 | cellClass 233 | ArizonaTintCell 234 | action 235 | shatterThePrefsToPieces 236 | label 237 | Reset Preferences 238 | 239 | 240 | cell 241 | PSGroupCell 242 | 243 | 244 | cell 245 | PSLinkCell 246 | cellClass 247 | ArizonaTintCell 248 | detail 249 | ArizonaLinksVC 250 | isController 251 | 252 | label 253 | Take A Look 254 | 255 | 256 | cell 257 | PSGroupCell 258 | 259 | 260 | cell 261 | PSLinkCell 262 | cellClass 263 | ArizonaTintCell 264 | detail 265 | ArizonaContributorsVC 266 | isController 267 | 268 | label 269 | Contributors 270 | 271 | 272 | cell 273 | PSGroupCell 274 | footerAlignment 275 | 1 276 | footerText 277 | made by Luki with ❤️ 278 | isStaticText 279 | 280 | 281 | 282 | cell 283 | PSGroupCell 284 | footerAlignment 285 | 1 286 | footerText 287 | © 2021-2024 Luki120 288 | isStaticText 289 | 290 | 291 | 292 | title 293 | Arizona 294 | 295 | 296 | -------------------------------------------------------------------------------- /SpringBoard/Arizona/ArizonaPrefs/layout/Library/PreferenceLoader/Preferences/ArizonaPrefs.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | entry 6 | 7 | bundle 8 | ArizonaPrefs 9 | cell 10 | PSLinkCell 11 | detail 12 | ArizonaVC 13 | icon 14 | Assets/Arizona.png 15 | isController 16 | 17 | label 18 | Arizona 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /SpringBoard/Arizona/Common/Common.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #define jbRootPathC(cPath) ROOT_PATH(cPath) 4 | #define jbRootPath(path) ROOT_PATH_NS(path) 5 | 6 | #define kPath jbRootPath(@"/var/mobile/Library/Preferences/me.luki.arizonaprefs.plist") 7 | 8 | static NSNotificationName const ArizonaDidUpdateGlyphOriginNotification = @"ArizonaDidUpdateGlyphOriginNotification"; 9 | 10 | @interface NSDistributedNotificationCenter : NSNotificationCenter 11 | @end 12 | -------------------------------------------------------------------------------- /SpringBoard/Arizona/Makefile: -------------------------------------------------------------------------------- 1 | export TARGET := iphone:clang:latest:latest 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = Arizona 5 | 6 | Arizona_FILES = Arizona.m 7 | Arizona_CFLAGS = -fobjc-arc 8 | 9 | SUBPROJECTS = ArizonaPrefs 10 | 11 | include $(THEOS)/makefiles/common.mk 12 | include $(THEOS_MAKE_PATH)/tweak.mk 13 | include $(THEOS_MAKE_PATH)/aggregate.mk 14 | -------------------------------------------------------------------------------- /SpringBoard/Arizona/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.arizona 2 | Name: Arizona 3 | Version: 0.9.2 4 | Architecture: iphoneos-arm 5 | Description: Move the stock clock, date and lock glyph on the fly 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate, preferenceloader, com.mrgcgamer.libgcuniversal 10 | Icon: https://raw.githubusercontent.com/Luki120/SmallTweaks/main/SpringBoard/Arizona/ArizonaPrefs/Resources/Assets/ArizonaHotIcon.png 11 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.arizona 12 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.arizona/depiction.json 13 | -------------------------------------------------------------------------------- /SpringBoard/Arres/Arres.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /SpringBoard/Arres/ArresPrefs/ArresVC.h: -------------------------------------------------------------------------------- 1 | @import Preferences.PSSpecifier; 2 | @import Preferences.PSListController; 3 | #import "../Common/Common.h" 4 | 5 | 6 | @interface ArresVC : PSListController 7 | @end 8 | -------------------------------------------------------------------------------- /SpringBoard/Arres/ArresPrefs/ArresVC.m: -------------------------------------------------------------------------------- 1 | #import "ArresVC.h" 2 | 3 | 4 | @implementation ArresVC 5 | 6 | - (NSArray *)specifiers { 7 | 8 | if(!_specifiers) _specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self]; 9 | return _specifiers; 10 | 11 | } 12 | 13 | 14 | - (void)setPreferenceValue:(id)value specifier:(PSSpecifier *)specifier { 15 | 16 | NSUserDefaults *prefs = [[NSUserDefaults alloc] initWithSuiteName: kSuiteName]; 17 | [prefs setObject:value forKey:specifier.properties[@"key"]]; 18 | 19 | [super setPreferenceValue:value specifier:specifier]; 20 | 21 | [NSDistributedNotificationCenter.defaultCenter postNotificationName:ArresNotificationArrivedNotification object:nil]; 22 | 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /SpringBoard/Arres/ArresPrefs/Makefile: -------------------------------------------------------------------------------- 1 | BUNDLE_NAME = ArresPrefs 2 | 3 | ArresPrefs_FILES = ArresVC.m 4 | ArresPrefs_CFLAGS = -fobjc-arc 5 | ArresPrefs_FRAMEWORKS = UIKit 6 | ArresPrefs_PRIVATE_FRAMEWORKS = Preferences 7 | ArresPrefs_INSTALL_PATH = /Library/PreferenceBundles 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/bundle.mk 11 | -------------------------------------------------------------------------------- /SpringBoard/Arres/ArresPrefs/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ArresPrefs 9 | CFBundleIdentifier 10 | me.luki.arresprefs 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 | ArresVC 23 | 24 | 25 | -------------------------------------------------------------------------------- /SpringBoard/Arres/ArresPrefs/Resources/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSGroupCell 10 | label 11 | Threshold 12 | 13 | 14 | cell 15 | PSSliderCell 16 | default 17 | 1 18 | defaults 19 | me.luki.arresprefs 20 | key 21 | timeValue 22 | min 23 | 1 24 | max 25 | 5 26 | showValue 27 | 28 | isSegmented 29 | 30 | 31 | 32 | cell 33 | PSGroupCell 34 | footerAlignment 35 | 1 36 | footerText 37 | made by Luki with ❤️ 38 | isStaticText 39 | 40 | 41 | 42 | cell 43 | PSGroupCell 44 | footerAlignment 45 | 1 46 | footerText 47 | © 2021-2024 Luki120 48 | isStaticText 49 | 50 | 51 | 52 | title 53 | Arres 54 | 55 | 56 | -------------------------------------------------------------------------------- /SpringBoard/Arres/ArresPrefs/layout/Library/PreferenceLoader/Preferences/ArresPrefs.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | entry 6 | 7 | bundle 8 | ArresPrefs 9 | cell 10 | PSLinkCell 11 | detail 12 | ArresVC 13 | icon 14 | icon.png 15 | isController 16 | 17 | label 18 | Arres 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /SpringBoard/Arres/Common/Common.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #define jbRootPath(path) ROOT_PATH_NS(path) 4 | 5 | static NSString *const kSuiteName = @"me.luki.arresprefs"; 6 | 7 | static NSNotificationName const ArresNotificationArrivedNotification = @"ArresNotificationArrivedNotification"; 8 | 9 | @interface NSDistributedNotificationCenter : NSNotificationCenter 10 | @end 11 | -------------------------------------------------------------------------------- /SpringBoard/Arres/Makefile: -------------------------------------------------------------------------------- 1 | export TARGET := iphone:clang:latest:latest 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = Arres 5 | 6 | Arres_FILES = Tweak.m 7 | Arres_CFLAGS = -fobjc-arc 8 | 9 | SUBPROJECTS = ArresPrefs 10 | 11 | include $(THEOS)/makefiles/common.mk 12 | include $(THEOS_MAKE_PATH)/tweak.mk 13 | include $(THEOS_MAKE_PATH)/aggregate.mk 14 | -------------------------------------------------------------------------------- /SpringBoard/Arres/Tweak.m: -------------------------------------------------------------------------------- 1 | /*--- Temporarily disables tapping notifications for a 2 | custom amount of seconds to prevent accidental touches ---*/ 3 | 4 | @import UIKit; 5 | @import CydiaSubstrate; 6 | #import "Common/Common.h" 7 | 8 | 9 | @interface BNContentViewControllerView : UIView 10 | - (void)doShit; 11 | @end 12 | 13 | 14 | static float timeValue; 15 | 16 | static void loadPrefs(void) { 17 | 18 | NSUserDefaults *prefs = [[NSUserDefaults alloc] initWithSuiteName: kSuiteName]; 19 | timeValue = [prefs objectForKey:@"timeValue"] ? [prefs floatForKey:@"timeValue"] : 1.0f; 20 | 21 | } 22 | 23 | static void new_doShit(BNContentViewControllerView *self, SEL _cmd) { 24 | 25 | loadPrefs(); 26 | 27 | self.userInteractionEnabled = NO; 28 | 29 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, timeValue * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ 30 | 31 | self.userInteractionEnabled = YES; 32 | 33 | }); 34 | 35 | } 36 | 37 | static void (*origLS)(BNContentViewControllerView *, SEL); 38 | static void overrideLS(BNContentViewControllerView *self, SEL _cmd) { 39 | 40 | origLS(self, _cmd); 41 | [self doShit]; 42 | 43 | } 44 | 45 | static void (*origSF)(BNContentViewControllerView *, SEL, CGRect); 46 | static void overrideSF(BNContentViewControllerView *self, SEL _cmd, CGRect frame) { 47 | 48 | origSF(self, _cmd, frame); 49 | [NSDistributedNotificationCenter.defaultCenter addObserver:self selector:@selector(doShit) name:ArresNotificationArrivedNotification object:nil]; 50 | 51 | } 52 | 53 | __attribute__((constructor)) static void init(void) { 54 | 55 | MSHookMessageEx(NSClassFromString(@"BNContentViewControllerView"), @selector(layoutSubviews), (IMP) &overrideLS, (IMP *) &origLS); 56 | MSHookMessageEx(NSClassFromString(@"BNContentViewControllerView"), @selector(setFrame:), (IMP) &overrideSF, (IMP *) &origSF); 57 | 58 | class_addMethod( 59 | NSClassFromString(@"BNContentViewControllerView"), 60 | @selector(doShit), 61 | (IMP) &new_doShit, 62 | "v@:" 63 | ); 64 | 65 | } 66 | -------------------------------------------------------------------------------- /SpringBoard/Arres/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.arres 2 | Name: Arres 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: Disables tapping on notifs banners for 0.8s 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.arres 11 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.arres/depiction.json 12 | -------------------------------------------------------------------------------- /SpringBoard/AutoRespring/AutoRespring.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /SpringBoard/AutoRespring/Headers/Common.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | static NSString *const kSuiteName = @"me.luki.autorespringprefs"; 4 | static NSNotificationName const AutoRespringDidEnableTweakNotification = @"AutoRespringDidEnableTweakNotification"; 5 | 6 | @interface NSDistributedNotificationCenter: NSNotificationCenter 7 | @end 8 | -------------------------------------------------------------------------------- /SpringBoard/AutoRespring/Makefile: -------------------------------------------------------------------------------- 1 | export TARGET := iphone:clang:16.5:14.0 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = AutoRespring 5 | 6 | AutoRespring_FILES = Tweak.m 7 | AutoRespring_CFLAGS = -fobjc-arc 8 | 9 | SUBPROJECTS = Prefs 10 | 11 | include $(THEOS)/makefiles/common.mk 12 | include $(THEOS_MAKE_PATH)/tweak.mk 13 | include $(THEOS_MAKE_PATH)/aggregate.mk 14 | -------------------------------------------------------------------------------- /SpringBoard/AutoRespring/Prefs/AutoRespringVC.h: -------------------------------------------------------------------------------- 1 | @import Preferences.PSSpecifier; 2 | @import Preferences.PSListController; 3 | #import "../Headers/Common.h" 4 | 5 | 6 | @interface AutoRespringVC : PSListController 7 | @end 8 | -------------------------------------------------------------------------------- /SpringBoard/AutoRespring/Prefs/AutoRespringVC.m: -------------------------------------------------------------------------------- 1 | #import "AutoRespringVC.h" 2 | 3 | #define kAutoRespringTintColor [UIColor colorWithRed:0.64 green:0.79 blue:1.0 alpha: 1.0] 4 | 5 | @implementation AutoRespringVC 6 | 7 | - (NSArray *)specifiers { 8 | if(!_specifiers) _specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self]; 9 | return _specifiers; 10 | } 11 | 12 | 13 | - (id)init { 14 | self = [super init]; 15 | if(!self) return nil; 16 | 17 | [UISwitch appearanceWhenContainedInInstancesOfClasses:@[[self class]]].onTintColor = kAutoRespringTintColor; 18 | 19 | return self; 20 | } 21 | 22 | 23 | - (void)setPreferenceValue:(id)value specifier:(PSSpecifier *)specifier { 24 | 25 | NSUserDefaults *prefs = [[NSUserDefaults alloc] initWithSuiteName: kSuiteName]; 26 | [prefs setObject:value forKey:specifier.properties[@"key"]]; 27 | 28 | [super setPreferenceValue:value specifier:specifier]; 29 | 30 | [NSDistributedNotificationCenter.defaultCenter postNotificationName:AutoRespringDidEnableTweakNotification object:nil]; 31 | 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /SpringBoard/AutoRespring/Prefs/Makefile: -------------------------------------------------------------------------------- 1 | BUNDLE_NAME = AutoRespringPrefs 2 | 3 | AutoRespringPrefs_FILES = AutoRespringVC.m 4 | AutoRespringPrefs_CFLAGS = -fobjc-arc 5 | AutoRespringPrefs_FRAMEWORKS = UIKit 6 | AutoRespringPrefs_PRIVATE_FRAMEWORKS = Preferences 7 | AutoRespringPrefs_INSTALL_PATH = /Library/PreferenceBundles 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/bundle.mk 11 | -------------------------------------------------------------------------------- /SpringBoard/AutoRespring/Prefs/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | AutoRespringPrefs 9 | CFBundleIdentifier 10 | me.luki.autorespringprefs 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 | AutoRespringVC 23 | 24 | 25 | -------------------------------------------------------------------------------- /SpringBoard/AutoRespring/Prefs/Resources/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSGroupCell 10 | label 11 | AutoRespring 12 | 13 | 14 | cell 15 | PSSwitchCell 16 | default 17 | 18 | defaults 19 | me.luki.autorespringprefs 20 | key 21 | enableAutoRespring 22 | label 23 | Enable 24 | 25 | 26 | cell 27 | PSGroupCell 28 | footerAlignment 29 | 1 30 | footerText 31 | © 2024 Luki120 32 | isStaticText 33 | 34 | 35 | 36 | title 37 | AutoRespring 38 | 39 | 40 | -------------------------------------------------------------------------------- /SpringBoard/AutoRespring/Prefs/layout/Library/PreferenceLoader/Preferences/AutoRespringPrefs.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | entry 6 | 7 | bundle 8 | AutoRespringPrefs 9 | cell 10 | PSLinkCell 11 | detail 12 | AutoRespringVC 13 | icon 14 | icon.png 15 | isController 16 | 17 | label 18 | AutoRespring 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /SpringBoard/AutoRespring/Tweak.m: -------------------------------------------------------------------------------- 1 | /*--- Automatically respring your device every 15 seconds, made as a bounty ---*/ 2 | 3 | #import 4 | #import "Headers/Common.h" 5 | @import UIKit.UIApplication; 6 | 7 | 8 | static id observer; 9 | static id prefsObserver; 10 | static NSTimer *_timer; 11 | 12 | static BOOL enableAutoRespring; 13 | 14 | static void loadShit(void) { 15 | NSUserDefaults *prefs = [[NSUserDefaults alloc] initWithSuiteName: kSuiteName]; 16 | enableAutoRespring = [prefs objectForKey: @"enableAutoRespring"] ? [prefs boolForKey: @"enableAutoRespring"] : NO; 17 | } 18 | 19 | static void killBackboard(void) { 20 | pid_t pid; 21 | const char* args[] = { "killall", "backboardd", NULL }; 22 | posix_spawn(&pid, ROOT_PATH("/usr/bin/killall"), NULL, NULL, (char* const *)args, NULL); 23 | } 24 | 25 | static void setAutoRespring(void) { 26 | loadShit(); 27 | 28 | if(!enableAutoRespring) { 29 | [_timer invalidate]; 30 | _timer = nil; 31 | return; 32 | } 33 | 34 | _timer = [NSTimer scheduledTimerWithTimeInterval:15 repeats:NO block:^(NSTimer *timer) { killBackboard(); }]; 35 | } 36 | 37 | static void appDidFinishLaunching(void) { 38 | observer = [NSNotificationCenter.defaultCenter addObserverForName:UIApplicationDidFinishLaunchingNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { 39 | setAutoRespring(); 40 | 41 | prefsObserver = [NSDistributedNotificationCenter.defaultCenter addObserverForName:AutoRespringDidEnableTweakNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { 42 | setAutoRespring(); 43 | }]; 44 | 45 | [NSNotificationCenter.defaultCenter removeObserver: observer]; 46 | }]; 47 | } 48 | 49 | __attribute__((constructor)) static void init(void) { 50 | loadShit(); 51 | appDidFinishLaunching(); 52 | } 53 | -------------------------------------------------------------------------------- /SpringBoard/AutoRespring/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.autorespring 2 | Name: AutoRespring 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: An awesome MobileSubstrate tweak! 6 | Maintainer: luki120 7 | Author: luki120 8 | Section: Tweaks 9 | Depends: mobilesubstrate, preferenceloader 10 | -------------------------------------------------------------------------------- /SpringBoard/Canna/Canna.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /SpringBoard/Canna/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:14.0 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = Canna 5 | 6 | Canna_FILES = Tweak.m 7 | Canna_CFLAGS = -fobjc-arc 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/tweak.mk 11 | -------------------------------------------------------------------------------- /SpringBoard/Canna/Tweak.m: -------------------------------------------------------------------------------- 1 | /*--- Changes the default lock & charging sounds to the iOS 6 (or custom) ones ---*/ 2 | 3 | @import AudioToolbox; 4 | @import CydiaSubstrate; 5 | #import 6 | 7 | 8 | @interface SBUIController: NSObject 9 | - (BOOL)_powerSourceWantsToPlayChime; 10 | @end 11 | 12 | 13 | @class SBSleepWakeHardwareButtonInteraction; 14 | 15 | #define jbRootPath(path) ROOT_PATH_NS(path) 16 | 17 | static void createSystemSoundFromPath(NSString *path) { 18 | 19 | SystemSoundID sound = 0; 20 | AudioServicesDisposeSystemSoundID(sound); 21 | AudioServicesCreateSystemSoundID((__bridge CFURLRef) [NSURL fileURLWithPath: jbRootPath(path)], &sound); 22 | AudioServicesPlaySystemSound((SystemSoundID) sound); 23 | 24 | } 25 | 26 | static void (*origPlayChargingChimeIfAppropriate)(SBUIController *, SEL); 27 | static void overridePlayChargingChimeIfAppropriate(SBUIController *self, SEL _cmd) { 28 | 29 | if(![self _powerSourceWantsToPlayChime]) return origPlayChargingChimeIfAppropriate(self, _cmd); 30 | createSystemSoundFromPath(@"/Library/Tweak Support/Canna/connect_power.caf"); 31 | 32 | } 33 | 34 | static void overridePlayLockSound(SBSleepWakeHardwareButtonInteraction *self, SEL _cmd) { 35 | 36 | createSystemSoundFromPath(@"/Library/Tweak Support/Canna/lock.caf"); 37 | 38 | } 39 | 40 | __attribute__((constructor)) static void init(void) { 41 | 42 | MSHookMessageEx(NSClassFromString(@"SBUIController"), @selector(playChargingChimeIfAppropriate), (IMP) &overridePlayChargingChimeIfAppropriate, (IMP *) &origPlayChargingChimeIfAppropriate); 43 | MSHookMessageEx(NSClassFromString(@"SBSleepWakeHardwareButtonInteraction"), @selector(_playLockSound), (IMP) &overridePlayLockSound, (IMP *) NULL); 44 | 45 | } 46 | -------------------------------------------------------------------------------- /SpringBoard/Canna/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.canna 2 | Name: Canna 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: iOS 6 (or custom) charging & lock sounds 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.canna 11 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.canna/depiction.json 12 | -------------------------------------------------------------------------------- /SpringBoard/Canna/layout/Library/Tweak Support/Canna/connect_power.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Luki120/SmallTweaks/112b385f22f937c41bd275695784d5b7008a6cb0/SpringBoard/Canna/layout/Library/Tweak Support/Canna/connect_power.caf -------------------------------------------------------------------------------- /SpringBoard/Canna/layout/Library/Tweak Support/Canna/lock.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Luki120/SmallTweaks/112b385f22f937c41bd275695784d5b7008a6cb0/SpringBoard/Canna/layout/Library/Tweak Support/Canna/lock.caf -------------------------------------------------------------------------------- /SpringBoard/DNDTimer/DNDTimer.m: -------------------------------------------------------------------------------- 1 | /*--- Set a custom duration for DND when toggling the cc module, 2 | made as a bounty, and before the publicly available alternative ---*/ 3 | 4 | #import "Utilities/Utilities.h" 5 | 6 | static NSNotificationName const DNDTimerDidResumeTimerNotification = @"DNDTimerDidResumeTimerNotification"; 7 | 8 | static void (*origHandlePressGesture)(CCUIButtonModuleView *, SEL, id); 9 | static void overrideHandlePressGesture(CCUIButtonModuleView *self, SEL _cmd, id gesture) { 10 | 11 | __block id observer; 12 | 13 | UIViewController *ancestor = [self _viewControllerForAncestor]; 14 | if(![ancestor isKindOfClass:NSClassFromString(@"DNDUIControlCenterModule")]) return origHandlePressGesture(self, _cmd, gesture); 15 | 16 | UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"DNDTimer" message:@"Select the time you wish for DND to be active. It has to be inputted in minutes." preferredStyle:UIAlertControllerStyleAlert]; 17 | 18 | overrideUserInterfaceStyle(alertController); 19 | 20 | UIAlertAction *setDNDTimerAction = [UIAlertAction actionWithTitle:@"Confirm" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { 21 | 22 | activateDND(); 23 | dndTimer = [NSTimer scheduledTimerWithTimeInterval:alertController.textFields.firstObject.text.doubleValue * 60 target:self selector:@selector(stock_deactivateDND) userInfo:nil repeats:NO]; 24 | saveUserDefaults(); 25 | 26 | [NSNotificationCenter.defaultCenter removeObserver: observer]; 27 | 28 | }]; 29 | setDNDTimerAction.enabled = NO; 30 | 31 | UIAlertAction *resetDNDTimerAction = [UIAlertAction actionWithTitle:@"Reset Timer" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) { 32 | 33 | [dndTimer invalidate]; 34 | dndTimer = nil; 35 | tearDownDND(); 36 | 37 | [NSNotificationCenter.defaultCenter removeObserver: observer]; 38 | 39 | }]; 40 | 41 | addTextFieldWithConfigurationHandlerForAlertController(alertController, ^(UITextField *textField) { 42 | 43 | configureTextFieldForTextField(textField); 44 | 45 | observer = [NSNotificationCenter.defaultCenter addObserverForName:UITextFieldTextDidChangeNotification object:textField queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { 46 | setDNDTimerAction.enabled = textField.text.integerValue != 0; 47 | }]; 48 | 49 | }); 50 | 51 | [alertController addAction: setDNDTimerAction]; 52 | [alertController addAction: resetDNDTimerAction]; 53 | 54 | [[RootWindow keyWindow].rootViewController presentViewController:alertController animated:YES completion:^{ 55 | 56 | createTapRecognizerForAlertController(alertController, self, @selector(stock_didTapView)); 57 | 58 | }]; 59 | 60 | } 61 | 62 | static void new_stock_didTapView(CCUIButtonModuleView *self, SEL _cmd) { dismissVCAnimated(); } 63 | static void new_stock_deactivateDND(CCUIButtonModuleView *self, SEL _cmd) { tearDownDND(); } 64 | 65 | static void (*origSetSelected)(FlipConvert_PlaceHolder *, SEL, BOOL); 66 | static void overrideSetSelected(FlipConvert_PlaceHolder *self, SEL _cmd, BOOL selected) { 67 | 68 | if(![self.flipConvert_id isEqualToString:@"com.a3tweaks.switch.do-not-disturb"]) return origSetSelected(self, _cmd, selected); 69 | 70 | if(!selected) { 71 | 72 | __block id observer; 73 | 74 | UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"DNDTimer" message:@"Select the time you wish for DND to be active. Time has to be inputted in minutes." preferredStyle:UIAlertControllerStyleAlert]; 75 | 76 | overrideUserInterfaceStyle(alertController); 77 | 78 | UIAlertAction *setDNDTimerAction = [UIAlertAction actionWithTitle:@"Confirm" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { 79 | 80 | origSetSelected(self, _cmd, selected); // the method enables/disables DND by itself so no need to do it myself :TimPog: 81 | dndTimer = [NSTimer scheduledTimerWithTimeInterval:alertController.textFields.firstObject.text.doubleValue * 60 target:self selector:@selector(flipConvert_deactivateDND) userInfo:nil repeats:NO]; 82 | saveUserDefaults(); 83 | 84 | [NSNotificationCenter.defaultCenter removeObserver: observer]; 85 | 86 | }]; 87 | 88 | UIAlertAction *resetDNDTimerAction = [UIAlertAction actionWithTitle:@"Reset Timer" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) { 89 | 90 | [dndTimer invalidate]; 91 | dndTimer = nil; 92 | 93 | [NSNotificationCenter.defaultCenter removeObserver: observer]; 94 | 95 | }]; 96 | 97 | addTextFieldWithConfigurationHandlerForAlertController(alertController, ^(UITextField *textField) { 98 | 99 | configureTextFieldForTextField(textField); 100 | 101 | observer = [NSNotificationCenter.defaultCenter addObserverForName:UITextFieldTextDidChangeNotification object:textField queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { 102 | setDNDTimerAction.enabled = textField.text.integerValue != 0; 103 | }]; 104 | 105 | }); 106 | 107 | [alertController addAction: setDNDTimerAction]; 108 | [alertController addAction: resetDNDTimerAction]; 109 | 110 | [[RootWindow keyWindow].rootViewController presentViewController:alertController animated:YES completion:^{ 111 | 112 | createTapRecognizerForAlertController(alertController, self, @selector(flipConvert_didTapView)); 113 | 114 | }]; 115 | 116 | } 117 | 118 | else if(!selected) origSetSelected(self, _cmd, selected); // we need to call this so the toggle doesn't get stuck in the selected state 119 | 120 | } 121 | 122 | static void new_flipConvert_didTapView(FlipConvert_PlaceHolder *self, SEL _cmd) { dismissVCAnimated(); } 123 | static void new_flipConvert_deactivateDND(FlipConvert_PlaceHolder *self, SEL _cmd) { [self setSelected: NO]; } 124 | 125 | static id observer; 126 | static id sbObserver; 127 | 128 | static void appDidFinishLaunching() { 129 | 130 | sbObserver = [NSNotificationCenter.defaultCenter addObserverForName:UIApplicationDidFinishLaunchingNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { 131 | 132 | observer = [NSNotificationCenter.defaultCenter addObserverForName:DNDTimerDidResumeTimerNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { 133 | tearDownDND(); 134 | [NSNotificationCenter.defaultCenter removeObserver: observer]; 135 | }]; 136 | 137 | [NSNotificationCenter.defaultCenter removeObserver: sbObserver]; 138 | 139 | }]; 140 | 141 | } 142 | 143 | static void resumeTimer() { 144 | 145 | timerDate = [NSUserDefaults.standardUserDefaults objectForKey:@"dndTimerValue"]; 146 | NSTimeInterval timeInterval = [timerDate timeIntervalSinceNow]; 147 | 148 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, timeInterval * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ 149 | 150 | [NSNotificationCenter.defaultCenter postNotificationName:DNDTimerDidResumeTimerNotification object:nil]; 151 | 152 | }); 153 | 154 | } 155 | 156 | @class SBBacklightController; 157 | 158 | static void (*origTurnOnScreenFullyWithBacklightSource)(SBBacklightController *, SEL, NSInteger); 159 | static void overrideTurnOnScreenFullyWithBacklightSource(SBBacklightController *self, SEL _cmd, NSInteger source) { 160 | 161 | origTurnOnScreenFullyWithBacklightSource(self, _cmd, source); 162 | resumeTimer(); 163 | 164 | } 165 | 166 | __attribute__((constructor)) static void init() { 167 | 168 | appDidFinishLaunching(); 169 | resumeTimer(); 170 | 171 | if(!kIsFlipConvertInstalled) { 172 | 173 | MSHookMessageEx(NSClassFromString(@"CCUIButtonModuleView"), @selector(_handlePressGesture:), (IMP) &overrideHandlePressGesture, (IMP *) &origHandlePressGesture); 174 | 175 | class_addMethod(kClass(@"CCUIButtonModuleView"), @selector(stock_didTapView), (IMP) &new_stock_didTapView, "v@:"); 176 | class_addMethod(kClass(@"CCUIButtonModuleView"), @selector(stock_deactivateDND), (IMP) &new_stock_deactivateDND, "v@:"); 177 | 178 | } 179 | 180 | else { 181 | 182 | MSHookMessageEx(NSClassFromString(@"FlipConvert_PlaceHolder"), @selector(setSelected:), (IMP) &overrideSetSelected, (IMP *) &origSetSelected); 183 | 184 | class_addMethod(kClass(@"FlipConvert_PlaceHolder"), @selector(flipConvert_didTapView), (IMP) &new_flipConvert_didTapView, "v@:"); 185 | class_addMethod(kClass(@"FlipConvert_PlaceHolder"), @selector(flipConvert_deactivateDND), (IMP) &new_flipConvert_deactivateDND, "v@:"); 186 | 187 | } 188 | 189 | MSHookMessageEx(NSClassFromString(@"SBBacklightController"), @selector(turnOnScreenFullyWithBacklightSource:), (IMP) &overrideTurnOnScreenFullyWithBacklightSource, (IMP *) &origTurnOnScreenFullyWithBacklightSource); 190 | 191 | } 192 | -------------------------------------------------------------------------------- /SpringBoard/DNDTimer/DNDTimer.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /SpringBoard/DNDTimer/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:14.0 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = DNDTimer 5 | 6 | DNDTimer_FILES = DNDTimer.m Utilities/RootWindow.m 7 | DNDTimer_CFLAGS = -fobjc-arc 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/tweak.mk 11 | -------------------------------------------------------------------------------- /SpringBoard/DNDTimer/Utilities/RootWindow.h: -------------------------------------------------------------------------------- 1 | @import UIKit; 2 | 3 | 4 | @interface RootWindow : NSObject 5 | + (UIWindow *)keyWindow; 6 | @end 7 | -------------------------------------------------------------------------------- /SpringBoard/DNDTimer/Utilities/RootWindow.m: -------------------------------------------------------------------------------- 1 | #import "RootWindow.h" 2 | 3 | 4 | @implementation RootWindow 5 | 6 | + (UIWindow *)keyWindow { 7 | 8 | UIWindow *rootWindow = nil; 9 | NSArray *windows = UIApplication.sharedApplication.windows; 10 | 11 | for(UIWindow *window in windows) 12 | 13 | if(window.isKeyWindow) { 14 | rootWindow = window; 15 | break; 16 | } 17 | 18 | return rootWindow; 19 | 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /SpringBoard/DNDTimer/Utilities/Utilities.h: -------------------------------------------------------------------------------- 1 | @import CydiaSubstrate; 2 | #import 3 | #import "RootWindow.h" 4 | 5 | 6 | #define kClass(string) NSClassFromString(string) 7 | #define kUserInterfaceStyle UIScreen.mainScreen.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark 8 | #define kIsFlipConvertInstalled dlopen("/Library/MobileSubstrate/DynamicLibraries/z_FlipConvert.dylib", RTLD_LAZY) 9 | 10 | static NSTimer *dndTimer; 11 | static NSDate *timerDate; 12 | 13 | @interface CCUIToggleModule : NSObject 14 | - (void)setSelected:(BOOL)selected; 15 | @end 16 | 17 | 18 | @interface FlipConvert_PlaceHolder : CCUIToggleModule 19 | @property (nonatomic, copy) NSString *flipConvert_id; 20 | @end 21 | 22 | 23 | @interface CCUIButtonModuleView : UIView 24 | - (UIViewController *)_viewControllerForAncestor; 25 | @end 26 | 27 | 28 | @interface DNDModeAssertionDetails : NSObject 29 | + (id)userRequestedAssertionDetailsWithIdentifier:(id)arg1 modeIdentifier:(id)arg2 lifetime:(id)arg3; 30 | @end 31 | 32 | 33 | @interface DNDModeAssertionService : NSObject 34 | + (id)serviceForClientIdentifier:(id)arg1; 35 | - (id)takeModeAssertionWithDetails:(id)arg1 error:(id *)arg2; 36 | - (BOOL)invalidateAllActiveModeAssertionsWithError:(id *)arg1; 37 | @end 38 | 39 | /*--- do yourself a favor and become a giga chad by avoiding code duplication 40 | as much as possible :frCoal: ---*/ 41 | 42 | static void activateDND() { 43 | 44 | DNDModeAssertionService *assertionService = (DNDModeAssertionService *)[kClass(@"DNDModeAssertionService") serviceForClientIdentifier:@"com.apple.donotdisturb.control-center.module"]; 45 | DNDModeAssertionDetails *newAssertion = [NSClassFromString(@"DNDModeAssertionDetails") userRequestedAssertionDetailsWithIdentifier:@"com.apple.control-center.manual-toggle" modeIdentifier:@"com.apple.donotdisturb.mode.default" lifetime:nil]; 46 | [assertionService takeModeAssertionWithDetails:newAssertion error:NULL]; 47 | [NSNotificationCenter.defaultCenter postNotificationName:@"SBQuietModeStatusChangedNotification" object:nil]; 48 | 49 | } 50 | 51 | static void tearDownDND() { 52 | 53 | DNDModeAssertionService *assertionService = (DNDModeAssertionService *)[kClass(@"DNDModeAssertionService") serviceForClientIdentifier:@"com.apple.donotdisturb.control-center.module"]; 54 | [assertionService invalidateAllActiveModeAssertionsWithError:NULL]; 55 | [NSNotificationCenter.defaultCenter postNotificationName:@"SBQuietModeStatusChangedNotification" object:nil]; 56 | 57 | } 58 | 59 | static void saveUserDefaults() { 60 | 61 | timerDate = dndTimer.fireDate; 62 | [NSUserDefaults.standardUserDefaults setObject:timerDate forKey:@"dndTimerValue"]; 63 | 64 | } 65 | 66 | static void overrideUserInterfaceStyle(UIAlertController *controller) { 67 | 68 | /*--- The CC forces light mode, so we have to manually set the styles smh ---*/ 69 | controller.overrideUserInterfaceStyle = kUserInterfaceStyle ? UIUserInterfaceStyleDark : UIUserInterfaceStyleLight; 70 | 71 | } 72 | 73 | static void addTextFieldWithConfigurationHandlerForAlertController( 74 | UIAlertController *controller, 75 | void(^handler)(UITextField *textField)) { 76 | 77 | [controller addTextFieldWithConfigurationHandler: handler]; 78 | 79 | } 80 | 81 | static void configureTextFieldForTextField(UITextField *textField) { 82 | 83 | textField.placeholder = @"Example: 60"; 84 | textField.keyboardType = UIKeyboardTypeNumberPad; 85 | 86 | } 87 | 88 | static void createTapRecognizerForAlertController(UIAlertController *controller, id self, SEL selector) { 89 | 90 | controller.view.superview.userInteractionEnabled = YES; 91 | 92 | UITapGestureRecognizer *gestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action: selector]; 93 | [controller.view.superview addGestureRecognizer: gestureRecognizer]; 94 | 95 | } 96 | 97 | static void dismissVCAnimated() { 98 | 99 | [[RootWindow keyWindow].rootViewController dismissViewControllerAnimated:YES completion:nil]; 100 | 101 | } 102 | -------------------------------------------------------------------------------- /SpringBoard/DNDTimer/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.dndtimer 2 | Name: DNDTimer 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: Enable DND for custom time periods 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | -------------------------------------------------------------------------------- /SpringBoard/FuckThatAnimation/FuckThatAnimation.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /SpringBoard/FuckThatAnimation/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:latest 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = FuckThatAnimation 5 | 6 | FuckThatAnimation_FILES = Tweak.m 7 | FuckThatAnimation_CFLAGS = -fobjc-arc 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/tweak.mk 11 | -------------------------------------------------------------------------------- /SpringBoard/FuckThatAnimation/Tweak.m: -------------------------------------------------------------------------------- 1 | /* --- Removes the cc labels and fade out when you toggle 2 | a module, e.g "Low Power: On" ---*/ 3 | 4 | @import UIKit; 5 | @import CydiaSubstrate; 6 | 7 | 8 | @interface CCUIStatusLabel : UILabel 9 | @end 10 | 11 | 12 | @interface CCUIStatusLabelViewController : UIViewController 13 | @end 14 | 15 | 16 | static void overrideDelegateWBSU(CCUIStatusLabelViewController *self, SEL _cmd) {} 17 | 18 | static void(*origDMTW)(CCUIStatusLabel *, SEL); 19 | static void overrideDMTW(CCUIStatusLabel *self, SEL _cmd) { 20 | 21 | origDMTW(self, _cmd); 22 | self.hidden = YES; 23 | 24 | } 25 | 26 | __attribute__((constructor)) static void init() { 27 | 28 | MSHookMessageEx(NSClassFromString(@"CCUIStatusLabel"), @selector(didMoveToWindow), (IMP) &overrideDMTW, (IMP *) &origDMTW); 29 | MSHookMessageEx(NSClassFromString(@"CCUIStatusLabelViewController"), @selector(_notifyDelegateWillBeginStatusUpdates), (IMP) &overrideDelegateWBSU, (IMP *) NULL); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /SpringBoard/FuckThatAnimation/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.fuckthatanimation 2 | Name: FuckThatAnimation 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: Another yet awesome mobile substrate tweak to the list 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | Icon: https://raw.githubusercontent.com/Luki120/luki120.github.io/master/assets/Tweaks/SpringBoard/FuckThatAnimation/FTA.png 11 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.fuckthatanimation 12 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.fuckthatanimation/depiction.json 13 | -------------------------------------------------------------------------------- /SpringBoard/Hello/Hello.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /SpringBoard/Hello/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:latest 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = Hello 5 | 6 | Hello_FILES = Tweak.m 7 | Hello_CFLAGS = -fobjc-arc 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/tweak.mk 11 | -------------------------------------------------------------------------------- /SpringBoard/Hello/Tweak.m: -------------------------------------------------------------------------------- 1 | /*--- Change the status bar string to a "Hello" one with a nice good looking font, 2 | credits to ETHN for the font included in his tweak Greeting ---*/ 3 | 4 | // context -> https://www.reddit.com/r/jailbreak/comments/s3oa5y/question_anyone_know_this_tweak_or_how_to_replace/ 5 | // but anyways fuck that sub and their discord :frCoal: 6 | 7 | @import UIKit; 8 | @import CoreText; 9 | @import CydiaSubstrate; 10 | #import 11 | 12 | #define jbRootPath(path) ROOT_PATH_NS(path) 13 | 14 | 15 | @interface _UIStatusBarStringView : UILabel 16 | @end 17 | 18 | 19 | static NSString *timeString = nil; 20 | 21 | #define kClass(string) NSClassFromString(string) 22 | 23 | static id (*origIWF)(_UIStatusBarStringView *, SEL, CGRect); 24 | static id overrideIWF(_UIStatusBarStringView *self, SEL _cmd, CGRect frame) { // load font 25 | 26 | NSString *fontPath = jbRootPath(@"/Library/Tweak Support/Hello/IntroScript-Bold.ttf"); 27 | 28 | NSData *fontData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath: fontPath]]; 29 | CFErrorRef error; 30 | CGDataProviderRef provider = CGDataProviderCreateWithCFData((CFDataRef)fontData); 31 | CGFontRef font = CGFontCreateWithDataProvider(provider); 32 | 33 | if(!CTFontManagerRegisterGraphicsFont(font, &error)) { 34 | CFStringRef errorDescription = CFErrorCopyDescription(error); 35 | CFRelease(errorDescription); 36 | } 37 | 38 | CFRelease(font); 39 | CFRelease(provider); 40 | 41 | return origIWF(self, _cmd, frame); 42 | 43 | } 44 | 45 | static void (*origST)(_UIStatusBarStringView *, SEL, NSString *); 46 | static void overrideST(_UIStatusBarStringView *self, SEL _cmd, NSString *origString) { 47 | 48 | if(![origString containsString: @":"]) return origST(self, _cmd, origString); 49 | 50 | origST(self, _cmd, origString); 51 | 52 | static dispatch_once_t onceToken; 53 | dispatch_once(&onceToken, ^{ 54 | 55 | timeString = origString; 56 | origST(self, _cmd, @"hello."); 57 | [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(crossDissolveLabel) userInfo:nil repeats:NO]; 58 | 59 | }); 60 | 61 | } 62 | 63 | static void (*origDMTS)(_UIStatusBarStringView *, SEL); 64 | static void overrideDMTS(_UIStatusBarStringView *self, SEL _cmd) { 65 | 66 | if(![self.text containsString: @"hello."]) return origDMTS(self, _cmd); 67 | 68 | origDMTS(self, _cmd); 69 | self.font = [UIFont fontWithName:@"IntroScript-Bold" size: 14]; 70 | 71 | } 72 | 73 | static void new_crossDissolveLabel(_UIStatusBarStringView *self, SEL _cmd) { 74 | 75 | [UIView transitionWithView:self duration:0.5 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{ 76 | 77 | origST(self, _cmd, @""); 78 | origST(self, _cmd, timeString); 79 | self.font = [UIFont systemFontOfSize:12 weight: UIFontWeightSemibold]; 80 | 81 | } completion:nil]; 82 | 83 | } 84 | 85 | __attribute__((constructor)) static void init(void) { 86 | 87 | MSHookMessageEx(kClass(@"_UIStatusBarStringView"), @selector(initWithFrame:), (IMP) &overrideIWF, (IMP *) &origIWF); 88 | MSHookMessageEx(kClass(@"_UIStatusBarStringView"), @selector(setText:), (IMP) &overrideST, (IMP *) &origST); 89 | MSHookMessageEx(kClass(@"_UIStatusBarStringView"), @selector(didMoveToSuperview), (IMP) &overrideDMTS, (IMP *) &origDMTS); 90 | 91 | class_addMethod( 92 | kClass(@"_UIStatusBarStringView"), 93 | @selector(crossDissolveLabel), 94 | (IMP) &new_crossDissolveLabel, 95 | "v@:" 96 | ); 97 | 98 | } 99 | -------------------------------------------------------------------------------- /SpringBoard/Hello/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.hello 2 | Name: Hello 3 | Version: 0.9.2 4 | Architecture: iphoneos-arm 5 | Description: Yet again another awesome MobileSubstrate tweak 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.hello 11 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.hello/depiction.json 12 | -------------------------------------------------------------------------------- /SpringBoard/Hello/layout/Library/Tweak Support/Hello/IntroScript-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Luki120/SmallTweaks/112b385f22f937c41bd275695784d5b7008a6cb0/SpringBoard/Hello/layout/Library/Tweak Support/Hello/IntroScript-Bold.ttf -------------------------------------------------------------------------------- /SpringBoard/Hislerim/Hislerim.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /SpringBoard/Hislerim/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:latest 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = Hislerim 5 | 6 | Hislerim_FILES = Tweak.m 7 | Hislerim_CFLAGS = -fobjc-arc 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/tweak.mk 11 | -------------------------------------------------------------------------------- /SpringBoard/Hislerim/Tweak.m: -------------------------------------------------------------------------------- 1 | /*--- Lock your device by double tapping on HS ---*/ 2 | 3 | 4 | @import UIKit; 5 | @import CydiaSubstrate; 6 | @import AudioToolbox.AudioServices; 7 | 8 | 9 | @interface SBHomeScreenViewController : UIViewController 10 | @end 11 | 12 | 13 | @interface SpringBoard : UIApplication 14 | - (void)_simulateLockButtonPress; 15 | @end 16 | 17 | 18 | static void (*origVDL)(SBHomeScreenViewController *, SEL); 19 | static void overrideVDL(SBHomeScreenViewController *self, SEL _cmd) { 20 | 21 | origVDL(self, _cmd); 22 | 23 | UITapGestureRecognizer *gestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hs_didDoubleTapHS)]; 24 | gestureRecognizer.numberOfTapsRequired = 2; 25 | [self.view addGestureRecognizer: gestureRecognizer]; 26 | 27 | } 28 | 29 | static void new_hs_didDoubleTapHS(SBHomeScreenViewController *self, SEL _cmd) { 30 | 31 | AudioServicesPlaySystemSound(1521); 32 | 33 | // https://github.com/schneelittchen/Puck 34 | SpringBoard *sb = (SpringBoard *)[NSClassFromString(@"SpringBoard") sharedApplication]; 35 | [sb _simulateLockButtonPress]; 36 | 37 | } 38 | 39 | __attribute__((constructor)) static void init() { 40 | 41 | MSHookMessageEx(NSClassFromString(@"SBHomeScreenViewController"), @selector(viewDidLoad), (IMP) &overrideVDL, (IMP *) &origVDL); 42 | 43 | class_addMethod( 44 | NSClassFromString(@"SBHomeScreenViewController"), 45 | @selector(hs_didDoubleTapHS), 46 | (IMP) &new_hs_didDoubleTapHS, 47 | "v@:" 48 | ); 49 | 50 | } 51 | -------------------------------------------------------------------------------- /SpringBoard/Hislerim/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.hislerim 2 | Name: Hislerim 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: Lock your device by double tapping on HS 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.hislerim 11 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.hislerim/depiction.json 12 | -------------------------------------------------------------------------------- /SpringBoard/IWantTranslucent/IWantTranslucent.plist: -------------------------------------------------------------------------------- 1 | { 2 | Filter = { 3 | Classes = ( 4 | "_UIContextMenuListView", 5 | "_UIContextMenuHeaderView", 6 | "_UIContextMenuTitleView", 7 | "_UIContextMenuReusableSeparatorView", 8 | "_UIElasticContextMenuBackgroundView", 9 | "_UIContextMenuActionsListTitleView", 10 | "_UIContextMenuActionsListSeparatorView", 11 | "UICollectionReusableView", 12 | "CCUIMenuModuleItemView", 13 | "MRUNowPlayingContainerView", 14 | "MRURoutingHeaderView", 15 | "MRURoutingTableViewCell" 16 | ); 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /SpringBoard/IWantTranslucent/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:14.0 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = IWantTranslucent 5 | 6 | IWantTranslucent_FILES = Tweak.m 7 | IWantTranslucent_CFLAGS = -fobjc-arc 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/tweak.mk 11 | -------------------------------------------------------------------------------- /SpringBoard/IWantTranslucent/Tweak.m: -------------------------------------------------------------------------------- 1 | /*--- Gets rid of the ugly blur effects present 2 | in the context menus & replaces them with a clean 3 | translucent look + hides separators system wide ---*/ 4 | 5 | @import UIKit; 6 | @import CydiaSubstrate; 7 | 8 | 9 | @interface _UIContextMenuActionsListTitleView : UIView 10 | @end 11 | 12 | 13 | @interface _UIContextMenuHeaderView : UIView 14 | @property (nonatomic, strong) UIVisualEffectView *bgView; 15 | @end 16 | 17 | 18 | @interface MRUNowPlayingContainerView : UIView 19 | @property (nonatomic, strong) UIView *separatorView; 20 | @end 21 | 22 | 23 | @class CCUIMenuModuleItemView; 24 | @class _UIContextMenuTitleView; 25 | 26 | #define kClass(string) NSClassFromString(string) 27 | #define kOSVersion [[UIDevice currentDevice].systemVersion floatValue] 28 | 29 | // ! iOS 14+ 30 | 31 | // Translucency 32 | static void (*origSetBackgroundView)(UIView *, SEL, UIVisualEffectView *); 33 | static void overrideSetBackgroundView(UIView *self, SEL _cmd, UIVisualEffectView *visualEffectView) { 34 | 35 | origSetBackgroundView(self, _cmd, visualEffectView); 36 | visualEffectView.alpha = 0.5; 37 | 38 | } 39 | 40 | // Separators 41 | static void (*origContextMenuSeparatorDMTW)(UIView *, SEL); 42 | static void overrideContextMenuSeparatorDMTW(UIView *self, SEL _cmd) { 43 | 44 | origContextMenuSeparatorDMTW(self, _cmd); 45 | [self removeFromSuperview]; 46 | 47 | } 48 | 49 | // Thick context menu separator 50 | static void (*origUICollectionReusableViewDMTW)(UICollectionReusableView *, SEL); 51 | static void overrideUICollectionReusableViewDMTW(UICollectionReusableView *self, SEL _cmd) { 52 | 53 | origUICollectionReusableViewDMTW(self, _cmd); 54 | 55 | NSString *reuseIdentifier; 56 | 57 | if(kOSVersion >= 15.0) reuseIdentifier = @"kContextMenuSectionSeparator"; 58 | else reuseIdentifier = @"kContextMenuItemSeparator"; 59 | 60 | if(![self.reuseIdentifier isEqualToString: reuseIdentifier]) return; 61 | self.hidden = YES; 62 | 63 | } 64 | 65 | // ! iOS 16 66 | 67 | static void (*origContextMenuHeaderDMTW)(_UIContextMenuHeaderView *, SEL); 68 | static void overrideContextMenuHeaderDMTW(_UIContextMenuHeaderView *self, SEL _cmd) { 69 | 70 | origContextMenuHeaderDMTW(self, _cmd); 71 | self.bgView.hidden = YES; 72 | 73 | } 74 | 75 | static double overrideHeaderSeparatorHeight(_UIContextMenuHeaderView *self, SEL _cmd) { return 0; } 76 | 77 | // ! iOS 15 78 | 79 | static UIVisualEffectView *overrideTitleBackgroundView(_UIContextMenuTitleView *self, SEL _cmd) { 80 | 81 | return [UIVisualEffectView new]; 82 | 83 | } 84 | 85 | static UIView *overrideTitleSeparator(_UIContextMenuTitleView *self, SEL _cmd) { 86 | 87 | return [UIView new]; 88 | 89 | } 90 | 91 | // ! iOS 14 92 | 93 | static void (*origContextMenuTitleDMTW)(_UIContextMenuActionsListTitleView *, SEL); 94 | static void overrideContextMenuTitleDMTW(_UIContextMenuActionsListTitleView *self, SEL _cmd) { 95 | 96 | origContextMenuTitleDMTW(self, _cmd); 97 | 98 | for(UIView *view in self.subviews) { 99 | if(![view isKindOfClass: [UIVisualEffectView class]]) return; 100 | [view removeFromSuperview]; 101 | } 102 | 103 | } 104 | 105 | // ! Control Center 106 | 107 | // CC Bluetooth & WiFi expanded modules 108 | static CGFloat overrideSeparatorHeight(CCUIMenuModuleItemView *self, SEL _cmd) { return 0; } 109 | 110 | // CC media player airplay expanded module 111 | static void (*origMRUNowPlayingContainerViewDMTW)(MRUNowPlayingContainerView *, SEL); 112 | static void overrideMRUNowPlayingContainerViewDMTW(MRUNowPlayingContainerView *self, SEL _cmd) { 113 | 114 | origMRUNowPlayingContainerViewDMTW(self, _cmd); 115 | [self.separatorView removeFromSuperview]; 116 | 117 | } 118 | 119 | static UIView *overrideSeparatorView(UIView *self, SEL _cmd) { 120 | 121 | return [UIView new]; 122 | 123 | } 124 | 125 | __attribute__((constructor)) static void init(void) { 126 | 127 | if(kOSVersion >= 15.0) { 128 | MSHookMessageEx(kClass(@"_UIContextMenuListView"), @selector(setBackgroundView:), (IMP) &overrideSetBackgroundView, (IMP *) &origSetBackgroundView); 129 | MSHookMessageEx(kClass(@"_UIContextMenuTitleView"), @selector(bgView), (IMP) &overrideTitleBackgroundView, (IMP *) NULL); 130 | MSHookMessageEx(kClass(@"_UIContextMenuTitleView"), @selector(separator), (IMP) &overrideTitleSeparator, (IMP *) NULL); 131 | MSHookMessageEx(kClass(@"_UIContextMenuReusableSeparatorView"), @selector(didMoveToWindow), (IMP) &overrideContextMenuSeparatorDMTW, (IMP *) &origContextMenuSeparatorDMTW); 132 | 133 | if(kOSVersion >= 16.0) { 134 | MSHookMessageEx(kClass(@"_UIContextMenuHeaderView"), @selector(didMoveToWindow), (IMP) &overrideContextMenuHeaderDMTW, (IMP *) &origContextMenuHeaderDMTW); 135 | MSHookMessageEx(kClass(@"_UIContextMenuHeaderView"), @selector(_separatorHeight), (IMP) &overrideHeaderSeparatorHeight, (IMP *) NULL); 136 | } 137 | } 138 | 139 | else { 140 | MSHookMessageEx(kClass(@"_UIElasticContextMenuBackgroundView"), @selector(setVisualEffectView:), (IMP) &overrideSetBackgroundView, (IMP *) &origSetBackgroundView); 141 | MSHookMessageEx(kClass(@"_UIContextMenuActionsListTitleView"), @selector(didMoveToWindow), (IMP) &overrideContextMenuTitleDMTW, (IMP *) &origContextMenuTitleDMTW); 142 | MSHookMessageEx(kClass(@"_UIContextMenuActionsListSeparatorView"), @selector(didMoveToWindow), (IMP) &overrideContextMenuSeparatorDMTW, (IMP *) &origContextMenuSeparatorDMTW); 143 | } 144 | 145 | for(NSString *class in @[@"MRURoutingHeaderView", @"MRURoutingTableViewCell"]) { 146 | MSHookMessageEx(kClass(class), @selector(separatorView), (IMP) &overrideSeparatorView, (IMP *) NULL); 147 | } 148 | 149 | MSHookMessageEx(kClass(@"CCUIMenuModuleItemView"), @selector(_separatorHeight), (IMP) &overrideSeparatorHeight, (IMP *) NULL); 150 | MSHookMessageEx(kClass(@"MRUNowPlayingContainerView"), @selector(didMoveToWindow), (IMP) &overrideMRUNowPlayingContainerViewDMTW, (IMP *) &origMRUNowPlayingContainerViewDMTW); 151 | MSHookMessageEx(kClass(@"UICollectionReusableView"), @selector(didMoveToWindow), (IMP) &overrideUICollectionReusableViewDMTW, (IMP *) &origUICollectionReusableViewDMTW); 152 | 153 | } 154 | -------------------------------------------------------------------------------- /SpringBoard/IWantTranslucent/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.iwanttranslucent 2 | Name: IWantTranslucent 3 | Version: 0.9.4 4 | Architecture: iphoneos-arm 5 | Description: An awesome MobileSubstrate tweak indeed 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | Icon: https://raw.githubusercontent.com/Luki120/luki120.github.io/master/assets/Tweaks/SpringBoard/IWantTranslucent/IWantTranslucent.png 11 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.iwanttranslucent 12 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.iwanttranslucent/depiction.json 13 | -------------------------------------------------------------------------------- /SpringBoard/Isla/Isla.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /SpringBoard/Isla/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:14.0 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = Isla 5 | 6 | Isla_FILES = Tweak.m View/IslaView.m 7 | Isla_CFLAGS = -fobjc-arc 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/tweak.mk 11 | -------------------------------------------------------------------------------- /SpringBoard/Isla/Tweak.m: -------------------------------------------------------------------------------- 1 | /*--- Netflix like volume HUD ---*/ 2 | 3 | @import libhooker.libblackjack; 4 | #import "View/IslaView.h" 5 | 6 | 7 | static IslaView *islaView; 8 | 9 | static void (*origVDL)(UIViewController *, SEL); 10 | static void overrideVDL(UIViewController *self, SEL _cmd) { 11 | 12 | origVDL(self, _cmd); 13 | for(UIView *subview in self.view.subviews) { 14 | if(subview == islaView) continue; 15 | subview.hidden = YES; 16 | } 17 | 18 | if(!islaView) islaView = [IslaView new]; 19 | islaView.alpha = 0; 20 | islaView.transform = CGAffineTransformMakeTranslation(0, -20); 21 | if(![islaView isDescendantOfView: self.view]) [self.view addSubview: islaView]; 22 | 23 | [NSLayoutConstraint activateConstraints:@[ 24 | [islaView.centerXAnchor constraintEqualToAnchor: self.view.centerXAnchor], 25 | [islaView.topAnchor constraintEqualToAnchor: self.view.topAnchor constant: 20], 26 | [islaView.widthAnchor constraintEqualToConstant: 265], 27 | [islaView.heightAnchor constraintEqualToConstant: 30] 28 | ]]; 29 | 30 | } 31 | 32 | static void (*origVWA)(UIViewController *, SEL, BOOL); 33 | static void overrideVWA(UIViewController *self, SEL _cmd, BOOL animated) { 34 | 35 | origVWA(self, _cmd, animated); 36 | 37 | [UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ 38 | 39 | islaView.transform = CGAffineTransformMakeTranslation(0, 0); 40 | islaView.alpha = 1; 41 | 42 | } completion:nil]; 43 | 44 | } 45 | 46 | __attribute__((constructor)) static void init(void) { 47 | 48 | Class VolumeHUDVC; 49 | 50 | if(@available(iOS 15.0, *)) 51 | VolumeHUDVC = NSClassFromString(@"SBElasticHUDViewController"); 52 | 53 | else VolumeHUDVC = NSClassFromString(@"SBVolumeHUDViewController"); 54 | 55 | LBHookMessage(VolumeHUDVC, @selector(viewDidLoad), &overrideVDL, &origVDL); 56 | LBHookMessage(VolumeHUDVC, @selector(viewWillAppear:), &overrideVWA, &origVWA); 57 | 58 | } 59 | -------------------------------------------------------------------------------- /SpringBoard/Isla/View/IslaView.h: -------------------------------------------------------------------------------- 1 | @import UIKit; 2 | 3 | 4 | @interface IslaView : UIView 5 | @end 6 | -------------------------------------------------------------------------------- /SpringBoard/Isla/View/IslaView.m: -------------------------------------------------------------------------------- 1 | @import AVFoundation; 2 | #import "IslaView.h" 3 | 4 | 5 | @implementation IslaView { 6 | 7 | UIStackView *islaStackView; 8 | UIImageView *islaSpeakerImageView; 9 | UIView *islaHudView; 10 | UIView *islaSliderView; 11 | NSLayoutConstraint *islaSliderWidthAnchorConstraint; 12 | float outputVolume; 13 | 14 | } 15 | 16 | static NSDictionary *views; 17 | 18 | - (id)init { 19 | 20 | self = [super init]; 21 | if(!self) return nil; 22 | 23 | [self setupIslaView]; 24 | 25 | [[AVAudioSession sharedInstance] addObserver:self forKeyPath:@"outputVolume" options:0 context:nil]; 26 | [[AVAudioSession sharedInstance] setActive:YES error: nil]; 27 | 28 | outputVolume = [AVAudioSession sharedInstance].outputVolume; 29 | 30 | return self; 31 | 32 | } 33 | 34 | 35 | - (void)layoutSubviews { 36 | 37 | [super layoutSubviews]; 38 | [self layoutIslaView]; 39 | 40 | } 41 | 42 | 43 | - (void)setupIslaView { 44 | 45 | self.translatesAutoresizingMaskIntoConstraints = NO; 46 | 47 | if(!islaStackView) { 48 | islaStackView = [UIStackView new]; 49 | islaStackView.spacing = 5; 50 | islaStackView.alignment = UIStackViewAlignmentCenter; 51 | islaStackView.translatesAutoresizingMaskIntoConstraints = NO; 52 | [self addSubview: islaStackView]; 53 | } 54 | 55 | if(!islaSpeakerImageView) { 56 | UIImageSymbolConfiguration *configuration = [UIImageSymbolConfiguration configurationWithWeight: UIImageSymbolWeightBold]; 57 | 58 | islaSpeakerImageView = [UIImageView new]; 59 | islaSpeakerImageView.image = [UIImage systemImageNamed:@"speaker.wave.2" withConfiguration: configuration]; 60 | islaSpeakerImageView.tintColor = UIColor.labelColor; 61 | islaSpeakerImageView.contentMode = UIViewContentModeScaleAspectFit; 62 | islaSpeakerImageView.clipsToBounds = YES; 63 | islaSpeakerImageView.translatesAutoresizingMaskIntoConstraints = NO; 64 | [islaStackView addArrangedSubview: islaSpeakerImageView]; 65 | } 66 | 67 | if(!islaHudView) { 68 | islaHudView = [self setupUIViewWithBackgroundColor: UIColor.systemGrayColor]; 69 | [islaStackView addArrangedSubview: islaHudView]; 70 | } 71 | 72 | if(!islaSliderView) { 73 | islaSliderView = [self setupUIViewWithBackgroundColor: UIColor.labelColor]; 74 | [islaHudView addSubview: islaSliderView]; 75 | } 76 | 77 | } 78 | 79 | 80 | - (void)layoutIslaView { 81 | 82 | views = @{ 83 | @"islaStackView": islaStackView, 84 | @"islaSpeakerImageView": islaSpeakerImageView, 85 | @"islaHudView": islaHudView, 86 | @"islaSliderView": islaSliderView 87 | }; 88 | 89 | NSArray *formatStrings = @[ 90 | @"V:|-[islaStackView]-|", 91 | @"H:|-[islaStackView]-|", 92 | @"H:[islaSpeakerImageView(==15)]", 93 | @"V:[islaSpeakerImageView(==15)]", 94 | @"V:[islaHudView(==2)]", 95 | @"V:[islaSliderView(==2)]" 96 | ]; 97 | 98 | for(NSString *formatString in formatStrings) [self setupConstraintsWithFormat: formatString]; 99 | 100 | islaSliderWidthAnchorConstraint.active = NO; 101 | islaSliderWidthAnchorConstraint = [islaSliderView.widthAnchor constraintEqualToConstant: floor(outputVolume * 229)]; 102 | islaSliderWidthAnchorConstraint.active = YES; 103 | 104 | } 105 | 106 | // Reusable 107 | 108 | - (void)setupConstraintsWithFormat:(NSString *)format { 109 | 110 | [NSLayoutConstraint activateConstraints: 111 | [NSLayoutConstraint constraintsWithVisualFormat:format options:0 metrics:nil views: views]]; 112 | 113 | } 114 | 115 | 116 | - (UIView *)setupUIViewWithBackgroundColor:(UIColor *)color { 117 | 118 | UIView *view = [UIView new]; 119 | view.backgroundColor = color; 120 | view.layer.cornerCurve = kCACornerCurveContinuous; 121 | view.layer.cornerRadius = 1; 122 | view.translatesAutoresizingMaskIntoConstraints = NO; 123 | return view; 124 | 125 | } 126 | 127 | 128 | - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { 129 | 130 | float newVolume = [AVAudioSession sharedInstance].outputVolume; 131 | 132 | [UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ 133 | 134 | float newConstant = newVolume < 0.999 ? floor(newVolume * 229) : 229; 135 | 136 | islaSliderWidthAnchorConstraint.active = NO; 137 | islaSliderWidthAnchorConstraint = [islaSliderView.widthAnchor constraintEqualToConstant: newConstant]; 138 | islaSliderWidthAnchorConstraint.active = YES; 139 | 140 | [self layoutIfNeeded]; 141 | 142 | } completion:nil]; 143 | 144 | } 145 | 146 | 147 | - (void)dealloc { [[AVAudioSession sharedInstance] removeObserver:self forKeyPath:@"outputVolume"]; } 148 | 149 | @end 150 | -------------------------------------------------------------------------------- /SpringBoard/Isla/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.isla 2 | Name: Isla 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: Netflix like volume HUD 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.isla 11 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.isla/depiction.json 12 | -------------------------------------------------------------------------------- /SpringBoard/LegacyRings/LegacyRings.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /SpringBoard/LegacyRings/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:latest 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = LegacyRings 5 | 6 | LegacyRings_FILES = Tweak.m 7 | LegacyRings_CFLAGS = -fobjc-arc 8 | LegacyRings_LIBRARIES = kitten 9 | LegacyRings_PRIVATE_FRAMEWORKS = AppSupport 10 | 11 | include $(THEOS)/makefiles/common.mk 12 | include $(THEOS_MAKE_PATH)/tweak.mk 13 | -------------------------------------------------------------------------------- /SpringBoard/LegacyRings/Tweak.m: -------------------------------------------------------------------------------- 1 | /*--- Bring back the old iOS 9 keypad buttons ---*/ 2 | 3 | @import UIKit; 4 | @import libKitten; 5 | @import CydiaSubstrate; 6 | #import 7 | 8 | extern CFArrayRef CPBitmapCreateImagesFromData(CFDataRef cpbitmap, void *, int, void *); 9 | 10 | 11 | @interface TPNumberPadButton : UIButton 12 | @property (nonatomic, strong) UIView *circleView; 13 | @end 14 | 15 | 16 | static void (*origDMTW)(TPNumberPadButton *, SEL ); 17 | static void overrideDMTW(TPNumberPadButton *self, SEL _cmd) { 18 | 19 | origDMTW(self, _cmd); 20 | 21 | self.circleView.alpha = 0; 22 | self.circleView.backgroundColor = UIColor.clearColor; 23 | 24 | NSData *lsWallpaperData = [NSData dataWithContentsOfFile:@"/var/mobile/Library/SpringBoard/LockBackground.cpbitmap"]; 25 | CFDataRef lsWallpaperDataRef = (__bridge CFDataRef)lsWallpaperData; 26 | CFArrayRef imageArray = CPBitmapCreateImagesFromData(lsWallpaperDataRef, NULL, 1, NULL); 27 | UIImage *wallpaperImage = [UIImage imageWithCGImage:(CGImageRef)CFArrayGetValueAtIndex(imageArray, 0)]; 28 | CFRelease(imageArray); 29 | 30 | UIColor *primaryWallColor = [libKitten primaryColor: wallpaperImage]; 31 | 32 | CAShapeLayer *ringLayer = [CAShapeLayer new]; 33 | ringLayer.path = [UIBezierPath bezierPathWithOvalInRect: self.circleView.frame].CGPath; 34 | ringLayer.lineWidth = 2; 35 | ringLayer.fillColor = UIColor.clearColor.CGColor; 36 | ringLayer.strokeColor = primaryWallColor.CGColor; 37 | [self.layer insertSublayer:ringLayer atIndex:0]; 38 | 39 | } 40 | 41 | static BOOL overrideUsesButtonSaturationFilters(TPNumberPadButton *self, SEL _cmd) { return NO; } 42 | 43 | __attribute__((constructor)) static void init(void) { 44 | 45 | MSHookMessageEx(NSClassFromString(@"TPNumberPadButton"), @selector(didMoveToWindow), (IMP) &overrideDMTW, (IMP *) &origDMTW); 46 | MSHookMessageEx(objc_getMetaClass("TPNumberPadButton"), @selector(usesButtonSaturationFilters), (IMP) &overrideUsesButtonSaturationFilters, (IMP *) NULL); 47 | 48 | } 49 | -------------------------------------------------------------------------------- /SpringBoard/LegacyRings/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.legacyrings 2 | Name: LegacyRings 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: Bring back the old iOS 9 keypad buttons 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate, love.litten.libkitten 10 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.legacyrings 11 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.legacyrings/depiction.json 12 | -------------------------------------------------------------------------------- /SpringBoard/NetflixToggle/Common/Constants.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #define jbRootPath(path) ROOT_PATH_NS(path) 4 | #define kPrysm jbRootPath(@"/Library/MobileSubstrate/DynamicLibraries/Prysm.dylib") 5 | 6 | static NSNotificationName const NetflixToggleDidDismissPrysmCCNotification = @"NetflixToggleDidDismissPrysmCCNotification"; 7 | -------------------------------------------------------------------------------- /SpringBoard/NetflixToggle/Makefile: -------------------------------------------------------------------------------- 1 | export TARGET := iphone:clang:latest:latest 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | SUBPROJECTS += NetflixToggle PrysmHook 5 | 6 | include $(THEOS)/makefiles/common.mk 7 | include $(THEOS_MAKE_PATH)/bundle.mk 8 | include $(THEOS_MAKE_PATH)/aggregate.mk 9 | -------------------------------------------------------------------------------- /SpringBoard/NetflixToggle/NetflixToggle/Makefile: -------------------------------------------------------------------------------- 1 | BUNDLE_NAME = NetflixToggle 2 | 3 | NetflixToggle_FILES = NetflixToggle.m 4 | NetflixToggle_CFLAGS = -fobjc-arc 5 | NetflixToggle_INSTALL_PATH = /Library/ControlCenter/Bundles/ 6 | NetflixToggle_BUNDLE_EXTENSION = bundle 7 | NetflixToggle_PRIVATE_FRAMEWORKS = ControlCenterUIKit 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/bundle.mk 11 | -------------------------------------------------------------------------------- /SpringBoard/NetflixToggle/NetflixToggle/NetflixToggle.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Common/Constants.h" 3 | 4 | 5 | @interface NetflixToggle : CCUIToggleModule 6 | @end 7 | 8 | 9 | @interface UIApplication () 10 | - (BOOL)launchApplicationWithIdentifier:(id)arg1 suspended:(BOOL)arg2; 11 | @end 12 | -------------------------------------------------------------------------------- /SpringBoard/NetflixToggle/NetflixToggle/NetflixToggle.m: -------------------------------------------------------------------------------- 1 | #import "NetflixToggle.h" 2 | 3 | 4 | @implementation NetflixToggle 5 | 6 | - (void)setSelected:(BOOL)selected { 7 | 8 | [super setSelected: selected]; 9 | [UIApplication.sharedApplication launchApplicationWithIdentifier:@"com.netflix.Netflix" suspended:0]; 10 | 11 | if(![[NSFileManager defaultManager] fileExistsAtPath: kPrysm]) return; 12 | [NSNotificationCenter.defaultCenter postNotificationName:NetflixToggleDidDismissPrysmCCNotification object:nil]; 13 | 14 | } 15 | 16 | 17 | - (UIColor *)selectedColor { return UIColor.clearColor; } 18 | - (UIImage *)iconGlyph { 19 | 20 | return [UIImage imageNamed:@"NetflixToggle" inBundle:[NSBundle bundleForClass:[self class]] compatibleWithTraitCollection:nil]; 21 | 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /SpringBoard/NetflixToggle/NetflixToggle/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleName 6 | NetflixToggle 7 | CFBundleExecutable 8 | NetflixToggle 9 | CFBundleIdentifier 10 | me.luki.netflixtoggle 11 | CFBundleDevelopmentRegion 12 | English 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | MinimumOSVersion 22 | 7.0 23 | UIDeviceFamily 24 | 25 | 1 26 | 2 27 | 28 | NSPrincipalClass 29 | NetflixToggle 30 | CFBundleSupportedPlatforms 31 | 32 | iPhoneOS 33 | 34 | CCSGetModuleSizeAtRuntime 35 | 36 | CCSModuleSize 37 | 38 | Portrait 39 | 40 | Height 41 | 1 42 | Width 43 | 1 44 | 45 | Landscape 46 | 47 | Height 48 | 1 49 | Width 50 | 1 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /SpringBoard/NetflixToggle/NetflixToggle/Resources/LICENSE: -------------------------------------------------------------------------------- 1 | Icon from https://icons8.com/ 2 | -------------------------------------------------------------------------------- /SpringBoard/NetflixToggle/NetflixToggle/Resources/NetflixToggle@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Luki120/SmallTweaks/112b385f22f937c41bd275695784d5b7008a6cb0/SpringBoard/NetflixToggle/NetflixToggle/Resources/NetflixToggle@2x.png -------------------------------------------------------------------------------- /SpringBoard/NetflixToggle/NetflixToggle/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.netflixtoggle 2 | Name: NetflixToggle 3 | Depends: mobilesubstrate 4 | Version: 0.9.0 5 | Architecture: iphoneos-arm 6 | Description: An awesome Control Center module! 7 | Maintainer: Luki 8 | Author: Luki 9 | Section: Control Center (Modules) 10 | -------------------------------------------------------------------------------- /SpringBoard/NetflixToggle/PrysmHook/Makefile: -------------------------------------------------------------------------------- 1 | TWEAK_NAME = PrysmHook 2 | 3 | PrysmHook_FILES = PrysmHook.m 4 | PrysmHook_CFLAGS = -fobjc-arc 5 | 6 | include $(THEOS)/makefiles/common.mk 7 | include $(THEOS_MAKE_PATH)/tweak.mk 8 | -------------------------------------------------------------------------------- /SpringBoard/NetflixToggle/PrysmHook/PrysmHook.m: -------------------------------------------------------------------------------- 1 | /*--- Sample CC toggle to launch Netflix app ---*/ 2 | 3 | @import Foundation; 4 | @import CydiaSubstrate; 5 | #import "Common/Constants.h" 6 | 7 | 8 | @class PrysmMainPageViewController; 9 | 10 | static void (*origVDL)(PrysmMainPageViewController *, SEL); 11 | static void overrideVDL(PrysmMainPageViewController *self, SEL _cmd) { 12 | 13 | origVDL(self, _cmd); 14 | 15 | /*--- dismissControlCenter is a method from Prysm, 16 | so no need to make the implementation ourselves :weAreNotTheSame: ---*/ 17 | [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(dismissControlCenter) name:NetflixToggleDidDismissPrysmCCNotification object:nil]; 18 | 19 | } 20 | 21 | __attribute__((constructor)) static void init(void) { 22 | 23 | if(![[NSFileManager defaultManager] fileExistsAtPath: kPrysm]) return; 24 | MSHookMessageEx(NSClassFromString(@"PrysmMainPageViewController"), @selector(viewDidLoad), (IMP) &overrideVDL, (IMP *) &origVDL); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /SpringBoard/NetflixToggle/PrysmHook/PrysmHook.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /SpringBoard/NetflixToggle/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.netflixcctoggle 2 | Name: NetflixToggle 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: An awesome Control Center module! 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | -------------------------------------------------------------------------------- /SpringBoard/ReachSpring/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:latest 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = ReachSpring 5 | 6 | ReachSpring_FILES = Tweak.m 7 | ReachSpring_CFLAGS = -fobjc-arc 8 | ReachSpring_FRAMEWORKS = FrontBoardServices SpringBoardServices 9 | 10 | include $(THEOS)/makefiles/common.mk 11 | include $(THEOS_MAKE_PATH)/tweak.mk 12 | -------------------------------------------------------------------------------- /SpringBoard/ReachSpring/ReachSpring.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /SpringBoard/ReachSpring/Tweak.m: -------------------------------------------------------------------------------- 1 | /*--- Trigger respring with the reachability gesture ---*/ 2 | 3 | @import AudioToolbox.AudioServices; 4 | @import CydiaSubstrate; 5 | @import Foundation; 6 | #import 7 | #import 8 | #import 9 | #import 10 | 11 | @class SBReachabilityManager; 12 | 13 | static void overrideUpdateReachabilityModeActive(SBReachabilityManager *self, SEL _cmd, BOOL active) { 14 | 15 | if(!active) return; 16 | 17 | AudioServicesPlaySystemSound(1520); 18 | 19 | SBSRelaunchAction *restartAction = [SBSRelaunchAction actionWithReason:@"RestartRenderServer" options:SBSRelaunchActionOptionsFadeToBlackTransition targetURL: nil]; 20 | [[FBSSystemService sharedService] sendActions:[NSSet setWithObject:restartAction] withResult: nil]; 21 | 22 | } 23 | 24 | __attribute__((constructor)) static void init(void) { 25 | 26 | MSHookMessageEx(NSClassFromString(@"SBReachabilityManager"), @selector(_updateReachabilityModeActive:), (IMP) &overrideUpdateReachabilityModeActive, (IMP *) NULL); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /SpringBoard/ReachSpring/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.reachspring 2 | Name: ReachSpring 3 | Version: 0.9.2 4 | Architecture: iphoneos-arm 5 | Description: Respring smoothly and with ease invoking the reachability gesture 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.reachspring 11 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.reachspring/depiction.json 12 | -------------------------------------------------------------------------------- /SpringBoard/Ren/Headers/Common.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #define jbRootPath(path) ROOT_PATH_NS(path) 4 | #define kPath jbRootPath(@"/var/mobile/Library/Preferences/me.luki.renprefs.plist") 5 | -------------------------------------------------------------------------------- /SpringBoard/Ren/Headers/Prefs.h: -------------------------------------------------------------------------------- 1 | #import "Common.h" 2 | 3 | static CGFloat iconSize; 4 | static CGFloat widthDimension; 5 | static CGFloat heightDimension; 6 | static CGFloat sectionHorizontalPadding; 7 | 8 | static void loadShit(void) { 9 | 10 | NSDictionary *prefs = [[NSMutableDictionary alloc] initWithContentsOfFile: kPath]; 11 | 12 | iconSize = prefs[@"iconSize"] ? [prefs[@"iconSize"] floatValue] : 60; 13 | widthDimension = prefs[@"widthDimension"] ? [prefs[@"widthDimension"] floatValue] : 78; 14 | heightDimension = prefs[@"heightDimension"] ? [prefs[@"heightDimension"] floatValue] : 118.5; 15 | sectionHorizontalPadding = prefs[@"sectionHorizontalPadding"] ? [prefs[@"sectionHorizontalPadding"] floatValue] : 13; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /SpringBoard/Ren/Headers/Ren.h: -------------------------------------------------------------------------------- 1 | @import CydiaSubstrate; 2 | @import UIKit; 3 | #import "Prefs.h" 4 | 5 | 6 | @interface _UIActivityCollectionViewCompositionalLayout: UICollectionViewCompositionalLayout 7 | @property UICollectionViewCompositionalLayoutSectionProvider layoutSectionProvider; 8 | @end 9 | 10 | 11 | @interface UIAirDropGroupActivityCell: UICollectionViewCell 12 | @property (nonatomic, strong) UIView *imageSlotView; 13 | @end 14 | 15 | 16 | @interface UIShareGroupActivityCell: UICollectionViewCell 17 | @property (nonatomic, strong) UIView *imageSlotView; 18 | @end 19 | 20 | 21 | @interface _UIActivityActionCellTitleLabel : UILabel 22 | @end 23 | -------------------------------------------------------------------------------- /SpringBoard/Ren/Makefile: -------------------------------------------------------------------------------- 1 | export TARGET := iphone:clang:16.5:14.0 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = Ren 5 | 6 | Ren_FILES = Ren.m 7 | Ren_CFLAGS = -fobjc-arc 8 | Ren_PRIVATE_FRAMEWORKS = ShareSheet 9 | 10 | SUBPROJECTS = RenPrefs 11 | 12 | include $(THEOS)/makefiles/common.mk 13 | include $(THEOS_MAKE_PATH)/tweak.mk 14 | include $(THEOS_MAKE_PATH)/aggregate.mk 15 | -------------------------------------------------------------------------------- /SpringBoard/Ren/Ren.m: -------------------------------------------------------------------------------- 1 | /*--- Recreates the ShareSheet's main collection view's compositional layout 2 | in order to resize the items of the horizontal scroll views so that more of 3 | them can fit on the screen without scrolling. Made as a bounty ---*/ 4 | 5 | #import "Headers/Ren.h" 6 | 7 | 8 | @class _UIActivityContentCollectionView; 9 | 10 | static NSString *const kApplePhotosBundleID = @"com.apple.mobileslideshow"; 11 | 12 | static id (*origIWFC)(_UIActivityContentCollectionView *, SEL, CGRect, _UIActivityCollectionViewCompositionalLayout *); 13 | static id overrideIWFC(_UIActivityContentCollectionView *self, SEL _cmd, CGRect frame, _UIActivityCollectionViewCompositionalLayout *layout) { 14 | 15 | loadShit(); 16 | 17 | _UIActivityCollectionViewCompositionalLayout *compositionalLayout = [[_UIActivityCollectionViewCompositionalLayout alloc] initWithSectionProvider: ^(NSInteger sectionIndex, id layoutEnvironment) { 18 | 19 | if([[NSBundle mainBundle].bundleIdentifier isEqualToString: kApplePhotosBundleID]) { 20 | if(sectionIndex == 0 || sectionIndex > 2) 21 | return layout.layoutSectionProvider(sectionIndex, layoutEnvironment); 22 | } 23 | 24 | else if(sectionIndex > 1) return layout.layoutSectionProvider(sectionIndex, layoutEnvironment); 25 | 26 | NSCollectionLayoutSize *itemSize = [NSCollectionLayoutSize 27 | sizeWithWidthDimension:[NSCollectionLayoutDimension absoluteDimension: widthDimension] 28 | heightDimension:[NSCollectionLayoutDimension estimatedDimension: heightDimension] 29 | ]; 30 | NSCollectionLayoutItem *item = [NSCollectionLayoutItem itemWithLayoutSize: itemSize]; 31 | 32 | NSCollectionLayoutSize *groupSize = [NSCollectionLayoutSize 33 | sizeWithWidthDimension:[NSCollectionLayoutDimension absoluteDimension: widthDimension] 34 | heightDimension:[NSCollectionLayoutDimension estimatedDimension: heightDimension] 35 | ]; 36 | 37 | NSCollectionLayoutGroup *group = [NSCollectionLayoutGroup horizontalGroupWithLayoutSize:groupSize subitems: @[item]]; 38 | 39 | NSCollectionLayoutSection *section = [NSCollectionLayoutSection sectionWithGroup: group]; 40 | section.contentInsets = NSDirectionalEdgeInsetsMake(0, sectionHorizontalPadding, 0, sectionHorizontalPadding); 41 | section.orthogonalScrollingBehavior = UICollectionLayoutSectionOrthogonalScrollingBehaviorContinuous; 42 | 43 | return section; 44 | }]; 45 | 46 | return origIWFC(self, _cmd, frame, compositionalLayout); 47 | 48 | } 49 | 50 | static id (*origAirDropIWF)(UIAirDropGroupActivityCell *, SEL, CGRect); 51 | static id overrideAirDropIWF(UIAirDropGroupActivityCell *self, SEL _cmd, CGRect frame) { 52 | 53 | id orig = origAirDropIWF(self, _cmd, frame); 54 | 55 | [self.imageSlotView.widthAnchor constraintEqualToConstant: iconSize].active = YES; 56 | [self.imageSlotView.heightAnchor constraintEqualToConstant: iconSize].active = YES; 57 | 58 | return orig; 59 | 60 | } 61 | 62 | static void (*origAirDropLS)(UIAirDropGroupActivityCell *, SEL); 63 | static void overrideAirDropLS(UIAirDropGroupActivityCell *self, SEL _cmd) { 64 | 65 | origAirDropLS(self, _cmd); 66 | self.imageSlotView.layer.cornerRadius = iconSize / 2; 67 | 68 | } 69 | 70 | static id (*origShareGroupIWF)(UIShareGroupActivityCell *, SEL, CGRect); 71 | static id overrideShareGroupIWF(UIShareGroupActivityCell *self, SEL _cmd, CGRect frame) { 72 | 73 | id orig = origShareGroupIWF(self, _cmd, frame); 74 | 75 | [self.imageSlotView.widthAnchor constraintEqualToConstant: iconSize].active = YES; 76 | [self.imageSlotView.heightAnchor constraintEqualToConstant: iconSize].active = YES; 77 | 78 | return orig; 79 | 80 | } 81 | 82 | __attribute__((constructor)) static void init(void) { 83 | 84 | loadShit(); 85 | 86 | MSHookMessageEx(NSClassFromString(@"UIAirDropGroupActivityCell"), @selector(layoutSubviews), (IMP) &overrideAirDropLS, (IMP *) &origAirDropLS); 87 | MSHookMessageEx(NSClassFromString(@"UIAirDropGroupActivityCell"), @selector(initWithFrame:), (IMP) &overrideAirDropIWF, (IMP *) &origAirDropIWF); 88 | MSHookMessageEx(NSClassFromString(@"UIShareGroupActivityCell"), @selector(initWithFrame:), (IMP) &overrideShareGroupIWF, (IMP *) &origShareGroupIWF); 89 | MSHookMessageEx(NSClassFromString(@"_UIActivityContentCollectionView"), @selector(initWithFrame:collectionViewLayout:), (IMP) &overrideIWFC, (IMP *) &origIWFC); 90 | 91 | } 92 | -------------------------------------------------------------------------------- /SpringBoard/Ren/Ren.plist: -------------------------------------------------------------------------------- 1 | { 2 | Filter = { 3 | Classes = ( 4 | "_UIActivityContentCollectionView", 5 | "UIAirDropGroupActivityCell", 6 | "UIShareGroupActivityCell" 7 | ); 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /SpringBoard/Ren/RenPrefs/Makefile: -------------------------------------------------------------------------------- 1 | BUNDLE_NAME = RenPrefs 2 | 3 | RenPrefs_FILES = RenRootVC.m 4 | RenPrefs_CFLAGS = -fobjc-arc 5 | RenPrefs_FRAMEWORKS = UIKit 6 | RenPrefs_PRIVATE_FRAMEWORKS = Preferences 7 | RenPrefs_INSTALL_PATH = /Library/PreferenceBundles 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/bundle.mk 11 | -------------------------------------------------------------------------------- /SpringBoard/Ren/RenPrefs/RenRootVC.h: -------------------------------------------------------------------------------- 1 | #import "../Headers/Common.h" 2 | @import Preferences.PSSpecifier; 3 | @import Preferences.PSListController; 4 | 5 | 6 | @interface RenRootVC : PSListController 7 | @end 8 | -------------------------------------------------------------------------------- /SpringBoard/Ren/RenPrefs/RenRootVC.m: -------------------------------------------------------------------------------- 1 | #import "RenRootVC.h" 2 | 3 | @implementation RenRootVC 4 | 5 | - (NSArray *)specifiers { 6 | 7 | if(_specifiers) return _specifiers; 8 | _specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self]; 9 | 10 | return _specifiers; 11 | 12 | } 13 | 14 | - (id)readPreferenceValue:(PSSpecifier *)specifier { 15 | 16 | NSMutableDictionary *settings = [NSMutableDictionary dictionary]; 17 | [settings addEntriesFromDictionary:[NSDictionary dictionaryWithContentsOfFile: kPath]]; 18 | return settings[specifier.properties[@"key"]] ?: specifier.properties[@"default"]; 19 | 20 | } 21 | 22 | - (void)setPreferenceValue:(id)value specifier:(PSSpecifier *)specifier { 23 | 24 | NSMutableDictionary *settings = [NSMutableDictionary dictionary]; 25 | [settings addEntriesFromDictionary:[NSDictionary dictionaryWithContentsOfFile: kPath]]; 26 | [settings setObject:value forKey:specifier.properties[@"key"]]; 27 | [settings writeToFile:kPath atomically:YES]; 28 | 29 | [super setPreferenceValue:value specifier:specifier]; 30 | 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /SpringBoard/Ren/RenPrefs/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | RenPrefs 9 | CFBundleIdentifier 10 | me.luki.renprefs 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 | RenRootVC 23 | 24 | 25 | -------------------------------------------------------------------------------- /SpringBoard/Ren/RenPrefs/Resources/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSGroupCell 10 | label 11 | Icon size 12 | 13 | 14 | cell 15 | PSSliderCell 16 | default 17 | 60 18 | defaults 19 | me.luki.renprefs 20 | key 21 | iconSize 22 | min 23 | 30 24 | max 25 | 60 26 | showValue 27 | 28 | 29 | 30 | cell 31 | PSGroupCell 32 | label 33 | Width 34 | 35 | 36 | cell 37 | PSSliderCell 38 | default 39 | 78 40 | defaults 41 | me.luki.renprefs 42 | key 43 | widthDimension 44 | min 45 | 48 46 | max 47 | 78 48 | showValue 49 | 50 | 51 | 52 | cell 53 | PSGroupCell 54 | label 55 | Height 56 | 57 | 58 | cell 59 | PSSliderCell 60 | default 61 | 118.5 62 | defaults 63 | me.luki.renprefs 64 | key 65 | heightDimension 66 | min 67 | 50 68 | max 69 | 118.5 70 | showValue 71 | 72 | 73 | 74 | cell 75 | PSGroupCell 76 | label 77 | Section horizontal padding 78 | 79 | 80 | cell 81 | PSSliderCell 82 | default 83 | 13 84 | defaults 85 | me.luki.renprefs 86 | key 87 | sectionHorizontalPadding 88 | min 89 | 0 90 | max 91 | 30 92 | showValue 93 | 94 | 95 | 96 | cell 97 | PSGroupCell 98 | footerAlignment 99 | 1 100 | footerText 101 | made by Luki with ❤️ 102 | isStaticText 103 | 104 | 105 | 106 | cell 107 | PSGroupCell 108 | footerAlignment 109 | 1 110 | footerText 111 | © 2024 Luki120 112 | isStaticText 113 | 114 | 115 | 116 | title 117 | Ren 118 | 119 | 120 | -------------------------------------------------------------------------------- /SpringBoard/Ren/RenPrefs/layout/Library/PreferenceLoader/Preferences/RenPrefs.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | entry 6 | 7 | bundle 8 | RenPrefs 9 | cell 10 | PSLinkCell 11 | detail 12 | RenRootVC 13 | icon 14 | icon.png 15 | isController 16 | 17 | label 18 | Ren 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /SpringBoard/Ren/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.ren 2 | Name: Ren 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: Display more items on the ShareSheet without scrolling 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | -------------------------------------------------------------------------------- /SpringBoard/Selene/Common/Common.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #define jbRootPath(path) ROOT_PATH_NS(path) 4 | 5 | static NSString *const kSuiteName = @"me.luki.seleneprefs"; 6 | static NSNotificationName const SeleneDidCreateTapGestureNotification = @"SeleneDidCreateTapGestureNotification"; 7 | 8 | @interface NSDistributedNotificationCenter : NSNotificationCenter 9 | @end 10 | -------------------------------------------------------------------------------- /SpringBoard/Selene/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:14.0 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = Selene 5 | 6 | Selene_FILES = Selene.m 7 | Selene_CFLAGS = -fobjc-arc 8 | Selene_PRIVATE_FRAMEWORKS = AppSupport 9 | 10 | SUBPROJECTS = SelenePrefs 11 | 12 | include $(THEOS)/makefiles/common.mk 13 | include $(THEOS_MAKE_PATH)/tweak.mk 14 | include $(THEOS_MAKE_PATH)/aggregate.mk 15 | -------------------------------------------------------------------------------- /SpringBoard/Selene/Selene.m: -------------------------------------------------------------------------------- 1 | /*--- Triple tap on the LS to save the stock wallapers on the fly ---*/ 2 | 3 | @import UIKit; 4 | @import CydiaSubstrate; 5 | #import "Common/Common.h" 6 | 7 | 8 | extern CFArrayRef CPBitmapCreateImagesFromData(CFDataRef cpbitmap, void *, int, void *); 9 | 10 | static NSString *const kWallPath = @"/var/mobile/Library/SpringBoard/LockBackground.cpbitmap"; 11 | static NSString *const kDarkWallPath = @"/var/mobile/Library/SpringBoard/LockBackgrounddark.cpbitmap"; 12 | 13 | static BOOL yes; 14 | static NSInteger wallType; 15 | 16 | static UITapGestureRecognizer *tapGestureRecognizer; 17 | 18 | #define kClass(string) NSClassFromString(string) 19 | 20 | static void loadWithoutAFuckingRespring(void) { 21 | 22 | NSUserDefaults *prefs = [[NSUserDefaults alloc] initWithSuiteName: kSuiteName]; 23 | 24 | yes = [prefs objectForKey:@"yes"] ? [prefs boolForKey:@"yes"] : NO; 25 | wallType = [prefs objectForKey:@"wallType"] ? [prefs integerForKey:@"wallType"] : 0; 26 | 27 | } 28 | 29 | 30 | @interface CSCoverSheetViewController : UIViewController 31 | - (void)saveWall; 32 | @end 33 | 34 | 35 | @interface UIViewController (KeyWindow) 36 | - (UIWindow *)keyWindow; 37 | @end 38 | 39 | 40 | @implementation UIViewController (KeyWindow) 41 | 42 | - (UIWindow *)keyWindow { 43 | 44 | UIWindow *rootWindow = nil; 45 | NSArray *windows = UIApplication.sharedApplication.windows; 46 | 47 | for(UIWindow *window in windows) 48 | 49 | if(window.isKeyWindow) { 50 | rootWindow = window; 51 | break; 52 | } 53 | 54 | return rootWindow; 55 | 56 | } 57 | 58 | @end 59 | 60 | 61 | static void new_createTapGesture(CSCoverSheetViewController *self, SEL _cmd) { 62 | 63 | loadWithoutAFuckingRespring(); 64 | [self.view removeGestureRecognizer: tapGestureRecognizer]; 65 | 66 | if(!yes) return; 67 | 68 | tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(selene_didTripleTap)]; 69 | tapGestureRecognizer.numberOfTapsRequired = 3; 70 | [self.view addGestureRecognizer: tapGestureRecognizer]; 71 | 72 | } 73 | 74 | static void new_selene_didTripleTap(CSCoverSheetViewController *self, SEL _cmd) { 75 | 76 | UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Selene" message:@"Do you want to save this wallpaper?" preferredStyle:UIAlertControllerStyleActionSheet]; 77 | 78 | UIAlertAction *confirmAction = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { 79 | 80 | [self saveWall]; 81 | 82 | }]; 83 | 84 | UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Not now" style:UIAlertActionStyleCancel handler:nil]; 85 | 86 | [alertController addAction: confirmAction]; 87 | [alertController addAction: cancelAction]; 88 | 89 | [[self keyWindow].rootViewController presentViewController:alertController animated:YES completion:nil]; 90 | 91 | } 92 | 93 | static void new_saveWall(CSCoverSheetViewController *self, SEL _cmd) { 94 | 95 | NSData *lsWallpaperData; 96 | NSString *const kDarkPath = [[NSFileManager defaultManager] fileExistsAtPath: kDarkWallPath] ? kDarkWallPath : kWallPath; 97 | 98 | switch(wallType) { 99 | case 0: lsWallpaperData = [NSData dataWithContentsOfFile: kDarkPath]; break; 100 | case 1: lsWallpaperData = [NSData dataWithContentsOfFile: kWallPath]; break; 101 | } 102 | 103 | CFDataRef lsWallpaperDataRef = (__bridge CFDataRef)lsWallpaperData; 104 | CFArrayRef imageArray = CPBitmapCreateImagesFromData(lsWallpaperDataRef, NULL, 1, NULL); 105 | UIImage *wallpaperImage = [UIImage imageWithCGImage:(CGImageRef)CFArrayGetValueAtIndex(imageArray, 0)]; 106 | CFRelease(imageArray); 107 | 108 | UIImageWriteToSavedPhotosAlbum(wallpaperImage, nil, nil, nil); 109 | 110 | } 111 | 112 | static void (*origVDL)(CSCoverSheetViewController *, SEL); 113 | static void overrideVDL(CSCoverSheetViewController *self, SEL _cmd) { 114 | 115 | origVDL(self, _cmd); 116 | new_createTapGesture(self, _cmd); 117 | 118 | [NSDistributedNotificationCenter.defaultCenter addObserver:self selector:@selector(createTapGesture) name:SeleneDidCreateTapGestureNotification object:nil]; 119 | 120 | } 121 | 122 | __attribute__((constructor)) static void init(void) { 123 | 124 | MSHookMessageEx(kClass(@"CSCoverSheetViewController"), @selector(viewDidLoad), (IMP) &overrideVDL, (IMP *) &origVDL); 125 | 126 | class_addMethod(kClass(@"CSCoverSheetViewController"), @selector(createTapGesture), (IMP) &new_createTapGesture, "v@:"); 127 | class_addMethod(kClass(@"CSCoverSheetViewController"), @selector(selene_didTripleTap), (IMP) &new_selene_didTripleTap, "v@:"); 128 | class_addMethod(kClass(@"CSCoverSheetViewController"), @selector(saveWall), (IMP) &new_saveWall, "v@:"); 129 | 130 | } 131 | -------------------------------------------------------------------------------- /SpringBoard/Selene/Selene.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /SpringBoard/Selene/SelenePrefs/Makefile: -------------------------------------------------------------------------------- 1 | BUNDLE_NAME = SelenePrefs 2 | 3 | SelenePrefs_FILES = SeleneVC.m 4 | SelenePrefs_CFLAGS = -fobjc-arc 5 | SelenePrefs_FRAMEWORKS = UIKit 6 | SelenePrefs_PRIVATE_FRAMEWORKS = Preferences 7 | SelenePrefs_INSTALL_PATH = /Library/PreferenceBundles 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/bundle.mk 11 | -------------------------------------------------------------------------------- /SpringBoard/Selene/SelenePrefs/Resources/Assets/Marie@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Luki120/SmallTweaks/112b385f22f937c41bd275695784d5b7008a6cb0/SpringBoard/Selene/SelenePrefs/Resources/Assets/Marie@2x.png -------------------------------------------------------------------------------- /SpringBoard/Selene/SelenePrefs/Resources/Assets/Meredith@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Luki120/SmallTweaks/112b385f22f937c41bd275695784d5b7008a6cb0/SpringBoard/Selene/SelenePrefs/Resources/Assets/Meredith@2x.png -------------------------------------------------------------------------------- /SpringBoard/Selene/SelenePrefs/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | SelenePrefs 9 | CFBundleIdentifier 10 | me.luki.seleneprefs 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 | SeleneVC 23 | 24 | 25 | -------------------------------------------------------------------------------- /SpringBoard/Selene/SelenePrefs/Resources/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSSwitchCell 10 | default 11 | 12 | defaults 13 | me.luki.seleneprefs 14 | key 15 | yes 16 | label 17 | Enable 18 | 19 | 20 | cell 21 | PSGroupCell 22 | footerText 23 | Triple tap on LS to save the wallpaper 24 | 25 | 26 | cell 27 | PSSegmentCell 28 | height 29 | 50 30 | defaults 31 | me.luki.seleneprefs 32 | default 33 | 0 34 | key 35 | wallType 36 | validValues 37 | 38 | 0 39 | 1 40 | 41 | validTitles 42 | 43 | Save Dark 44 | Save Light 45 | 46 | 47 | 48 | cell 49 | PSGroupCell 50 | 51 | 52 | cell 53 | PSLinkCell 54 | cellClass 55 | SeleneTintCell 56 | detail 57 | SeleneLinksVC 58 | isController 59 | 60 | label 61 | Take A Look 62 | 63 | 64 | cell 65 | PSGroupCell 66 | footerAlignment 67 | 1 68 | footerText 69 | made by Luki with ❤️ 70 | isStaticText 71 | 72 | 73 | 74 | cell 75 | PSGroupCell 76 | footerAlignment 77 | 1 78 | footerText 79 | © 2021-2024 Luki120 80 | isStaticText 81 | 82 | 83 | 84 | title 85 | Selene 86 | 87 | 88 | -------------------------------------------------------------------------------- /SpringBoard/Selene/SelenePrefs/Resources/SeleneLinks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSGroupCell 10 | label 11 | Maybe 12 | 13 | 14 | cell 15 | PSButtonCell 16 | cellClass 17 | SeleneTintCell 18 | action 19 | launchDiscord 20 | label 21 | Chat With Us On Discord 22 | 23 | 24 | cell 25 | PSButtonCell 26 | cellClass 27 | SeleneTintCell 28 | action 29 | launchPayPal 30 | label 31 | Support Development 32 | 33 | 34 | cell 35 | PSButtonCell 36 | cellClass 37 | SeleneTintCell 38 | action 39 | launchGitHub 40 | label 41 | Source Code 🔥 42 | 43 | 44 | cell 45 | PSGroupCell 46 | label 47 | You Might Like 48 | 49 | 50 | cell 51 | PSButtonCell 52 | cellClass 53 | SeleneTintCell 54 | action 55 | launchMarie 56 | label 57 | Marie 58 | icon 59 | Assets/Marie@2x.png 60 | 61 | 62 | cell 63 | PSButtonCell 64 | cellClass 65 | SeleneTintCell 66 | action 67 | launchMeredith 68 | label 69 | Meredith 70 | icon 71 | Assets/Meredith@2x.png 72 | 73 | 74 | title 75 | Selene 76 | 77 | 78 | -------------------------------------------------------------------------------- /SpringBoard/Selene/SelenePrefs/SeleneVC.h: -------------------------------------------------------------------------------- 1 | @import ObjectiveC.message; 2 | @import Preferences.PSTableCell; 3 | @import Preferences.PSSpecifier; 4 | @import Preferences.PSListController; 5 | #import "Common/Common.h" 6 | 7 | 8 | @interface SeleneVC : PSListController 9 | @end 10 | 11 | 12 | @interface SeleneLinksVC : PSListController 13 | @end 14 | -------------------------------------------------------------------------------- /SpringBoard/Selene/SelenePrefs/SeleneVC.m: -------------------------------------------------------------------------------- 1 | #import "SeleneVC.h" 2 | 3 | #define kSeleneTintColor [UIColor colorWithRed:0.55 green:0.86 blue:0.66 alpha:1.0]; 4 | 5 | @implementation SeleneVC 6 | 7 | - (NSArray *)specifiers { 8 | 9 | if(!_specifiers) _specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self]; 10 | return _specifiers; 11 | 12 | } 13 | 14 | 15 | - (id)init { 16 | 17 | self = [super init]; 18 | if(!self) return nil; 19 | 20 | static dispatch_once_t token; 21 | dispatch_once(&token, ^{ registerSeleneTintCellClass(); }); 22 | 23 | return self; 24 | 25 | } 26 | 27 | 28 | - (void)setPreferenceValue:(id)value specifier:(PSSpecifier *)specifier { 29 | 30 | NSUserDefaults *prefs = [[NSUserDefaults alloc] initWithSuiteName: kSuiteName]; 31 | [prefs setObject:value forKey:specifier.properties[@"key"]]; 32 | 33 | [super setPreferenceValue:value specifier:specifier]; 34 | 35 | [NSDistributedNotificationCenter.defaultCenter postNotificationName:SeleneDidCreateTapGestureNotification object:nil]; 36 | 37 | } 38 | 39 | static void selene_setTitle(PSTableCell *self, SEL _cmd, NSString *title) { 40 | 41 | struct objc_super superSetTitle = { 42 | self, 43 | [self superclass] 44 | }; 45 | 46 | id (*superCall)(struct objc_super *, SEL, NSString *) = (void *)objc_msgSendSuper; 47 | superCall(&superSetTitle, _cmd, title); 48 | 49 | self.titleLabel.textColor = kSeleneTintColor; 50 | self.titleLabel.highlightedTextColor = kSeleneTintColor; 51 | 52 | } 53 | 54 | static void registerSeleneTintCellClass(void) { 55 | 56 | Class SeleneTintCellClass = objc_allocateClassPair([PSTableCell class], "SeleneTintCell", 0); 57 | Method method = class_getInstanceMethod([PSTableCell class], @selector(setTitle:)); 58 | const char *typeEncoding = method_getTypeEncoding(method); 59 | class_addMethod(SeleneTintCellClass, @selector(setTitle:), (IMP) selene_setTitle, typeEncoding); 60 | 61 | objc_registerClassPair(SeleneTintCellClass); 62 | 63 | } 64 | 65 | @end 66 | 67 | 68 | @implementation SeleneLinksVC 69 | 70 | - (NSArray *)specifiers { 71 | 72 | if(!_specifiers) _specifiers = [self loadSpecifiersFromPlistName:@"SeleneLinks" target:self]; 73 | return _specifiers; 74 | 75 | } 76 | 77 | 78 | - (void)launchDiscord { [self launchURL: [NSURL URLWithString: @"https://discord.gg/jbE3avwSHs"]]; } 79 | - (void)launchPayPal { [self launchURL: [NSURL URLWithString: @"https://paypal.me/Luki120"]]; } 80 | - (void)launchGitHub { [self launchURL: [NSURL URLWithString: @"https://github.com/Luki120/SmallTweaks/tree/main/Selene"]]; } 81 | - (void)launchMarie { [self launchURL: [NSURL URLWithString: @"https://luki120.github.io/depictions/web/?p=me.luki.marie"]]; } 82 | - (void)launchMeredith { [self launchURL: [NSURL URLWithString: @"https://repo.twickd.com/get/com.twickd.luki120.meredith"]]; } 83 | 84 | - (void)launchURL:(NSURL *)url { [UIApplication.sharedApplication openURL:url options:@{} completionHandler:nil]; } 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /SpringBoard/Selene/SelenePrefs/layout/Library/PreferenceLoader/Preferences/SelenePrefs.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | entry 6 | 7 | bundle 8 | SelenePrefs 9 | cell 10 | PSLinkCell 11 | detail 12 | SeleneVC 13 | icon 14 | 15 | isController 16 | 17 | label 18 | Selene 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /SpringBoard/Selene/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.selene 2 | Name: Selene 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: Triple tap on LS to save the stock walls on the fly 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate, preferenceloader 10 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.selene 11 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.selene/depiction.json 12 | -------------------------------------------------------------------------------- /SpringBoard/ShakeSpring/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:latest 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = ShakeSpring 5 | 6 | ShakeSpring_FILES = Tweak.m 7 | ShakeSpring_CFLAGS = -fobjc-arc 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/tweak.mk 11 | -------------------------------------------------------------------------------- /SpringBoard/ShakeSpring/ShakeSpring.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /SpringBoard/ShakeSpring/Tweak.m: -------------------------------------------------------------------------------- 1 | /*--- I needed a respring tweak so, shake your device to respring :bThisIsHowItIs: ---*/ 2 | 3 | @import UIKit; 4 | @import CydiaSubstrate; 5 | #import 6 | #import 7 | 8 | #define jbRootPathC(cPath) ROOT_PATH(cPath) 9 | 10 | static void (*origMotionEnded)(UIWindow *, SEL, UIEventSubtype, UIEvent *); 11 | static void overrideMotionEnded(UIWindow *self, SEL _cmd, UIEventSubtype motion, UIEvent *event) { 12 | 13 | origMotionEnded(self, _cmd, motion, event); 14 | if(event.type != UIEventSubtypeMotionShake) return; 15 | 16 | pid_t pid; 17 | const char* args[] = {"killall", "backboardd", NULL}; 18 | posix_spawn(&pid, jbRootPathC("/usr/bin/killall"), NULL, NULL, (char* const *)args, NULL); 19 | 20 | } 21 | 22 | __attribute__((constructor)) static void init(void) { 23 | 24 | MSHookMessageEx(NSClassFromString(@"UIWindow"), @selector(motionEnded:withEvent:), (IMP) &overrideMotionEnded, (IMP *) &origMotionEnded); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /SpringBoard/ShakeSpring/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.shakespring 2 | Name: ShakeSpring 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: Shake your device to respring, ez 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.shakespring 11 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.shakespring/depiction.json 12 | -------------------------------------------------------------------------------- /SpringBoard/StealthCC/Common/Common.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #define jbRootPath(path) ROOT_PATH_NS(path) 4 | 5 | static NSString *const kSuiteName = @"me.luki.stealthccprefs"; 6 | static NSNotificationName const StealthCCDidApplyCustomBlurNotification = @"StealthCCDidApplyCustomBlurNotification"; 7 | 8 | @interface NSDistributedNotificationCenter : NSNotificationCenter 9 | @end 10 | -------------------------------------------------------------------------------- /SpringBoard/StealthCC/Makefile: -------------------------------------------------------------------------------- 1 | export TARGET := iphone:clang:latest:latest 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = StealthCC 5 | 6 | StealthCC_FILES = Tweak.m 7 | StealthCC_CFLAGS = -fobjc-arc 8 | 9 | SUBPROJECTS = StealthCCPrefs 10 | 11 | include $(THEOS)/makefiles/common.mk 12 | include $(THEOS_MAKE_PATH)/tweak.mk 13 | include $(THEOS_MAKE_PATH)/aggregate.mk 14 | -------------------------------------------------------------------------------- /SpringBoard/StealthCC/StealthCC.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /SpringBoard/StealthCC/StealthCCPrefs/Makefile: -------------------------------------------------------------------------------- 1 | BUNDLE_NAME = StealthCCPrefs 2 | 3 | StealthCCPrefs_FILES = STLRootVC.m 4 | StealthCCPrefs_CFLAGS = -fobjc-arc 5 | StealthCCPrefs_FRAMEWORKS = UIKit 6 | StealthCCPrefs_PRIVATE_FRAMEWORKS = Preferences 7 | StealthCCPrefs_INSTALL_PATH = /Library/PreferenceBundles 8 | 9 | include $(THEOS)/makefiles/common.mk 10 | include $(THEOS_MAKE_PATH)/bundle.mk -------------------------------------------------------------------------------- /SpringBoard/StealthCC/StealthCCPrefs/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | StealthCCPrefs 9 | CFBundleIdentifier 10 | me.luki.stealthccprefs 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 | STLRootVC 23 | 24 | 25 | -------------------------------------------------------------------------------- /SpringBoard/StealthCC/StealthCCPrefs/Resources/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSGroupCell 10 | label 11 | Yes 12 | 13 | 14 | cell 15 | PSSwitchCell 16 | default 17 | 18 | defaults 19 | me.luki.stealthccprefs 20 | key 21 | magicValue 22 | label 23 | Magic Value 24 | 25 | 26 | cell 27 | PSGroupCell 28 | 29 | 30 | cell 31 | PSSliderCell 32 | defaults 33 | me.luki.stealthccprefs 34 | key 35 | alpha 36 | label 37 | Alpha 38 | min 39 | 0 40 | max 41 | 1 42 | default 43 | 0.85 44 | showValue 45 | 46 | 47 | 48 | cell 49 | PSGroupCell 50 | 51 | 52 | cell 53 | PSButtonCell 54 | cellClass 55 | STLCCTintCell 56 | action 57 | launchSourceCode 58 | label 59 | Source Code 🔥 60 | 61 | 62 | cell 63 | PSGroupCell 64 | footerAlignment 65 | 1 66 | footerText 67 | Handcrafted icon by @CycloneTM_ 68 | isStaticText 69 | 70 | 71 | 72 | cell 73 | PSGroupCell 74 | footerAlignment 75 | 1 76 | footerText 77 | made by Luki for Stealth with ❤️ 78 | isStaticText 79 | 80 | 81 | 82 | cell 83 | PSGroupCell 84 | footerAlignment 85 | 1 86 | footerText 87 | © 2021-2024 Luki120 88 | isStaticText 89 | 90 | 91 | 92 | title 93 | StealthCC 94 | 95 | 96 | -------------------------------------------------------------------------------- /SpringBoard/StealthCC/StealthCCPrefs/Resources/StealthCC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Luki120/SmallTweaks/112b385f22f937c41bd275695784d5b7008a6cb0/SpringBoard/StealthCC/StealthCCPrefs/Resources/StealthCC.png -------------------------------------------------------------------------------- /SpringBoard/StealthCC/StealthCCPrefs/Resources/StealthCC@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Luki120/SmallTweaks/112b385f22f937c41bd275695784d5b7008a6cb0/SpringBoard/StealthCC/StealthCCPrefs/Resources/StealthCC@2x.png -------------------------------------------------------------------------------- /SpringBoard/StealthCC/StealthCCPrefs/Resources/StealthCC@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Luki120/SmallTweaks/112b385f22f937c41bd275695784d5b7008a6cb0/SpringBoard/StealthCC/StealthCCPrefs/Resources/StealthCC@3x.png -------------------------------------------------------------------------------- /SpringBoard/StealthCC/StealthCCPrefs/STLRootVC.h: -------------------------------------------------------------------------------- 1 | @import ObjectiveC.message; 2 | @import Preferences.PSTableCell; 3 | @import Preferences.PSSpecifier; 4 | @import Preferences.PSListController; 5 | #import "../Common/Common.h" 6 | 7 | 8 | @interface STLRootVC : PSListController 9 | @end 10 | -------------------------------------------------------------------------------- /SpringBoard/StealthCC/StealthCCPrefs/STLRootVC.m: -------------------------------------------------------------------------------- 1 | #import "STLRootVC.h" 2 | 3 | #define kSTLCCTintColor [UIColor colorWithRed:0.61 green:0.82 blue:0.88 alpha: 1.0] 4 | 5 | @implementation STLRootVC 6 | 7 | - (NSArray *)specifiers { 8 | 9 | if(!_specifiers) _specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self]; 10 | return _specifiers; 11 | 12 | } 13 | 14 | 15 | - (id)init { 16 | 17 | self = [super init]; 18 | if(!self) return nil; 19 | 20 | [UISlider appearanceWhenContainedInInstancesOfClasses:@[[self class]]].minimumTrackTintColor = kSTLCCTintColor; 21 | [UISwitch appearanceWhenContainedInInstancesOfClasses:@[[self class]]].onTintColor = kSTLCCTintColor; 22 | 23 | static dispatch_once_t token; 24 | dispatch_once(&token, ^{ registerStealthCCTintCellClass(); }); 25 | 26 | return self; 27 | 28 | } 29 | 30 | 31 | - (void)setPreferenceValue:(id)value specifier:(PSSpecifier *)specifier { 32 | 33 | NSUserDefaults *prefs = [[NSUserDefaults alloc] initWithSuiteName: kSuiteName]; 34 | [prefs setObject:value forKey:specifier.properties[@"key"]]; 35 | 36 | [super setPreferenceValue:value specifier:specifier]; 37 | 38 | [NSDistributedNotificationCenter.defaultCenter postNotificationName:StealthCCDidApplyCustomBlurNotification object:nil]; 39 | 40 | } 41 | 42 | 43 | - (void)launchSourceCode { 44 | 45 | [UIApplication.sharedApplication openURL:[NSURL URLWithString: @"https://github.com/Luki120/SmallTweaks/tree/main/SpringBoard/StealthCC"] options:@{} completionHandler:nil]; 46 | 47 | } 48 | 49 | static void stealthCC_setTitle(PSTableCell *self, SEL _cmd, NSString *title) { 50 | 51 | struct objc_super superSetTitle = { 52 | self, 53 | [self superclass] 54 | }; 55 | 56 | id (*superCall)(struct objc_super *, SEL, NSString *) = (void *)objc_msgSendSuper; 57 | superCall(&superSetTitle, _cmd, title); 58 | 59 | self.titleLabel.textColor = kSTLCCTintColor; 60 | self.titleLabel.highlightedTextColor = kSTLCCTintColor; 61 | 62 | } 63 | 64 | static void registerStealthCCTintCellClass(void) { 65 | 66 | Class StealthCCTintCellClass = objc_allocateClassPair([PSTableCell class], "STLCCTintCell", 0); 67 | Method method = class_getInstanceMethod([PSTableCell class], @selector(setTitle:)); 68 | const char *typeEncoding = method_getTypeEncoding(method); 69 | class_addMethod(StealthCCTintCellClass, @selector(setTitle:), (IMP) stealthCC_setTitle, typeEncoding); 70 | 71 | objc_registerClassPair(StealthCCTintCellClass); 72 | 73 | } 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /SpringBoard/StealthCC/StealthCCPrefs/layout/Library/PreferenceLoader/Preferences/StealthCCPrefs.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | entry 6 | 7 | bundle 8 | StealthCCPrefs 9 | cell 10 | PSLinkCell 11 | detail 12 | STLRootVC 13 | icon 14 | StealthCC.png 15 | isController 16 | 17 | label 18 | StealthCC 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /SpringBoard/StealthCC/Tweak.m: -------------------------------------------------------------------------------- 1 | /*--- Controls the blur intensity of the stock CC, 2 | original code idea from NoBlurCC by ETHN -> https://github.com/nahtedetihw ---*/ 3 | 4 | @import UIKit; 5 | @import CydiaSubstrate; 6 | #import "Common/Common.h" 7 | 8 | static BOOL magicValue; 9 | static CGFloat alpha; 10 | 11 | 12 | @interface MTMaterialView : UIView 13 | @property (assign, nonatomic) double weighting; 14 | @property (assign, nonatomic) BOOL zoomEnabled; 15 | @property (assign, nonatomic) BOOL shouldCrossfade; 16 | - (void)unleashTheRabbit; 17 | - (UIViewController *)_viewControllerForAncestor; 18 | @end 19 | 20 | 21 | static void loadShit(void) { 22 | 23 | NSUserDefaults *prefs = [[NSUserDefaults alloc] initWithSuiteName: kSuiteName]; 24 | 25 | magicValue = [prefs objectForKey: @"magicValue"] ? [prefs boolForKey: @"magicValue"] : NO; 26 | alpha = [prefs objectForKey: @"alpha"] ? [prefs floatForKey: @"alpha"] : 0.85f; 27 | 28 | } 29 | 30 | static void new_unleashTheRabbit(MTMaterialView *self, SEL _cmd) { 31 | 32 | loadShit(); 33 | if(!magicValue) return; 34 | 35 | self.weighting = 1; 36 | self.zoomEnabled = NO; 37 | self.shouldCrossfade = YES; 38 | 39 | } 40 | 41 | static void (*origSetWeighting)(MTMaterialView *, SEL, CGFloat); 42 | static void overrideSetWeighting(MTMaterialView *self, SEL _cmd, CGFloat weighting) { 43 | 44 | UIViewController *ancestor = [self _viewControllerForAncestor]; 45 | if(![ancestor isKindOfClass:NSClassFromString(@"CCUIModularControlCenterOverlayViewController")]) 46 | return origSetWeighting(self, _cmd, weighting); 47 | 48 | origSetWeighting(self, _cmd, magicValue ? alpha * weighting : weighting); 49 | 50 | } 51 | 52 | static void (*origDMTS)(MTMaterialView *, SEL); 53 | static void overrideDMTS(MTMaterialView *self, SEL _cmd) { 54 | 55 | origDMTS(self, _cmd); 56 | 57 | UIViewController *ancestor = [self _viewControllerForAncestor]; 58 | if(![ancestor isKindOfClass:NSClassFromString(@"CCUIModularControlCenterOverlayViewController")]) return; 59 | 60 | [self unleashTheRabbit]; 61 | 62 | [NSDistributedNotificationCenter.defaultCenter addObserver:self selector:@selector(unleashTheRabbit) name:StealthCCDidApplyCustomBlurNotification object:nil]; 63 | 64 | } 65 | 66 | __attribute__((constructor)) static void init(void) { 67 | 68 | MSHookMessageEx(NSClassFromString(@"MTMaterialView"), @selector(setWeighting:), (IMP) &overrideSetWeighting, (IMP *) &origSetWeighting); 69 | MSHookMessageEx(NSClassFromString(@"MTMaterialView"), @selector(didMoveToSuperview), (IMP) &overrideDMTS, (IMP *) &origDMTS); 70 | 71 | class_addMethod(NSClassFromString(@"MTMaterialView"), @selector(unleashTheRabbit), (IMP) &new_unleashTheRabbit, "v@:"); 72 | 73 | } 74 | -------------------------------------------------------------------------------- /SpringBoard/StealthCC/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.stealthcc 2 | Name: StealthCC 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: Control the intensity of the stock CC blur on the fly 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate, preferenceloader 10 | Icon: https://raw.githubusercontent.com/Luki120/luki120.github.io/master/assets/Tweaks/SpringBoard/StealthCC/StealthCC.png 11 | Depiction: https://luki120.github.io/depictions/web/?p=me.luki.stealthcc 12 | SileoDepiction: https://luki120.github.io/depictions/native/me.luki.stealthcc/depiction.json 13 | -------------------------------------------------------------------------------- /SpringBoard/Wisteria/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:14.0 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | TWEAK_NAME = Wisteria 5 | 6 | Wisteria_FILES = Tweak.mm 7 | Wisteria_CFLAGS = -fobjc-arc 8 | Wisteria_FRAMEWORKS = BulletinBoard 9 | 10 | include $(THEOS)/makefiles/common.mk 11 | include $(THEOS_MAKE_PATH)/tweak.mk 12 | -------------------------------------------------------------------------------- /SpringBoard/Wisteria/Tweak.mm: -------------------------------------------------------------------------------- 1 | /*--- Swipe up on the dock to get a test notification, no dependencies at all ™ ---*/ 2 | 3 | @import CydiaSubstrate; 4 | @import UIKit; 5 | 6 | 7 | @interface BBBulletin : NSObject 8 | @property (nonatomic, strong) NSDate *date; 9 | @property (nonatomic, copy) NSString *title; 10 | @property (nonatomic, assign) BOOL clearable; 11 | @property (nonatomic, copy) NSString *message; 12 | @property (nonatomic, copy) NSString *recordID; 13 | @property (nonatomic, copy) NSString *sectionID; 14 | @property (nonatomic, copy) NSString *bulletinID; 15 | @property (nonatomic, copy) NSString *publisherBulletinID; 16 | @property (nonatomic, assign) BOOL showsMessagePreview; 17 | @end 18 | 19 | 20 | @interface BBServer : NSObject 21 | - (id)initWithQueue:(id)queue; 22 | - (void)publishBulletin:(BBBulletin *)bulletin destinations:(NSUInteger)destinations; 23 | @end 24 | 25 | 26 | @interface SBDockView : UIView 27 | @end 28 | 29 | 30 | @interface UNSDefaultDataProviderFactory : NSObject 31 | @end 32 | 33 | 34 | @interface UNSUserNotificationServer : NSObject 35 | + (id)sharedInstance; 36 | @end 37 | 38 | 39 | extern dispatch_queue_t __BBServerQueue; 40 | 41 | static BBServer *bbServer; 42 | static NSNotificationName const WisteriaDidSwipeUpDockNotification = @"WisteriaDidSwipeUpDockNotification"; 43 | 44 | static BBServer *(*origIWQ)(BBServer *, SEL, dispatch_queue_t *); 45 | static BBServer *overrideIWQ(BBServer *self, SEL _cmd, dispatch_queue_t *queue) { 46 | 47 | bbServer = origIWQ(self, _cmd, queue); 48 | return bbServer; 49 | 50 | } 51 | 52 | static void (*origDMTS)(SBDockView *, SEL); 53 | static void overrideDMTS(SBDockView *self, SEL _cmd) { 54 | 55 | origDMTS(self, _cmd); 56 | 57 | UISwipeGestureRecognizer *swipeRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(wisteria_didSwipeUp)]; 58 | swipeRecognizer.direction = UISwipeGestureRecognizerDirectionUp; 59 | [self addGestureRecognizer: swipeRecognizer]; 60 | 61 | } 62 | 63 | static void wisteria_didSwipeUp(SBDockView *self, SEL _cmd) { 64 | 65 | [NSNotificationCenter.defaultCenter postNotificationName:WisteriaDidSwipeUpDockNotification object: nil]; 66 | 67 | } 68 | 69 | static void sendTestNotification(void) { 70 | 71 | // credits for finding this out ⇝ Gc 72 | UNSDefaultDataProviderFactory *dataProvider = MSHookIvar([NSClassFromString(@"UNSUserNotificationServer") sharedInstance] , "_dataProviderFactory"); 73 | if(!dataProvider) return; 74 | 75 | NSMutableSet *authorizedBundlesSet = MSHookIvar(dataProvider, "_authorizedBundleIdentifiers"); 76 | NSArray *authorizedBundles = [authorizedBundlesSet allObjects]; 77 | 78 | NSPredicate *cleanPredicate = [NSPredicate predicateWithFormat: @"NOT (SELF BEGINSWITH %@)", @"com.apple"]; 79 | NSArray *cleanAuthorizedBundles = [authorizedBundles filteredArrayUsingPredicate: cleanPredicate]; 80 | 81 | BBBulletin *bulletin = [BBBulletin new]; 82 | bulletin.date = [NSDate new]; 83 | bulletin.title = @"Wisteria"; 84 | bulletin.message = @"Test notification incoming"; 85 | bulletin.recordID = [[NSProcessInfo processInfo] globallyUniqueString]; 86 | bulletin.clearable = YES; 87 | bulletin.sectionID = cleanAuthorizedBundles[arc4random_uniform(cleanAuthorizedBundles.count)]; 88 | bulletin.bulletinID = [[NSProcessInfo processInfo] globallyUniqueString]; 89 | bulletin.publisherBulletinID = [[NSProcessInfo processInfo] globallyUniqueString]; 90 | bulletin.showsMessagePreview = YES; 91 | 92 | if(!bbServer) return; 93 | dispatch_sync(__BBServerQueue, ^{ [bbServer publishBulletin:bulletin destinations:15]; }); 94 | 95 | } 96 | 97 | static id observer; 98 | 99 | __attribute__((constructor)) static void init(void) { 100 | 101 | MSHookMessageEx(NSClassFromString(@"BBServer"), @selector(initWithQueue:), (IMP) &overrideIWQ, (IMP *) &origIWQ); 102 | MSHookMessageEx(NSClassFromString(@"SBDockView"), @selector(didMoveToSuperview), (IMP) &overrideDMTS, (IMP *) &origDMTS); 103 | 104 | class_addMethod(NSClassFromString(@"SBDockView"), @selector(wisteria_didSwipeUp), (IMP) &wisteria_didSwipeUp, "v@:"); 105 | 106 | observer = [NSNotificationCenter.defaultCenter addObserverForName:WisteriaDidSwipeUpDockNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { 107 | 108 | sendTestNotification(); 109 | 110 | }]; 111 | 112 | } 113 | -------------------------------------------------------------------------------- /SpringBoard/Wisteria/Wisteria.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /SpringBoard/Wisteria/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.wisteria 2 | Name: Wisteria 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: An awesome MobileSubstrate tweak! 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Tweaks 9 | Depends: mobilesubstrate 10 | -------------------------------------------------------------------------------- /SpringBoard/Zira/Common/Common.h: -------------------------------------------------------------------------------- 1 | static NSNotificationName const ZiraApplyImageNotification = @"ZiraApplyImageNotification"; 2 | 3 | @interface NSDistributedNotificationCenter : NSNotificationCenter 4 | @end 5 | -------------------------------------------------------------------------------- /SpringBoard/Zira/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:14.0 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | BUNDLE_NAME = Zira 5 | 6 | Zira_FILES = $(wildcard **/*.m) 7 | Zira_CFLAGS = -fobjc-arc 8 | Zira_LIBRARIES = gcuniversal 9 | Zira_INSTALL_PATH = /Library/ControlCenter/Bundles/ 10 | Zira_BUNDLE_EXTENSION = bundle 11 | Zira_PRIVATE_FRAMEWORKS = ControlCenterUIKit Preferences 12 | 13 | include $(THEOS)/makefiles/common.mk 14 | include $(THEOS_MAKE_PATH)/bundle.mk 15 | include $(THEOS_MAKE_PATH)/aggregate.mk 16 | -------------------------------------------------------------------------------- /SpringBoard/Zira/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleName 6 | Zira 7 | CFBundleExecutable 8 | Zira 9 | CFBundleIdentifier 10 | me.luki.zira 11 | CFBundleDevelopmentRegion 12 | English 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | MinimumOSVersion 22 | 11.0 23 | UIDeviceFamily 24 | 25 | 1 26 | 2 27 | 28 | NSPrincipalClass 29 | ZiraModule 30 | CFBundleSupportedPlatforms 31 | 32 | iPhoneOS 33 | 34 | CCSGetModuleSizeAtRuntime 35 | 36 | CCSPreferencesRootListController 37 | ZiraVC 38 | 39 | 40 | -------------------------------------------------------------------------------- /SpringBoard/Zira/Resources/ZiraPrefs.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSGroupCell 10 | 11 | 12 | cell 13 | PSLinkCell 14 | cellClass 15 | GcImagePickerCell 16 | label 17 | Module Image 18 | defaults 19 | me.luki.ziraprefs 20 | PostNotification 21 | me.luki.ziraprefs/imageChanged 22 | key 23 | ziraImage 24 | usesPhotos 25 | 26 | usesVideos 27 | 28 | videoQuality 29 | 1 30 | 31 | 32 | cell 33 | PSGroupCell 34 | 35 | 36 | cell 37 | PSStaticTextCell 38 | label 39 | Portrait width 40 | 41 | 42 | cell 43 | PSSliderCell 44 | defaults 45 | me.luki.ziraprefs 46 | default 47 | 1 48 | min 49 | 1 50 | max 51 | 4 52 | isSegmented 53 | 54 | segmentCount 55 | 3 56 | showValue 57 | 58 | key 59 | portraitWidth 60 | PostNotification 61 | com.opa334.ccsupport/ReloadSizes 62 | 63 | 64 | cell 65 | PSGroupCell 66 | 67 | 68 | cell 69 | PSStaticTextCell 70 | label 71 | Portrait height 72 | 73 | 74 | cell 75 | PSSliderCell 76 | defaults 77 | me.luki.ziraprefs 78 | default 79 | 1 80 | min 81 | 1 82 | max 83 | 4 84 | isSegmented 85 | 86 | segmentCount 87 | 3 88 | showValue 89 | 90 | key 91 | portraitHeight 92 | PostNotification 93 | com.opa334.ccsupport/ReloadSizes 94 | 95 | 96 | cell 97 | PSGroupCell 98 | 99 | 100 | cell 101 | PSStaticTextCell 102 | label 103 | Landscape width 104 | 105 | 106 | cell 107 | PSSliderCell 108 | defaults 109 | me.luki.ziraprefs 110 | default 111 | 1 112 | min 113 | 1 114 | max 115 | 4 116 | isSegmented 117 | 118 | segmentCount 119 | 3 120 | showValue 121 | 122 | key 123 | landscapeWidth 124 | PostNotification 125 | com.opa334.ccsupport/ReloadSizes 126 | 127 | 128 | cell 129 | PSGroupCell 130 | 131 | 132 | cell 133 | PSStaticTextCell 134 | label 135 | Landscape height 136 | 137 | 138 | cell 139 | PSSliderCell 140 | defaults 141 | me.luki.ziraprefs 142 | default 143 | 1 144 | min 145 | 1 146 | max 147 | 4 148 | isSegmented 149 | 150 | segmentCount 151 | 3 152 | showValue 153 | 154 | key 155 | landscapeHeight 156 | PostNotification 157 | com.opa334.ccsupport/ReloadSizes 158 | 159 | 160 | title 161 | Zira 162 | 163 | 164 | -------------------------------------------------------------------------------- /SpringBoard/Zira/ZiraModule/ZiraContentModuleVC.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "GcUniversal/GcImagePickerUtils.h" 3 | #import "Common/Common.h" 4 | 5 | 6 | @class ZiraModule; 7 | 8 | 9 | @interface ZiraContentModuleVC : UIViewController 10 | @property (nonatomic, weak) ZiraModule *module; 11 | @end 12 | -------------------------------------------------------------------------------- /SpringBoard/Zira/ZiraModule/ZiraContentModuleVC.m: -------------------------------------------------------------------------------- 1 | #import "ZiraContentModuleVC.h" 2 | 3 | 4 | @implementation ZiraContentModuleVC { 5 | 6 | UIImageView *imageView; 7 | 8 | } 9 | 10 | - (id)initWithNibName:(NSString *)nibName bundle:(NSBundle *)bundle { 11 | 12 | self = [super initWithNibName:nibName bundle:bundle]; 13 | if(!self) return nil; 14 | if(imageView) return nil; 15 | 16 | imageView = [UIImageView new]; 17 | imageView.image = [GcImagePickerUtils imageFromDefaults:@"me.luki.ziraprefs" withKey:@"ziraImage"]; 18 | imageView.contentMode = UIViewContentModeScaleAspectFill; 19 | imageView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 20 | [self.view addSubview: imageView]; 21 | 22 | [NSDistributedNotificationCenter.defaultCenter addObserver:self selector:@selector(updateImage) name:ZiraApplyImageNotification object:nil]; 23 | 24 | return self; 25 | 26 | } 27 | 28 | 29 | - (void)viewDidLayoutSubviews { 30 | 31 | [super viewDidLayoutSubviews]; 32 | 33 | imageView.frame = self.view.bounds; 34 | imageView.clipsToBounds = YES; 35 | 36 | UIView *materialView = imageView.superview.superview.subviews.firstObject; 37 | if(![materialView isKindOfClass: NSClassFromString(@"MTMaterialView")]) return; 38 | 39 | imageView.layer.cornerCurve = kCACornerCurveContinuous; 40 | imageView.layer.cornerRadius = materialView.layer.cornerRadius; 41 | 42 | } 43 | 44 | 45 | - (void)updateImage { 46 | 47 | imageView.image = [GcImagePickerUtils imageFromDefaults:@"me.luki.ziraprefs" withKey:@"ziraImage"]; 48 | 49 | } 50 | 51 | 52 | - (BOOL)_canShowWhileLocked { return YES; } 53 | - (BOOL)shouldBeginTransitionToExpandedContentModule { return NO; } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /SpringBoard/Zira/ZiraModule/ZiraModule.h: -------------------------------------------------------------------------------- 1 | #import "ZiraContentModuleVC.h" 2 | #import 3 | #import 4 | 5 | #define rootlessPathC(cPath) ROOT_PATH(cPath) 6 | #define jbRootPath(path) ROOT_PATH_NS(path) 7 | 8 | 9 | typedef struct CCUILayoutSize { 10 | NSUInteger width; 11 | NSUInteger height; 12 | } CCUILayoutSize; 13 | 14 | 15 | @interface ZiraModule : CCUIToggleModule 16 | @end 17 | -------------------------------------------------------------------------------- /SpringBoard/Zira/ZiraModule/ZiraModule.m: -------------------------------------------------------------------------------- 1 | /*--- Put an image background as a CC module on the fly ---*/ 2 | 3 | #import "ZiraModule.h" 4 | 5 | 6 | @implementation ZiraModule { 7 | 8 | ZiraContentModuleVC *ziraContentModuleVC; 9 | 10 | } 11 | 12 | 13 | - (id)init { 14 | 15 | self = [super init]; 16 | if(!self) return nil; 17 | 18 | NSFileManager *fileM = [NSFileManager defaultManager]; 19 | NSString *const kBSC = jbRootPath(@"/Library/MobileSubstrate/DynamicLibraries/BigSurCenter.dylib"); 20 | NSString *const kPrysm = jbRootPath(@"/Library/MobileSubstrate/DynamicLibraries/Prysm.dylib"); 21 | 22 | if([fileM fileExistsAtPath: kBSC] || [fileM fileExistsAtPath: kPrysm]) return nil; 23 | 24 | ziraContentModuleVC = [ZiraContentModuleVC new]; 25 | ziraContentModuleVC.module = self; 26 | 27 | return self; 28 | 29 | } 30 | 31 | 32 | - (CCUILayoutSize)moduleSizeForOrientation:(NSInteger)orientation { 33 | 34 | CCUILayoutSize size; 35 | NSNumber *width, *height; 36 | 37 | switch(orientation) { 38 | 39 | case 0: 40 | width = [self retrieveDefaultsForKey: @"portraitWidth"]; 41 | height = [self retrieveDefaultsForKey: @"portraitHeight"]; 42 | break; 43 | 44 | case 1: 45 | width = [self retrieveDefaultsForKey: @"landscapeWidth"]; 46 | height = [self retrieveDefaultsForKey: @"landscapeHeight"]; 47 | break; 48 | 49 | } 50 | 51 | size.width = width ? [width unsignedLongLongValue] : 1; 52 | size.height = height ? [height unsignedLongLongValue] : 1; 53 | 54 | return size; 55 | 56 | } 57 | 58 | 59 | - (NSNumber *)retrieveDefaultsForKey:(NSString *)key { 60 | 61 | return [[NSUserDefaults.standardUserDefaults persistentDomainForName:@"me.luki.ziraprefs"] objectForKey: key]; 62 | 63 | } 64 | 65 | 66 | - (UIViewController *)contentViewController { return ziraContentModuleVC; } 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /SpringBoard/Zira/ZiraPrefs/ZiraVC.h: -------------------------------------------------------------------------------- 1 | @import Preferences.PSListController; 2 | #import 3 | #import "Common/Common.h" 4 | 5 | 6 | @interface ZiraVC : PSListController 7 | @end 8 | -------------------------------------------------------------------------------- /SpringBoard/Zira/ZiraPrefs/ZiraVC.m: -------------------------------------------------------------------------------- 1 | #import "ZiraVC.h" 2 | 3 | 4 | @implementation ZiraVC 5 | 6 | - (NSArray *)specifiers { 7 | 8 | if(!_specifiers) _specifiers = [self loadSpecifiersFromPlistName:@"ZiraPrefs" target:self]; 9 | return _specifiers; 10 | 11 | } 12 | 13 | 14 | - (id)init { 15 | 16 | self = [super init]; 17 | if(!self) return nil; 18 | 19 | int register_token = 0; 20 | notify_register_dispatch("me.luki.ziraprefs/imageChanged", ®ister_token, dispatch_get_main_queue(), ^(int _) { 21 | [NSDistributedNotificationCenter.defaultCenter postNotificationName:ZiraApplyImageNotification object:nil]; 22 | }); 23 | 24 | return self; 25 | 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /SpringBoard/Zira/control: -------------------------------------------------------------------------------- 1 | Package: me.luki.zira 2 | Name: Zira 3 | Version: 0.9.0 4 | Architecture: iphoneos-arm 5 | Description: Put an image background as a CC module on the fly 6 | Maintainer: Luki 7 | Author: Luki 8 | Section: Control Center (Modules) 9 | Depends: com.mrgcgamer.libgcuniversal, com.opa334.ccsupport 10 | --------------------------------------------------------------------------------