diff --git a/Makefile b/Makefile deleted file mode 100644 index 6387a69..0000000 --- a/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -ARCHS = arm64 arm64e -SDK = iPhoneOS13.0 -FINALPACKAGE = 1 -export TARGET = iphone:clang:13.0:latest - -include $(THEOS)/makefiles/common.mk - -TWEAK_NAME = ZenithDark - -ZenithDark_FILES = Tweak.xm -ZenithDark_CFLAGS = -fobjc-arc -ZenithDark_FRAMEWORKS = UIKit CoreGraphics - -include $(THEOS_MAKE_PATH)/tweak.mk - -after-install:: - install.exec "sbreload" -SUBPROJECTS += zenithdarkprefs -include $(THEOS_MAKE_PATH)/aggregate.mk diff --git a/README.md b/README.md deleted file mode 100644 index c0a434e..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# ZenithDark -Dark tabs for Zenith! Availible on [mac-user669's repo](https://mac-user669.github.io/repo/) \ No newline at end of file diff --git a/Tweak.xm b/Tweak.xm deleted file mode 100644 index fbd9fd6..0000000 --- a/Tweak.xm +++ /dev/null @@ -1,79 +0,0 @@ -/* - -Dark Mode for Zenith's Grabber view! -Copyright 2020 J.K. Hayslip (@iKilledAppl3) & ToxicAppl3 INSDC/iKilledAppl3 LLC. -All code was written for learning purposes and credit must be given to the original author. - -Written for Cooper Hull, @(mac-user669). - - -*/ - -#import "ZenithDark.h" - -static BOOL enabled; -static void loadPrefs() { - static NSMutableDictionary *settings; - - CFArrayRef keyList = CFPreferencesCopyKeyList(CFSTR("com.mac-user669.zenithdarkprefs"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost); - if (keyList) { - settings = (NSMutableDictionary *)CFBridgingRelease(CFPreferencesCopyMultiple(keyList, CFSTR("com.mac-user669.zenithdarkprefs"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost)); - CFRelease(keyList); - } else { - settings = [NSMutableDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.mac-user669.zenithdarkprefs.plist"]; - } - - enabled = [([settings objectForKey:@"enabled"] ? [settings objectForKey:@"enabled"] : @(YES)) boolValue]; -} - -// We then hook the class in this case Zenith's grabber view is called “ZNGrabberAccessoryView” -%hook ZNGrabberAccessoryView - // this is called when iOS 13's dark mode is enabled! --(void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection { - if (enabled) { - %orig(previousTraitCollection); - if (@available(iOS 13, *)) { - if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) { - [self setBackgroundColor:kDarkModeColor]; - } - - else { - [self setBackgroundColor:kLightModeColor]; - } - } - } - %orig; -} - -// the method we modify is this method that is called from UIImageView to set the backgroundColor of the image view. -// Since the grabber view is of type UIImageView we can modify this method :) --(void)setBackgroundColor:(UIColor *)backgroundColor { - if (enabled) { - // by default have our tweak overide this. - if (@available(iOS 13, *)) { - if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) { - %orig(kDarkModeColor); - } - - else { - %orig; - } - } - } - %orig; -} - - -// we need to make sure we tell theos that we are finished hooking this class not doing so with cause the end of the world :P -%end - - -// our constructor -%ctor { - -loadPrefs(); - -// We use this to make sure we load Zenith's dynamic library at runtime so we can modify it with our tweak. -dlopen ("/Library/MobileSubstrate/DynamicLibraries/Zenith.dylib", RTLD_NOW); - -} \ No newline at end of file diff --git a/ZenithDark.h b/ZenithDark.h deleted file mode 100644 index c14944a..0000000 --- a/ZenithDark.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - -Dark Mode for Zenith's Grabber view! -Copyright 2020 J.K. Hayslip (@iKilledAppl3) & ToxicAppl3 INSDC/iKilledAppl3 LLC. -All code was written for learning purposes and credit must be given to the original author. - -Written for Cooper Hull, @(mac-user669). - -ZenithDark Header file to keep the tweak.x file clean! - - -*/ - - -// We then import UIKit so we can override the color property without this Theos doesn't have a clue what those properties are. -@import UIKit; - -// We make an interface to let Theos know that ZNGrabberAccessoryView is of type UIImageView. -@interface ZNGrabberAccessoryView : UIImageView -@end - -// Dark Zenith color we are using macros so we can call it later if need be. -#define kDarkModeColor [UIColor colorWithWhite:0.0 alpha:0.44] - -// Stock Zenith color we are using macros so we can call it later if need be. -#define kLightModeColor [UIColor colorWithWhite:1.0 alpha:0.7] diff --git a/ZenithDark.plist b/ZenithDark.plist deleted file mode 100644 index 10dc654..0000000 --- a/ZenithDark.plist +++ /dev/null @@ -1 +0,0 @@ -{ Filter = { Bundles = ( "com.apple.springboard" ); }; } diff --git a/control b/control deleted file mode 100644 index d98404b..0000000 --- a/control +++ /dev/null @@ -1,11 +0,0 @@ -Package: com.mac-user669.zenithdark -Version: 1.0 -Architecture: iphoneos-arm -Maintainer: mac-user669 -Depends: mobilesubstrate, com.muirey03.zenith, firmware (>=13.0) -Section: Tweaks -Description: Changes Zeniths tabs to a dark blur -Author: mac-user669 -Name: ZenithDark -Sileodepiction: https://raw.githubusercontent.com/mac-user669/repo/master/sileodepictions/ZenithDark.json -Depiction: https://mac-user669.github.io/repo/depictions/?p=com.mac-user669.zenithdark/ diff --git a/packages/com.mac-user669.zenithdark_1.0_iphoneos-arm.deb b/packages/com.mac-user669.zenithdark_1.0_iphoneos-arm.deb deleted file mode 100644 index 6ac9a87..0000000 Binary files a/packages/com.mac-user669.zenithdark_1.0_iphoneos-arm.deb and /dev/null differ diff --git a/zenithdarkprefs/Makefile b/zenithdarkprefs/Makefile deleted file mode 100644 index aab3c31..0000000 --- a/zenithdarkprefs/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -include $(THEOS)/makefiles/common.mk - -ARCHS = arm64 arm64e -export TARGET = iphone:clang:13.0:latest -BUNDLE_NAME = ZenithDarkPrefs - -ZenithDarkPrefs_FILES = ZnthDrkRootListController.m -ZenithDarkPrefs_INSTALL_PATH = /Library/PreferenceBundles -ZenithDarkPrefs_FRAMEWORKS = UIKit -ZenithDarkPrefs_PRIVATE_FRAMEWORKS = Preferences -ZenithDarkPrefs_CFLAGS = -fobjc-arc - -include $(THEOS_MAKE_PATH)/bundle.mk - -internal-stage:: - $(ECHO_NOTHING)mkdir -p $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences$(ECHO_END) - $(ECHO_NOTHING)cp entry.plist $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/ZenithDarkPrefs.plist$(ECHO_END) diff --git a/zenithdarkprefs/Resources/Info.plist b/zenithdarkprefs/Resources/Info.plist deleted file mode 100644 index 86d931a..0000000 --- a/zenithdarkprefs/Resources/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ZenithDarkPrefs - CFBundleIdentifier - com.mac-user669.zenithdarkprefs - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - NSPrincipalClass - ZnthDrkRootListController - - diff --git a/zenithdarkprefs/Resources/Root.plist b/zenithdarkprefs/Resources/Root.plist deleted file mode 100644 index 727bd0f..0000000 --- a/zenithdarkprefs/Resources/Root.plist +++ /dev/null @@ -1,42 +0,0 @@ - - - - - items - - - cell - PSGroupCell - label - Enable - - - cell - PSSwitchCell - default - - defaults - com.mac-user669.zenithdarkprefs - key - enabled - label - Enable - - - - cell - PSGroupCell - - - cell - PSButtonCell - label - @mac_user669 - action - openTwitter - - - title - ZenithDark - - \ No newline at end of file diff --git a/zenithdarkprefs/ZnthDrkRootListController.h b/zenithdarkprefs/ZnthDrkRootListController.h deleted file mode 100644 index 07cc78a..0000000 --- a/zenithdarkprefs/ZnthDrkRootListController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import - -@interface ZnthDrkRootListController : PSListController - -@end diff --git a/zenithdarkprefs/ZnthDrkRootListController.m b/zenithdarkprefs/ZnthDrkRootListController.m deleted file mode 100644 index 4c559f8..0000000 --- a/zenithdarkprefs/ZnthDrkRootListController.m +++ /dev/null @@ -1,40 +0,0 @@ -#import "ZnthDrkRootListController.h" -#import -@implementation ZnthDrkRootListController - -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - UIBarButtonItem *applyButton = [[UIBarButtonItem alloc] initWithTitle:@"Apply" style:UIBarButtonItemStylePlain target:self action:@selector(respringDevice)]; - self.navigationItem.rightBarButtonItem = applyButton; -} - -- (NSArray *)specifiers { - if (!_specifiers) { - _specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self]; - } - - return _specifiers; -} - -- (void) respringDevice { - UIAlertController *confirmRespringAlert = [UIAlertController alertControllerWithTitle:@"Apply settings?" message:@"This will respring your device" preferredStyle:UIAlertControllerStyleAlert]; - UIAlertAction *confirm = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - pid_t pid; - const char *argv[] = {"sbreload", NULL}; - posix_spawn(&pid, "/usr/bin/sbreload", NULL, NULL, (char* const*)argv, NULL); - }]; - - UIAlertAction *cancel = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]; - - [confirmRespringAlert addAction:cancel]; - [confirmRespringAlert addAction:confirm]; - - [self presentViewController:confirmRespringAlert animated:YES completion:nil]; -} - --(void)openTwitter { - NSURL *twitter = [NSURL URLWithString:@"https://twitter.com/mac_user669"]; - [[UIApplication sharedApplication] openURL:twitter options:@{} completionHandler:nil]; -} - -@end diff --git a/zenithdarkprefs/entry.plist b/zenithdarkprefs/entry.plist deleted file mode 100644 index 9b0cc13..0000000 --- a/zenithdarkprefs/entry.plist +++ /dev/null @@ -1,21 +0,0 @@ - - - - - entry - - bundle - ZenithDarkPrefs - cell - PSLinkCell - detail - ZnthDrkRootListController - icon - icon.png - isController - - label - ZenithDarkPrefs - - -